diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-03-17 15:04:38 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-03-17 15:04:38 +0200 |
commit | 6e58d5ab6a42f22f9c705faea83fbc8889d429c3 (patch) | |
tree | 1695b1b6e214c7380b848194c479366ff0c0636b /mysql-test/main | |
parent | fc18f9c9ec15035894154fb7dcdd85caac73cfc2 (diff) | |
parent | 4c355d4e81ac009abcfb94df4285d48c5229f958 (diff) | |
download | mariadb-git-6e58d5ab6a42f22f9c705faea83fbc8889d429c3.tar.gz |
Merge 11.0 into 11.1
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 17 | ||||
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.test | 21 | ||||
-rw-r--r-- | mysql-test/main/locale.result | 10 | ||||
-rw-r--r-- | mysql-test/main/locale.test | 15 | ||||
-rw-r--r-- | mysql-test/main/partition_charset.result | 21 | ||||
-rw-r--r-- | mysql-test/main/partition_charset.test | 20 | ||||
-rw-r--r-- | mysql-test/main/partition_innodb2.result | 24 | ||||
-rw-r--r-- | mysql-test/main/partition_innodb2.test | 30 | ||||
-rw-r--r-- | mysql-test/main/partition_utf8-debug.result | 2 | ||||
-rw-r--r-- | mysql-test/main/selectivity_innodb.result | 9 | ||||
-rw-r--r-- | mysql-test/main/selectivity_innodb.test | 9 | ||||
-rw-r--r-- | mysql-test/main/variables.result | 10 | ||||
-rw-r--r-- | mysql-test/main/variables.test | 5 |
13 files changed, 185 insertions, 8 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index fd3530b1688..544c8ace7b7 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -22610,3 +22610,20 @@ id select_type table type possible_keys key key_len ref rows Extra drop view v1; drop table t1; # End of 10.4 tests +# +# MDEV-28958: condition pushable into view after simplification +# contains constant TRUE/FALSE as subformula +# +create table t1 (c1 int); +insert into t1 values (3), (7), (1), (3), (1), (3); +create table t2 (c2 int); +insert into t2 values (3), (5), (7), (3); +create view v1 as select * from t1 group by c1; +create view v2 as select c1 as a, c2 as b from v1,t2 where c1=c2; +select * from v2 group by a,b having a=b or b > a+10; +a b +3 3 +7 7 +drop view v1,v2; +drop table t1,t2; +# End of 10.7 tests diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index 47c1f9c20f2..d77e0210eae 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -4144,3 +4144,24 @@ drop view v1; drop table t1; --echo # End of 10.4 tests + +--echo # +--echo # MDEV-28958: condition pushable into view after simplification +--echo # contains constant TRUE/FALSE as subformula +--echo # + +create table t1 (c1 int); +insert into t1 values (3), (7), (1), (3), (1), (3); + +create table t2 (c2 int); +insert into t2 values (3), (5), (7), (3); + +create view v1 as select * from t1 group by c1; +create view v2 as select c1 as a, c2 as b from v1,t2 where c1=c2; + +select * from v2 group by a,b having a=b or b > a+10; + +drop view v1,v2; +drop table t1,t2; + +--echo # End of 10.7 tests diff --git a/mysql-test/main/locale.result b/mysql-test/main/locale.result index d29482ceffa..39f11053df6 100644 --- a/mysql-test/main/locale.result +++ b/mysql-test/main/locale.result @@ -306,3 +306,13 @@ date_format('2001-01-06', '%w %a %W', 'de_CH') select date_format('2001-09-01', '%c %b %M', 'de_CH'); date_format('2001-09-01', '%c %b %M', 'de_CH') 9 Sep September +# +# MDEV-30789 Add Georgian error messages and locale +# +SET lc_messages=ka_GE; +SELECT x; +ERROR 42S22: უცნობი სვეტი 'x' 'field list'-ში +SET lc_messages=DEFAULT; +# +# End of 10.11 tests +# diff --git a/mysql-test/main/locale.test b/mysql-test/main/locale.test index a9a507bc387..9f4ceb270d9 100644 --- a/mysql-test/main/locale.test +++ b/mysql-test/main/locale.test @@ -181,3 +181,18 @@ select date_format('2001-10-01', '%c %b %M', 'rm_CH'); select date_format('2001-12-01', '%c %b %M', 'rm_CH'); select date_format('2001-01-06', '%w %a %W', 'de_CH'); select date_format('2001-09-01', '%c %b %M', 'de_CH'); + + +--echo # +--echo # MDEV-30789 Add Georgian error messages and locale +--echo # + +SET lc_messages=ka_GE; +--error ER_BAD_FIELD_ERROR +SELECT x; + +SET lc_messages=DEFAULT; + +--echo # +--echo # End of 10.11 tests +--echo # diff --git a/mysql-test/main/partition_charset.result b/mysql-test/main/partition_charset.result index f8f75e8bee7..a0019dd8fc3 100644 --- a/mysql-test/main/partition_charset.result +++ b/mysql-test/main/partition_charset.result @@ -20,3 +20,24 @@ create table t1 (a varchar(1), primary key (a)) partition by list (ascii(a)) (partition p1 values in (65)); ERROR HY000: This partition function is not allowed +# +# Start of 10.9 tests +# +# +# MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert +# +CREATE TABLE t1 (a CHAR CHARACTER SET ucs2) +PARTITION BY RANGE COLUMNS (a) +(PARTITION p0 VALUES LESS THAN ('a')); +ALTER TABLE t1 CHANGE COLUMN a a CHAR BINARY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(1) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci + PARTITION BY RANGE COLUMNS(`a`) +(PARTITION `p0` VALUES LESS THAN ('a') ENGINE = MyISAM) +DROP TABLE t1; +# +# End of 10.9 tests +# diff --git a/mysql-test/main/partition_charset.test b/mysql-test/main/partition_charset.test index 6842e5268fa..b8a17ce4fca 100644 --- a/mysql-test/main/partition_charset.test +++ b/mysql-test/main/partition_charset.test @@ -27,3 +27,23 @@ partition by list (ascii(a)) #insert into t1 values ('A'); #replace into t1 values ('A'); #drop table t1; + +--echo # +--echo # Start of 10.9 tests +--echo # + +--echo # +--echo # MDEV-30805 SIGSEGV in my_convert and UBSAN: member access within null pointer of type 'const struct MY_CHARSET_HANDLER' in my_convert +--echo # + +CREATE TABLE t1 (a CHAR CHARACTER SET ucs2) + PARTITION BY RANGE COLUMNS (a) + (PARTITION p0 VALUES LESS THAN ('a')); +ALTER TABLE t1 CHANGE COLUMN a a CHAR BINARY; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +--echo # +--echo # End of 10.9 tests +--echo # + diff --git a/mysql-test/main/partition_innodb2.result b/mysql-test/main/partition_innodb2.result new file mode 100644 index 00000000000..4476eb91447 --- /dev/null +++ b/mysql-test/main/partition_innodb2.result @@ -0,0 +1,24 @@ +# +# MDEV-30442: Assertion `!m_innodb' failed in ha_partition::cmp_ref on MULTI-DELETE +# +create table t1 (a int) engine=innodb; +insert into t1 values (1),(2),(1),(2); +create table t2 ( +a int, +b int, +key(a) +) engine=innodb partition by list(a) +( +partition p0 values in (1), +partition p1 values in (2), +partition p2 values in (0,3,4,5,6,7,8,9) +); +insert into t2 select +mod(seq, 10), seq from seq_1_to_50; +explain +delete t1, t2 from t1, t2 where t1.a=t2.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where +1 SIMPLE t2 ref a a 5 test.t1.a 1 +delete t1, t2 from t1, t2 where t1.a=t2.a; +drop table t1,t2; diff --git a/mysql-test/main/partition_innodb2.test b/mysql-test/main/partition_innodb2.test new file mode 100644 index 00000000000..7581c5db4ca --- /dev/null +++ b/mysql-test/main/partition_innodb2.test @@ -0,0 +1,30 @@ +--source include/not_embedded.inc +--source include/have_partition.inc +--source include/have_innodb.inc +--source include/have_sequence.inc + +--echo # +--echo # MDEV-30442: Assertion `!m_innodb' failed in ha_partition::cmp_ref on MULTI-DELETE +--echo # +create table t1 (a int) engine=innodb; +insert into t1 values (1),(2),(1),(2); + +create table t2 ( + a int, + b int, + key(a) +) engine=innodb partition by list(a) +( + partition p0 values in (1), + partition p1 values in (2), + partition p2 values in (0,3,4,5,6,7,8,9) +); + +insert into t2 select + mod(seq, 10), seq from seq_1_to_50; + +explain +delete t1, t2 from t1, t2 where t1.a=t2.a; +delete t1, t2 from t1, t2 where t1.a=t2.a; + +drop table t1,t2; diff --git a/mysql-test/main/partition_utf8-debug.result b/mysql-test/main/partition_utf8-debug.result index db1396198ab..2b4982a3dcc 100644 --- a/mysql-test/main/partition_utf8-debug.result +++ b/mysql-test/main/partition_utf8-debug.result @@ -77,7 +77,7 @@ CREATE OR REPLACE TABLE t1 (a DATE) CHARACTER SET utf8 PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (FROM_DAYS(100))); Warnings: Note 1003 PARTITION BY LIST COLUMNS(`a`) -(PARTITION `p0` VALUES IN (_utf8mb3 0x303030302d30302d3030) ENGINE = MyISAM) +(PARTITION `p0` VALUES IN (_latin1 0x303030302d30302d3030) ENGINE = MyISAM) SELECT PARTITION_DESCRIPTION FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME='t1'; PARTITION_DESCRIPTION '0000-00-00' diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result index a147bdffc0f..9d6ac0b61ba 100644 --- a/mysql-test/main/selectivity_innodb.result +++ b/mysql-test/main/selectivity_innodb.result @@ -2322,5 +2322,14 @@ b 9 DROP TABLE t; # +# MDEV-30693: Assertion `dbl_records <= s->records' failed in apply_selectivity_for_table on SELECT +# +set @tmp_oucs= @@optimizer_use_condition_selectivity; +CREATE TABLE t1 (c INT KEY) ENGINE=InnoDB; +SELECT * FROM (SELECT * FROM t1) a JOIN (SELECT * FROM (SELECT * FROM t1 GROUP BY c) d WHERE c>1) b ON a.c=b.c; +c c +DROP TABLE t1; +SET optimizer_use_condition_selectivity=1; +# # End of 11.0 tests # diff --git a/mysql-test/main/selectivity_innodb.test b/mysql-test/main/selectivity_innodb.test index dc06287a1f9..efdb3c1853b 100644 --- a/mysql-test/main/selectivity_innodb.test +++ b/mysql-test/main/selectivity_innodb.test @@ -283,5 +283,14 @@ SELECT b FROM t WHERE a > 'a' GROUP BY b HAVING b >= 6 OR b <= 0; DROP TABLE t; --echo # +--echo # MDEV-30693: Assertion `dbl_records <= s->records' failed in apply_selectivity_for_table on SELECT +--echo # +set @tmp_oucs= @@optimizer_use_condition_selectivity; +CREATE TABLE t1 (c INT KEY) ENGINE=InnoDB; +SELECT * FROM (SELECT * FROM t1) a JOIN (SELECT * FROM (SELECT * FROM t1 GROUP BY c) d WHERE c>1) b ON a.c=b.c; +DROP TABLE t1; +SET optimizer_use_condition_selectivity=1; + +--echo # --echo # End of 11.0 tests --echo # diff --git a/mysql-test/main/variables.result b/mysql-test/main/variables.result index f6817a2a4d2..9b54a24be71 100644 --- a/mysql-test/main/variables.result +++ b/mysql-test/main/variables.result @@ -777,16 +777,16 @@ select @@lc_time_names; @@lc_time_names en_US LC_TIME_NAMES: testing locale with the last ID: -set lc_time_names=110; +set lc_time_names=111; select @@lc_time_names; @@lc_time_names -rm_CH +ka_GE LC_TIME_NAMES: testing a number beyond the valid ID range: -set lc_time_names=111; -ERROR HY000: Unknown locale: '111' +set lc_time_names=112; +ERROR HY000: Unknown locale: '112' select @@lc_time_names; @@lc_time_names -rm_CH +ka_GE LC_TIME_NAMES: testing that 0 is en_US: set lc_time_names=0; select @@lc_time_names; diff --git a/mysql-test/main/variables.test b/mysql-test/main/variables.test index c8b36925df6..89267560ca6 100644 --- a/mysql-test/main/variables.test +++ b/mysql-test/main/variables.test @@ -538,12 +538,13 @@ set lc_time_names=NULL; --error ER_UNKNOWN_LOCALE set lc_time_names=-1; select @@lc_time_names; +# note same boundary condition tests in sys_vars.lc_time_names_basic --echo LC_TIME_NAMES: testing locale with the last ID: -set lc_time_names=110; +set lc_time_names=111; select @@lc_time_names; --echo LC_TIME_NAMES: testing a number beyond the valid ID range: --error ER_UNKNOWN_LOCALE -set lc_time_names=111; +set lc_time_names=112; select @@lc_time_names; --echo LC_TIME_NAMES: testing that 0 is en_US: set lc_time_names=0; |