[Commits] 515fb3a: Fixed compiler error if INT64_MAX and INT64_MIN are not defined

Jan Lindström jan.lindstrom at mariadb.com
Wed Sep 7 13:34:49 EEST 2016


revision-id: 515fb3a9988ad852901ab421d177b13bac4e35da (mariadb-10.2.1-9-g515fb3a)
parent(s): a7a57addeef18af080c2a220af2e3ad0d94a0784
committer: Jan Lindström
timestamp: 2016-09-07 13:34:10 +0300
message:

Fixed compiler error if INT64_MAX and INT64_MIN are not defined
and fixed test case failure on innodb-mdev-7513.

---
 mysql-test/suite/innodb/r/innodb-mdev-7513.result | 2 --
 mysql-test/suite/innodb/t/innodb-mdev-7513.test   | 4 ----
 storage/innobase/include/srv0mon.h                | 8 +++++++-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/mysql-test/suite/innodb/r/innodb-mdev-7513.result b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
index 91d6447..55b4d34 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev-7513.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
@@ -1,6 +1,5 @@
 call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
 call mtr.add_suppression("Row size too large (> 8126)*");
-set GLOBAL innodb_strict_mode=OFF;
 CREATE TABLE t1 ( text1 TEXT,
 text2 TEXT,
 text3 TEXT,
@@ -203,5 +202,4 @@ INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef
 DELETE FROM t1 WHERE text1 = 'abcdef';
 SELECT * from t1;
 text1	text2	text3	text4	text5	text6	text7	text8	text9	text10	text11	text12	text13	text14	text15	text16	text17	text18	text19	text20	text21	text22	text23	text24	text25	text26	text27	text28	text29	text30	text31	text32	text33	text34	text35	text36	text37	text38	text39	text40	text41	text42	text43	text44	text45	text46	text47	text48	text49	text50	text51	text52	text53	text54	text55	text56	text57	text58	text59	text60	text61	text62	text63	text64	text65	text66	text67	text68	text69	text70	text71	text72	text73	text74	text75	text76	text77	text78	text79	text80	text81	text82	text83	text84	text85	text86	text87	text88	text89	text90	text91	text92	text93	text94	text95	text96	text97	text98	text99	text100	text101	text102	text103	text104	text105	text106	text107	text108	text109	text110	text111	text112	text113	text114	text115	text116	text117	text118	text119	text120	text121	text122	text123	text124	text125	text126	text127	text128	text129	text130	text131	text132	text133	text134	text135	text136	text137	t
 ext138	text139	text140	text141	text142	text143	text144	text145	text146	text147	text148	text149	text150	text151	text152	text153	text154	text155	text156	text157	text158	text159	text160	text161	text162	text163	text164	text165	text166	text167	text168	text169	text170	text171	text172	text173	text174	text175	text176	text177	text178	text179	text180	text181	text182	text183	text184	text185	text186	text187	text188	text189	text190	text191	text192	text193	text194	text195	text196	text197
-set GLOBAL innodb_strict_mode=DEFAULT;
 DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7513.test b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
index cc2e7a9..88f941e 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7513.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
@@ -6,8 +6,6 @@
 call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
 call mtr.add_suppression("Row size too large (> 8126)*");
 
-set GLOBAL innodb_strict_mode=OFF;
-
 --disable_warnings
 CREATE TABLE t1 ( text1 TEXT,
 text2 TEXT,
@@ -219,7 +217,5 @@ DELETE FROM t1 WHERE text1 = 'abcdef';
 SELECT * from t1;
 --enable_warnings
 
-set GLOBAL innodb_strict_mode=DEFAULT;
-
 DROP TABLE t1;
 
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 53d0915..14c1d62 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -107,8 +107,14 @@ enum monitor_type_t {
 
 /** Counter minimum value is initialized to be max value of
  mon_type_t (int64_t) */
+#ifndef INT64_MAX
+#define INT64_MAX		(9223372036854775807LL)
+#endif
+#ifndef INT64_MIN
+#define INT64_MIN		(-9223372036854775807LL-1)
+#endif
 #define	MIN_RESERVED		INT64_MAX
-#define	MAX_RESERVED		(~MIN_RESERVED)
+#define	MAX_RESERVED		INT64_MIN
 
 /** This enumeration defines internal monitor identifier used internally
 to identify each particular counter. Its value indexes into two arrays,


More information about the commits mailing list