From 996f6194c69b556e37a143a6a175e60a9f57ab47 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sun, 15 Sep 2013 12:38:22 -0700 Subject: [PATCH 01/17] Fixed bug mdev-5015. The patch for mdev-4355 had a defect: the cached values for bitmaps of used tables were not updated when processing degenerate OR formulas. --- mysql-test/r/func_group.result | 13 +++++++++++++ mysql-test/t/func_group.test | 20 ++++++++++++++++++++ sql/sql_select.cc | 3 ++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 5fa37f577e9..ebb379dfd7e 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -2124,4 +2124,17 @@ select z from (select count(*) as z from t1) v group by 1; z 4 drop table t1; +CREATE TABLE t1 (i1 int, INDEX(i1)); +INSERT INTO t1 VALUES (9),(8); +CREATE TABLE t2 (i2 int); +INSERT INTO t2 VALUES (8),(4); +CREATE TABLE t3 (i3 int, INDEX(i3)); +INSERT INTO t3 VALUES (9),(8); +SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND ( 0 OR t3.i3 = t2.i2 ); +MAX(t3.i3) +8 +SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND t3.i3 = t2.i2; +MAX(t3.i3) +8 +DROP TABLE t1,t2,t3; # end of 5.3 tests diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 9f0d7e102da..e61962bc8a4 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -1403,4 +1403,24 @@ select z from (select count(*) as z from t1) v; select z from (select count(*) as z from t1) v group by 1; drop table t1; +# +# Bug mdev-5015: Degenerate OR condition in an aggregated join +# + +CREATE TABLE t1 (i1 int, INDEX(i1)); +INSERT INTO t1 VALUES (9),(8); + +CREATE TABLE t2 (i2 int); +INSERT INTO t2 VALUES (8),(4); + + +CREATE TABLE t3 (i3 int, INDEX(i3)); +INSERT INTO t3 VALUES (9),(8); + +SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND ( 0 OR t3.i3 = t2.i2 ); + +SELECT MAX(t3.i3) FROM t3, t2, t1 WHERE t1.i1 = t2.i2 AND t3.i3 = t2.i2; + +DROP TABLE t1,t2,t3; + --echo # end of 5.3 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e754c4eced9..7f0362e6555 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -13505,7 +13505,8 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value) { if (!(cond= remove_eq_conds(thd, cond, cond_value))) return cond; - } + } + should_fix_fields= 1; } if (should_fix_fields) cond->update_used_tables(); From 5d7b97b89ec2073bd8dffead6adb895cf1b15adc Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 16 Sep 2013 10:14:41 +0400 Subject: [PATCH 02/17] MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10') --- mysql-test/r/func_time.result | 64 +++++++++++++++++++++++++++++++++++ mysql-test/t/func_time.test | 36 ++++++++++++++++++++ sql/item_timefunc.cc | 3 +- 3 files changed, 102 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 99104136f2b..c85002d93f0 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2177,3 +2177,67 @@ Warning 1292 Truncated incorrect DECIMAL value: 'xxx' SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00'); CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00') 2001-01-01 11:20:30.12 +# +# MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10') +# +CREATE TABLE t1 AS SELECT +TIMESTAMP('2001-01-01','10:10:10'), +TIMESTAMP('2001-01-01','10:10:10.1'), +TIMESTAMP('2001-01-01','10:10:10.12'), +TIMESTAMP('2001-01-01','10:10:10.123'), +TIMESTAMP('2001-01-01','10:10:10.1234'), +TIMESTAMP('2001-01-01','10:10:10.12345'), +TIMESTAMP('2001-01-01','10:10:10.123456'), +TIMESTAMP('2001-01-01','10:10:10.1234567'); +Warnings: +Warning 1292 Truncated incorrect time value: '10:10:10.1234567' +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +TIMESTAMP('2001-01-01','10:10:10') datetime YES NULL +TIMESTAMP('2001-01-01','10:10:10.1') datetime(1) YES NULL +TIMESTAMP('2001-01-01','10:10:10.12') datetime(2) YES NULL +TIMESTAMP('2001-01-01','10:10:10.123') datetime(3) YES NULL +TIMESTAMP('2001-01-01','10:10:10.1234') datetime(4) YES NULL +TIMESTAMP('2001-01-01','10:10:10.12345') datetime(5) YES NULL +TIMESTAMP('2001-01-01','10:10:10.123456') datetime(6) YES NULL +TIMESTAMP('2001-01-01','10:10:10.1234567') datetime(6) YES NULL +SELECT * FROM t1; +TIMESTAMP('2001-01-01','10:10:10') TIMESTAMP('2001-01-01','10:10:10.1') TIMESTAMP('2001-01-01','10:10:10.12') TIMESTAMP('2001-01-01','10:10:10.123') TIMESTAMP('2001-01-01','10:10:10.1234') TIMESTAMP('2001-01-01','10:10:10.12345') TIMESTAMP('2001-01-01','10:10:10.123456') TIMESTAMP('2001-01-01','10:10:10.1234567') +2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +TIMESTAMP('2001-01-01 00:00:00','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.1','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.12','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.123','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10'), +TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10'); +Warnings: +Warning 1292 Truncated incorrect datetime value: '2001-01-01 00:00:00.1234567' +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +TIMESTAMP('2001-01-01 00:00:00','10:10:10') datetime YES NULL +TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') datetime(1) YES NULL +TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') datetime(2) YES NULL +TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') datetime(3) YES NULL +TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') datetime(4) YES NULL +TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') datetime(5) YES NULL +TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') datetime(6) YES NULL +TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10') datetime(6) YES NULL +SELECT * FROM t1; +TIMESTAMP('2001-01-01 00:00:00','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10') TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10') TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10') TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10') +2001-01-01 10:10:10 2001-01-01 10:10:10.1 2001-01-01 10:10:10.12 2001-01-01 10:10:10.123 2001-01-01 10:10:10.1234 2001-01-01 10:10:10.12345 2001-01-01 10:10:10.123456 2001-01-01 10:10:10.123456 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +TIMESTAMP('00:00:00','10:10:10'), +TIMESTAMP(TIME('00:00:00'),'10:10:10'); +SHOW COLUMNS FROM t1; +Field Type Null Key Default Extra +TIMESTAMP('00:00:00','10:10:10') datetime YES NULL +TIMESTAMP(TIME('00:00:00'),'10:10:10') datetime YES NULL +SELECT * FROM t1; +TIMESTAMP('00:00:00','10:10:10') TIMESTAMP(TIME('00:00:00'),'10:10:10') +NULL NULL +DROP TABLE t1; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index aba78b92c3e..4a3d74317c4 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1321,3 +1321,39 @@ SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL -1.12345 SECOND); SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL -1.123456 SECOND); SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL 'xxx' SECOND); SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00'); + +--echo # +--echo # MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10') +--echo # +CREATE TABLE t1 AS SELECT + TIMESTAMP('2001-01-01','10:10:10'), + TIMESTAMP('2001-01-01','10:10:10.1'), + TIMESTAMP('2001-01-01','10:10:10.12'), + TIMESTAMP('2001-01-01','10:10:10.123'), + TIMESTAMP('2001-01-01','10:10:10.1234'), + TIMESTAMP('2001-01-01','10:10:10.12345'), + TIMESTAMP('2001-01-01','10:10:10.123456'), + TIMESTAMP('2001-01-01','10:10:10.1234567'); +SHOW COLUMNS FROM t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT + TIMESTAMP('2001-01-01 00:00:00','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.1','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.12','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.123','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.1234','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.12345','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.123456','10:10:10'), + TIMESTAMP('2001-01-01 00:00:00.1234567','10:10:10'); +SHOW COLUMNS FROM t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT + TIMESTAMP('00:00:00','10:10:10'), + TIMESTAMP(TIME('00:00:00'),'10:10:10'); +SHOW COLUMNS FROM t1; +SELECT * FROM t1; +DROP TABLE t1; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 1f6bff6fa6c..37a9a42f392 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2435,7 +2435,8 @@ void Item_func_add_time::fix_length_and_dec() arg0_field_type= args[0]->field_type(); if (arg0_field_type == MYSQL_TYPE_DATE || arg0_field_type == MYSQL_TYPE_DATETIME || - arg0_field_type == MYSQL_TYPE_TIMESTAMP) + arg0_field_type == MYSQL_TYPE_TIMESTAMP || + is_date) { cached_field_type= MYSQL_TYPE_DATETIME; decimals= max(args[0]->temporal_precision(MYSQL_TYPE_DATETIME), From 6c9d98328716795bc9ce04d7c3e013de345ee784 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 16 Sep 2013 13:03:49 +0400 Subject: [PATCH 03/17] MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) Adding a test case only. The problem was fixed by: MDEV-4724 Some temporal functions do not preserve microseconds modified: mysql-test/r/func_time.result mysql-test/t/func_time.test --- mysql-test/r/func_time.result | 6 ++++++ mysql-test/t/func_time.test | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index c85002d93f0..eec9a4e7ea3 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2241,3 +2241,9 @@ SELECT * FROM t1; TIMESTAMP('00:00:00','10:10:10') TIMESTAMP(TIME('00:00:00'),'10:10:10') NULL NULL DROP TABLE t1; +# +# MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) +# +SELECT MAKETIME(0, 0, -0.1); +MAKETIME(0, 0, -0.1) +NULL diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 4a3d74317c4..87be964cd7e 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1357,3 +1357,9 @@ CREATE TABLE t1 AS SELECT SHOW COLUMNS FROM t1; SELECT * FROM t1; DROP TABLE t1; + +--echo # +--echo # MDEV-4869 Wrong result of MAKETIME(0, 0, -0.1) +--echo # +SELECT MAKETIME(0, 0, -0.1); + From 22c4a2496171416960058b3c25d2bbee3f6fc6cf Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 16 Sep 2013 13:52:13 +0400 Subject: [PATCH 04/17] MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types Adding test cases from the bug report only. The problem was earlier fixed by: MDEV-4863 COALESCE(time_or_datetime) returns wrong results in numeric context modified: mysql-test/r/func_time.result mysql-test/t/func_time.test --- mysql-test/r/func_time.result | 50 +++++++++++++++++++++++++++++++++++ mysql-test/t/func_time.test | 24 +++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index eec9a4e7ea3..8aba949ad55 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2033,6 +2033,56 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; # +# MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types +# +CREATE TABLE t1 (dt2 DATETIME(2), t3 TIME(3), d DATE); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00.12', '00:00:00.567', '2002-01-01'); +SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; +CASE WHEN 0 THEN dt2 ELSE t3 END +0000-00-00 00:00:00.567 +CREATE TABLE t2 AS SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; +SELECT * FROM t2; +CASE WHEN 0 THEN dt2 ELSE t3 END +0000-00-00 00:00:00.567 +SHOW COLUMNS FROM t2; +Field Type Null Key Default Extra +CASE WHEN 0 THEN dt2 ELSE t3 END datetime(3) YES NULL +DROP TABLE t2; +SELECT CASE WHEN 1 THEN dt2 ELSE t3 END FROM t1; +CASE WHEN 1 THEN dt2 ELSE t3 END +2001-01-01 00:00:00.120 +SELECT CONCAT(CASE WHEN 1 THEN dt2 ELSE t3 END) FROM t1; +CONCAT(CASE WHEN 1 THEN dt2 ELSE t3 END) +2001-01-01 00:00:00.120 +SELECT CONCAT(CASE WHEN 0 THEN t3 ELSE dt2 END) FROM t1; +CONCAT(CASE WHEN 0 THEN t3 ELSE dt2 END) +2001-01-01 00:00:00.120 +SELECT CONCAT(CASE WHEN 1 THEN d ELSE t3 END) FROM t1; +CONCAT(CASE WHEN 1 THEN d ELSE t3 END) +2002-01-01 00:00:00.000 +SELECT CASE WHEN 1 THEN t3 ELSE d END FROM t1; +CASE WHEN 1 THEN t3 ELSE d END +0000-00-00 00:00:00.567 +SELECT COALESCE(d, t3) FROM t1; +COALESCE(d, t3) +2002-01-01 00:00:00.000 +SELECT CONCAT(COALESCE(d, t3)) FROM t1; +CONCAT(COALESCE(d, t3)) +2002-01-01 00:00:00.000 +SELECT COALESCE(dt2, t3) FROM t1; +COALESCE(dt2, t3) +2001-01-01 00:00:00.120 +SELECT CONCAT(COALESCE(dt2, t3)) FROM t1; +CONCAT(COALESCE(dt2, t3)) +2001-01-01 00:00:00.120 +SELECT IFNULL(dt2, t3), CONCAT(IFNULL(dt2, t3)) FROM t1; +IFNULL(dt2, t3) CONCAT(IFNULL(dt2, t3)) +2001-01-01 00:00:00.120 2001-01-01 00:00:00.120 +SELECT IFNULL(d, t3), CONCAT(IFNULL(d, t3)) FROM t1; +IFNULL(d, t3) CONCAT(IFNULL(d, t3)) +2002-01-01 00:00:00.000 2002-01-01 00:00:00.000 +DROP TABLE t1; +# # MDEV-4724 Some temporal functions do not preserve microseconds # SELECT MAKETIME(10,10,10.231); diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 87be964cd7e..62df3221723 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1257,6 +1257,30 @@ SHOW CREATE TABLE t1; DROP TABLE t1; +--echo # +--echo # MDEV-4870 Wrong values of CASE, COALESCE, IFNULL on a combination of different temporal types +--echo # +CREATE TABLE t1 (dt2 DATETIME(2), t3 TIME(3), d DATE); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00.12', '00:00:00.567', '2002-01-01'); +SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; +CREATE TABLE t2 AS SELECT CASE WHEN 0 THEN dt2 ELSE t3 END FROM t1; +SELECT * FROM t2; +SHOW COLUMNS FROM t2; +DROP TABLE t2; +SELECT CASE WHEN 1 THEN dt2 ELSE t3 END FROM t1; +SELECT CONCAT(CASE WHEN 1 THEN dt2 ELSE t3 END) FROM t1; +SELECT CONCAT(CASE WHEN 0 THEN t3 ELSE dt2 END) FROM t1; +SELECT CONCAT(CASE WHEN 1 THEN d ELSE t3 END) FROM t1; +SELECT CASE WHEN 1 THEN t3 ELSE d END FROM t1; +SELECT COALESCE(d, t3) FROM t1; +SELECT CONCAT(COALESCE(d, t3)) FROM t1; +SELECT COALESCE(dt2, t3) FROM t1; +SELECT CONCAT(COALESCE(dt2, t3)) FROM t1; +SELECT IFNULL(dt2, t3), CONCAT(IFNULL(dt2, t3)) FROM t1; +SELECT IFNULL(d, t3), CONCAT(IFNULL(d, t3)) FROM t1; +DROP TABLE t1; + + --echo # --echo # MDEV-4724 Some temporal functions do not preserve microseconds --echo # From 5464e904b6db84cbbdc7aeb90fbb2115166d432f Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 16 Sep 2013 14:07:01 +0400 Subject: [PATCH 05/17] MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision Adding tests only. The problem was earlier fixed by MDEV-4724 Some temporal functions do not preserve microseconds --- mysql-test/r/func_time.result | 23 +++++++++++++++++++++++ mysql-test/t/func_time.test | 18 ++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 8aba949ad55..645733a3dc0 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2228,6 +2228,29 @@ SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00'); CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00') 2001-01-01 11:20:30.12 # +# MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision +# +CREATE TABLE t1 (t0 TIME); +INSERT INTO t1 VALUES ('00:00:00'); +SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +t0 + INTERVAL 1.1 SECOND +00:00:01.1 +CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +SHOW COLUMNS FROM t2; +Field Type Null Key Default Extra +t0 + INTERVAL 1.1 SECOND time(1) YES NULL +DROP TABLE t1,t2; +CREATE TABLE t1 (t0 DATETIME); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +t0 + INTERVAL 1.1 SECOND +2001-01-01 00:00:01.1 +CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +SHOW COLUMNS FROM t2; +Field Type Null Key Default Extra +t0 + INTERVAL 1.1 SECOND datetime(1) YES NULL +DROP TABLE t1, t2; +# # MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10') # CREATE TABLE t1 AS SELECT diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 62df3221723..72efff02699 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1346,6 +1346,24 @@ SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL -1.123456 SECOND); SELECT DATE_ADD('2001-01-01 00:00:00', INTERVAL 'xxx' SECOND); SELECT CONVERT_TZ('2001-01-01 10:20:30.12','+00:00','+01:00'); +--echo # +--echo # MDEV-4861 TIME/DATETIME arithmetics does not preserve INTERVAL precision +--echo # +CREATE TABLE t1 (t0 TIME); +INSERT INTO t1 VALUES ('00:00:00'); +SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +SHOW COLUMNS FROM t2; +DROP TABLE t1,t2; + +CREATE TABLE t1 (t0 DATETIME); +INSERT INTO t1 VALUES ('2001-01-01 00:00:00'); +SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +CREATE TABLE t2 AS SELECT t0 + INTERVAL 1.1 SECOND FROM t1; +SHOW COLUMNS FROM t2; +DROP TABLE t1, t2; + + --echo # --echo # MDEV-4843 Wrong data type for TIMESTAMP('2001-01-01','10:10:10') --echo # From 779003e18073332a73ed185410f95acc1ef85094 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 16 Sep 2013 16:03:55 +0400 Subject: [PATCH 06/17] backport from 10.0 mtr can crash occasionally. This happens when mtr sends to a child mtr process (or vice-versa) a packet, that gets truncated or, perhaps, split in two. Then the other side cannot deserialize it and fails as above. --- mysql-test/lib/My/Test.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/lib/My/Test.pm b/mysql-test/lib/My/Test.pm index 012e5f6d81e..6fe169398ca 100644 --- a/mysql-test/lib/My/Test.pm +++ b/mysql-test/lib/My/Test.pm @@ -70,7 +70,7 @@ sub write_test { my $serialized= Storable::freeze($test); $serialized =~ s/([\x0d\x0a\\])/sprintf("\\%02x", ord($1))/eg; - print $sock $header, "\n", $serialized, "\n"; + send $sock,$header. "\n". $serialized. "\n", 0; } From f7f7f37fed575da54d9e7ca053b65cfcb545082e Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 17 Sep 2013 13:49:49 +0400 Subject: [PATCH 07/17] Fixed jemalloc with ccache build failure. --- cmake/jemalloc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake index 50aa7768317..54e69da5a28 100644 --- a/cmake/jemalloc.cmake +++ b/cmake/jemalloc.cmake @@ -11,7 +11,7 @@ MACRO (USE_BUNDLED_JEMALLOC) SET(SOURCE_DIR "${CMAKE_SOURCE_DIR}/extra/jemalloc") SET(BINARY_DIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/extra/jemalloc/build") SET(LIBJEMALLOC "libjemalloc") - SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence") + SET(JEMALLOC_CONFIGURE_OPTS "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}" "--with-private-namespace=jemalloc_internal_" "--enable-cc-silence") IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT APPLE) # see the comment in CMakeLists.txt LIST(APPEND JEMALLOC_CONFIGURE_OPTS --enable-debug) ENDIF() From 8e9cead3653409972c1d9e0e3406f718ff67a439 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 17 Sep 2013 17:37:03 +0400 Subject: [PATCH 08/17] Fixed tokudb with ccache build failure. --- storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake b/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake index 212e378bca3..7436a4454c3 100644 --- a/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake +++ b/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake @@ -7,7 +7,7 @@ if (APPLE) list(APPEND xz_configure_opts --disable-assembler) endif () -list(APPEND xz_configure_opts CC=${CMAKE_C_COMPILER}) +list(APPEND xz_configure_opts "CC=${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}") if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL drd) list(APPEND xz_configure_opts --enable-debug) endif () From 69324831a47c93006c82b7bd4d48ec7b33c716b3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 17 Sep 2013 17:07:45 +0200 Subject: [PATCH 09/17] mariadb-tokudb-engine deb package is not architecture-independent --- debian/dist/Debian/control | 2 +- debian/dist/Ubuntu/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index d2a946326ed..77021cad411 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -240,7 +240,7 @@ Description: MariaDB database regression test suite (metapackage depending on th Package: mariadb-tokudb-engine-5.5 Section: database -Architecture: all +Architecture: any Depends: mariadb-server-5.5 Description: TokuDB storage engine for MariaDB TokuDB is a highly scalable, zero maintenance downtime, ACID and MVCC diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index ebf1e56e7cb..97dec4b3774 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -234,7 +234,7 @@ Description: MariaDB database regression test suite (metapackage depending on th Package: mariadb-tokudb-engine-5.5 Section: database -Architecture: all +Architecture: any Depends: mariadb-server-5.5 Description: TokuDB storage engine for MariaDB TokuDB is a highly scalable, zero maintenance downtime, ACID and MVCC From a5d7e701196052f4a6605f465953098eba37a7aa Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 Sep 2013 09:09:27 +0200 Subject: [PATCH 10/17] MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release don't set TABLE_SHARE::keys before TABLE_SHARE::key_info is set, otherwise an error might leave only the first property set and it will confuse TABLE_SHARE::destroy() --- mysql-test/r/bad_frm_crash_5029.result | 2 ++ mysql-test/std_data/mdev5029.frm | Bin 0 -> 8602 bytes mysql-test/t/bad_frm_crash_5029.test | 11 +++++++++++ sql/table.cc | 13 ++++++++----- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 mysql-test/r/bad_frm_crash_5029.result create mode 100644 mysql-test/std_data/mdev5029.frm create mode 100644 mysql-test/t/bad_frm_crash_5029.test diff --git a/mysql-test/r/bad_frm_crash_5029.result b/mysql-test/r/bad_frm_crash_5029.result new file mode 100644 index 00000000000..7a829c8f6ba --- /dev/null +++ b/mysql-test/r/bad_frm_crash_5029.result @@ -0,0 +1,2 @@ +show create table t1; +ERROR 42000: Unknown storage engine 'InnoDB' diff --git a/mysql-test/std_data/mdev5029.frm b/mysql-test/std_data/mdev5029.frm new file mode 100644 index 0000000000000000000000000000000000000000..de169a20953f461ded62d4ec0449f15cd14693fe GIT binary patch literal 8602 zcmeI&Jr06E5C!13vq)4Vu`o6^SlWm;AQ~Gxub{*hufRFHj~DSE;w(Rsm|!f4dDCq6 zu@Lr4Xoh{7(Zm8%18jhY4e>5nV+ah~T*s;&y7qF{^-U1RK-5e)Qh)*!pa2CZKmiI+ zfC3bt00k(}O92tU#}*#60|1ljbdh`SKytqdic@hedbtC>6a^^IE%5Qx`Z#3Sb-(Mr zfmbL%0SZun0u-PC1t>s)KNYx{_Fw*=Zt?533@j2Xbxqiwa=;OD&0Qt%tjt!?kEMMS qIq8`RIcrx%Qg{*sD0?dUEbER_xS;H*)Pe7Uv1_u_LD^|Z3%mdjy&kmy literal 0 HcmV?d00001 diff --git a/mysql-test/t/bad_frm_crash_5029.test b/mysql-test/t/bad_frm_crash_5029.test new file mode 100644 index 00000000000..b15c37fbc6d --- /dev/null +++ b/mysql-test/t/bad_frm_crash_5029.test @@ -0,0 +1,11 @@ +# +# MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release +# +# a.k.a. fail to open an frm with indexes: + +let $datadir=`select @@datadir`; +copy_file std_data/mdev5029.frm $datadir/test/t1.frm; +--error ER_UNKNOWN_STORAGE_ENGINE +show create table t1; +remove_file $datadir/test/t1.frm; + diff --git a/sql/table.cc b/sql/table.cc index 43cbfb7ca56..9e71680652a 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -890,6 +890,9 @@ static bool create_key_infos(uchar *strpos, uint keys, KEY *keyinfo, uint new_fr DBUG_ASSERT(test(keyinfo->flags & HA_USES_COMMENT) == (keyinfo->comment.length > 0)); } + + share->keys= keys; // do it *after* all key_info's are initialized + return 0; } @@ -1020,12 +1023,12 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, goto err; /* purecov: inspected */ if (disk_buff[0] & 0x80) { - share->keys= keys= (disk_buff[1] << 7) | (disk_buff[0] & 0x7f); + keys= (disk_buff[1] << 7) | (disk_buff[0] & 0x7f); share->key_parts= key_parts= uint2korr(disk_buff+2); } else { - share->keys= keys= disk_buff[0]; + keys= disk_buff[0]; share->key_parts= key_parts= disk_buff[1]; } share->keys_for_keyread.init(0); @@ -1283,7 +1286,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, share->comment.length); } - DBUG_PRINT("info",("i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d vcol_screen_length: %d", interval_count,interval_parts, share->keys,n_length,int_length, com_length, vcol_screen_length)); + DBUG_PRINT("info",("i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d vcol_screen_length: %d", interval_count,interval_parts, keys,n_length,int_length, com_length, vcol_screen_length)); if (!(field_ptr = (Field **) @@ -1671,7 +1674,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, } } - for (uint key=0 ; key < share->keys ; key++,keyinfo++) + for (uint key=0 ; key < keys ; key++,keyinfo++) { uint usable_parts= 0; keyinfo->name=(char*) share->keynames.type_names[key]; @@ -1945,7 +1948,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, { reg_field= *share->found_next_number_field; if ((int) (share->next_number_index= (uint) - find_ref_key(share->key_info, share->keys, + find_ref_key(share->key_info, keys, share->default_values, reg_field, &share->next_number_key_offset, &share->next_number_keypart)) < 0) From 197bdbae4db78ba65f3668803bebd3c4a4509ae5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 Sep 2013 10:30:23 +0200 Subject: [PATCH 11/17] fix upgrades when mariadb-galera-server-5.5 is installed --- debian/dist/Debian/control | 4 ++-- debian/dist/Ubuntu/control | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index 77021cad411..c66ffedfd1a 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -14,7 +14,7 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -169,7 +169,7 @@ Architecture: any Depends: mariadb-server-5.5 (= ${source:Version}), mariadb-client-5.5 (= ${source:Version}) Conflicts: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, - mariadb-server-5.5 (<< 5.5.33) + mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Replaces: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3 Description: MariaDB database regression test suite diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 97dec4b3774..8eb5f4537ac 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -14,7 +14,7 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query @@ -163,7 +163,7 @@ Architecture: any Depends: mariadb-server-5.5 (= ${source:Version}), mariadb-client-5.5 (= ${source:Version}) Conflicts: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3, - mariadb-server-5.5 (<< 5.5.33) + mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) Replaces: mariadb-test (<< ${source:Version}), mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3 Description: MariaDB database regression test suite From f89e6c442cea2d6f220afe55284520ce26362729 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 Sep 2013 17:25:10 +0200 Subject: [PATCH 12/17] MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release Don't fail when an frm is inconsistent (legacy DB_TYPE_xxx code doesn't match the engine name), use the engine name, ignore the legacy code. --- mysql-test/r/bad_frm_crash_5029.result | 11 +++++++++++ .../std_data/{mdev5029.frm => mdev5029_1.frm} | Bin mysql-test/std_data/mdev5029_2.MAD | Bin 0 -> 8192 bytes mysql-test/std_data/mdev5029_2.MAI | Bin 0 -> 8192 bytes mysql-test/std_data/mdev5029_2.frm | Bin 0 -> 8602 bytes mysql-test/t/bad_frm_crash_5029.test | 11 ++++++++++- sql/table.cc | 5 ++++- 7 files changed, 25 insertions(+), 2 deletions(-) rename mysql-test/std_data/{mdev5029.frm => mdev5029_1.frm} (100%) create mode 100644 mysql-test/std_data/mdev5029_2.MAD create mode 100644 mysql-test/std_data/mdev5029_2.MAI create mode 100644 mysql-test/std_data/mdev5029_2.frm diff --git a/mysql-test/r/bad_frm_crash_5029.result b/mysql-test/r/bad_frm_crash_5029.result index 7a829c8f6ba..8aa0065f5ee 100644 --- a/mysql-test/r/bad_frm_crash_5029.result +++ b/mysql-test/r/bad_frm_crash_5029.result @@ -1,2 +1,13 @@ show create table t1; ERROR 42000: Unknown storage engine 'InnoDB' +call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria"); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + KEY `a` (`a`), + KEY `b` (`b`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +drop table t1; diff --git a/mysql-test/std_data/mdev5029.frm b/mysql-test/std_data/mdev5029_1.frm similarity index 100% rename from mysql-test/std_data/mdev5029.frm rename to mysql-test/std_data/mdev5029_1.frm diff --git a/mysql-test/std_data/mdev5029_2.MAD b/mysql-test/std_data/mdev5029_2.MAD new file mode 100644 index 0000000000000000000000000000000000000000..3dcc005ec0d03681b402e75f595130e784a4a5d5 GIT binary patch literal 8192 zcmeIu0Sy2E3<4nghrZ_c1`$XwV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* J20jm5+W{%^1N;C0 literal 0 HcmV?d00001 diff --git a/mysql-test/std_data/mdev5029_2.MAI b/mysql-test/std_data/mdev5029_2.MAI new file mode 100644 index 0000000000000000000000000000000000000000..3533a1d705a05c79c5b916f4cd33952bc89de6a4 GIT binary patch literal 8192 zcmeH^KZ*h|6vn?~GB^VYYrRcCFJWV=jUd+EVJmB4i(L!B3s`svD+?PB;Q_pd`Xw`i z&LFbw!uOcu{rU3VgkP@LJZW3o#u>k+1q*%|k_0pZEP72BgjaSet*-ept$ba5m)%fJ zZ2GEeHaH#2I9~TDua5lLufHcl|JA*04!hNU`_nHP{fqwjlJ^-kgbwo$t`^rPR}b+< zjDk0TB;esv8$y1*I3LQ-W(>w2$dMv<86N|f!f|H{x0)KtrJ9D2X81c7&%?$JR?AOa#F0wN#+A|L`HAOa#F0wN#+A|L`HAOa#F0wN#+A|L`H MAOa#F0{@M`9i7EFNB{r; literal 0 HcmV?d00001 diff --git a/mysql-test/std_data/mdev5029_2.frm b/mysql-test/std_data/mdev5029_2.frm new file mode 100644 index 0000000000000000000000000000000000000000..d7eb677fea780d987ffb29915b2b999306fb9e38 GIT binary patch literal 8602 zcmeI&O$x#=5C!0uNi1rqbRlls)TId48;CdX3bnX!>j`=e@8d;!5bLCWf>7vErP3Q&Lo z6rcbFC_sUq6c7OdoZz4x0GL9j>%#Sc6hRYIS#_y?@&w!z1t>5q@O5kTZr^X&@N#~k z00k&O0SZun0u-PC1^!mxVG#fA;YJ+Hz~YFFu8cmf9B{@;b6-a|E6Z&%vb2vPnZB8j li*{8chm$Zw-BZzjS^u2E2X#-S4FVs`eUqgP>P|~u;SFZO9y0&{ literal 0 HcmV?d00001 diff --git a/mysql-test/t/bad_frm_crash_5029.test b/mysql-test/t/bad_frm_crash_5029.test index b15c37fbc6d..858922886ab 100644 --- a/mysql-test/t/bad_frm_crash_5029.test +++ b/mysql-test/t/bad_frm_crash_5029.test @@ -4,8 +4,17 @@ # a.k.a. fail to open an frm with indexes: let $datadir=`select @@datadir`; -copy_file std_data/mdev5029.frm $datadir/test/t1.frm; + +# normal innodb table (but innodb is disabled here) +copy_file std_data/mdev5029_1.frm $datadir/test/t1.frm; --error ER_UNKNOWN_STORAGE_ENGINE show create table t1; remove_file $datadir/test/t1.frm; +# Aria table, incorrect typecode +call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria"); +copy_file std_data/mdev5029_2.frm $datadir/test/t1.frm; +copy_file std_data/mdev5029_2.MAI $datadir/test/t1.MAI; +copy_file std_data/mdev5029_2.MAD $datadir/test/t1.MAD; +show create table t1; +drop table t1; diff --git a/sql/table.cc b/sql/table.cc index 9e71680652a..15fbe867c15 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1093,7 +1093,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, plugin_data(tmp_plugin, handlerton *))) { /* bad file, legacy_db_type did not match the name */ - goto err; + sql_print_warning("%s.frm is inconsistent: engine typecode %d, engine name %s (%d)", + share->normalized_path.str, legacy_db_type, + plugin_name(tmp_plugin)->str, + ha_legacy_type(plugin_data(tmp_plugin, handlerton *))); } /* tmp_plugin is locked with a local lock. From cd077ca8396c369ded7df822e700714da1e13aa3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:00 +0200 Subject: [PATCH 13/17] MDEV-5026 cannot use system jemalloc --- cmake/jemalloc.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake index 54e69da5a28..5cb9c493a20 100644 --- a/cmake/jemalloc.cmake +++ b/cmake/jemalloc.cmake @@ -30,14 +30,23 @@ MACRO (USE_BUNDLED_JEMALLOC) ENDMACRO() SET(WITH_JEMALLOC "yes" CACHE STRING - "Which jemalloc to use (possible values are 'no', 'bundled', 'yes' (same as bundled)") -#"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") + "Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") MACRO (CHECK_JEMALLOC) IF(WIN32) SET(WITH_JEMALLOC "no") ENDIF() - IF(WITH_JEMALLOC STREQUAL "bundled" OR WITH_JEMALLOC STREQUAL "yes") + IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes") + CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC) + IF (HAVE_JEMALLOC) + SET(LIBJEMALLOC jemalloc) + ELSEIF (WITH_JEMALLOC STREQUAL "system") + MESSAGE(FATAL_ERROR "system jemalloc is not found") + ELSEIF (WITH_JEMALLOC STREQUAL "yes") + SET(trybundled 1) + ENDIF() + ENDIF() + IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled) USE_BUNDLED_JEMALLOC() ENDIF() ENDMACRO() From 43f4e364f0dc818d2d39881a765fe4fce0813f79 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:10 +0200 Subject: [PATCH 14/17] MDEV-5021 tokudb ft-index libraries are build with -DWITHOUT_TOKUDB=1 --- storage/tokudb/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index fb6cfeb2aec..716af3f9ba6 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -1,6 +1,7 @@ # ft-index only supports x86-64 and cmake-2.8.9+ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND - NOT CMAKE_VERSION VERSION_LESS "2.8.9") + NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND + NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE) CHECK_CXX_SOURCE_COMPILES( " struct a {int b; int c; }; From 93b7d00f006b7ff770e65f6f70ebe5526aa111ba Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:17 +0200 Subject: [PATCH 15/17] MDEV-5035 debian package conflict libmariadbclient18 5.5.33+maria-1~wheezy vs. mariadb-server-5.3 5.3.12-mariadb122~wheezy --- debian/dist/Debian/control | 3 ++- debian/dist/Ubuntu/control | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index c66ffedfd1a..38868478abd 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -14,7 +14,8 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 8eb5f4537ac..de7b2405676 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -14,7 +14,8 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query From 6e52631065b3ef01c9c3e4adb286f66c3d1abbfb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 22:24:39 +0200 Subject: [PATCH 16/17] MDEV-4979 mysqld_safe section in my.cnf doesn't have mariadb equivalent read also [mariadb_safe] section. modify the manpage accordingly (and remove a netware-specific option from it) --- man/mysqld_safe.1 | 42 ++++-------------------------------------- scripts/mysqld_safe.sh | 2 +- 2 files changed, 5 insertions(+), 39 deletions(-) diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 7cd68e01c7d..25848aecb9c 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -83,15 +83,15 @@ Options unknown to are passed to \fBmysqld\fR if they are specified on the command line, but ignored if they are specified in the -[mysqld_safe] -group of an option file\&. See +[mysqld_safe] or [mariadb_safe] +groups of an option file\&. See Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&. .PP \fBmysqld_safe\fR reads all options from the [mysqld], -[server], and -[mysqld_safe] +[server], +[mysqld_safe], and [mariadb_safe] sections in option files\&. For example, if you specify a [mysqld] section like this, @@ -146,40 +146,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: autoclose option -.\" autoclose option: mysqld_safe -\fB\-\-autoclose\fR -.sp -(NetWare only) On NetWare, -\fBmysqld_safe\fR -provides a screen presence\&. When you unload (shut down) the -\fBmysqld_safe\fR -NLM, the screen does not by default go away\&. Instead, it prompts for user input: -.sp -.if n \{\ -.RS 4 -.\} -.nf -** -.fi -.if n \{\ -.RE -.\} -.sp -If you want NetWare to close the screen automatically instead, use the -\fB\-\-autoclose\fR -option to -\fBmysqld_safe\fR\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .\" mysqld_safe: basedir option .\" basedir option: mysqld_safe \fB\-\-basedir=\fR\fB\fIpath\fR\fR diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 572a08781c8..3c63acddc0c 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -509,7 +509,7 @@ then SET_USER=0 fi -parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` +parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe` parse_arguments PICK-ARGS-FROM-ARGV "$@" From 28ec372744e6dbeab9ecae7a3a9a7ef23b0866d5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 22:24:59 +0200 Subject: [PATCH 17/17] 5.5.33a --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b44efde92ba..ed0c4b57704 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=33 -MYSQL_VERSION_EXTRA= +MYSQL_VERSION_EXTRA=a