summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@ibmvm>2009-10-09 15:42:31 +0400
committerAlexander Nozdrin <alik@ibmvm>2009-10-09 15:42:31 +0400
commit90f434cf20e32db41e6d5406f9942454035cccd5 (patch)
treef41c37e70a710461af1202bcf375e4b383868369 /mysql-test
parent4dae0e03076f54d32bcdf005b58c3feb22623be7 (diff)
parent798cbaa22ad17adc70a0f34651e07fdc46bbe0d1 (diff)
downloadmariadb-git-90f434cf20e32db41e6d5406f9942454035cccd5.tar.gz
Merge from mysql-next-mr.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/collections/default.experimental11
-rw-r--r--mysql-test/include/wait_for_slave_param.inc4
-rw-r--r--mysql-test/r/bigint.result2
-rw-r--r--mysql-test/r/index_merge_innodb.result326
-rw-r--r--mysql-test/r/information_schema-big.result93
-rw-r--r--mysql-test/r/information_schema.result88
-rw-r--r--mysql-test/r/metadata.result96
-rw-r--r--mysql-test/r/mysqldump.result10
-rw-r--r--mysql-test/r/partition_hash.result2
-rw-r--r--mysql-test/r/partition_pruning.result19
-rw-r--r--mysql-test/r/ps_2myisam.result42
-rw-r--r--mysql-test/r/ps_3innodb.result42
-rw-r--r--mysql-test/r/ps_4heap.result42
-rw-r--r--mysql-test/r/ps_5merge.result84
-rw-r--r--mysql-test/suite/ndb/r/ps_7ndb.result42
-rw-r--r--mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result4
-rw-r--r--mysql-test/t/index_merge_innodb.test8
-rw-r--r--mysql-test/t/information_schema-big.test48
-rw-r--r--mysql-test/t/information_schema.test35
-rw-r--r--mysql-test/t/metadata.test57
-rw-r--r--mysql-test/t/partition_pruning.test19
21 files changed, 480 insertions, 594 deletions
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index fc057256147..6d5655ba499 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -11,6 +11,8 @@ main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fail
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
main.innodb-autoinc # Bug#44030 2009-09-24 alik Marking innodb-autoinc experimental while waiting for the patch to be merged
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
+main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
+main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled
main.plugin_load # Bug#47146
@@ -19,9 +21,16 @@ rpl.rpl_innodb_bug28430* @solaris # Bug#46029
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
rpl.rpl_plugin_load* @solaris # Bug#47146
rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
+rpl.rpl_log_pos* # Bug#47743 2009-10-02 alik rpl.rpl_log_pos fails sporadically
rpl.rpl_trigger* # Bug#46656 2009-09-25 alik InnoDB plugin: memory leaks (Valgrind)
-rpl_ndb.rpl_ndb_log # Bug#38998
+# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
+# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
+# but they run by gcov.
+#
+
+ndb.*
+rpl_ndb.*
# Declare all NDB-tests in other test suites experimental.
diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc
index 82e57922913..1e690bdfe9c 100644
--- a/mysql-test/include/wait_for_slave_param.inc
+++ b/mysql-test/include/wait_for_slave_param.inc
@@ -49,6 +49,8 @@ if (!$_slave_timeout_counter)
{
let $_slave_timeout_counter= 3000;
}
+# Save resulting counter for later use.
+let $slave_tcnt= $_slave_timeout_counter;
let $_slave_param_comparison= $slave_param_comparison;
if (`SELECT '$_slave_param_comparison' = ''`)
@@ -70,7 +72,7 @@ while (`SELECT NOT('$_show_slave_status_value' $_slave_param_comparison '$slave_
# This has to be outside the loop until BUG#41913 has been fixed
if (!$_slave_timeout_counter)
{
- --echo **** ERROR: timeout after $slave_timeout seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
+ --echo **** ERROR: timeout after $slave_tcnt deci-seconds while waiting for slave parameter $slave_param $_slave_param_comparison $slave_param_value ****
if (`SELECT '$slave_error_message' != ''`)
{
--echo Message: $slave_error_message
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index 7c23f1267c2..6b0954655e9 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -385,7 +385,7 @@ def -((9223372036854775808)) 8 20 20 N 32897 0 63
-9223372036854775808
select -(-(9223372036854775808));
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def -(-(9223372036854775808)) 246 21 19 N 129 0 63
+def -(-(9223372036854775808)) 246 21 19 N 32897 0 63
-(-(9223372036854775808))
9223372036854775808
select --9223372036854775808, ---9223372036854775808, ----9223372036854775808;
diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result
index 71b81d6acd2..6d130a64e35 100644
--- a/mysql-test/r/index_merge_innodb.result
+++ b/mysql-test/r/index_merge_innodb.result
@@ -1,329 +1,3 @@
-#---------------- Index merge test 2 -------------------------------------------
-SET SESSION STORAGE_ENGINE = InnoDB;
-drop table if exists t1,t2;
-create table t1
-(
-key1 int not null,
-key2 int not null,
-INDEX i1(key1),
-INDEX i2(key2)
-);
-explain select * from t1 where key1 < 5 or key2 > 197;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
-select * from t1 where key1 < 5 or key2 > 197;
-key1 key2
-0 200
-1 199
-2 198
-3 197
-4 196
-explain select * from t1 where key1 < 3 or key2 > 195;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
-select * from t1 where key1 < 3 or key2 > 195;
-key1 key2
-0 200
-1 199
-2 198
-3 197
-4 196
-alter table t1 add str1 char (255) not null,
-add zeroval int not null default 0,
-add str2 char (255) not null,
-add str3 char (255) not null;
-update t1 set str1='aaa', str2='bbb', str3=concat(key2, '-', key1 div 2, '_' ,if(key1 mod 2 = 0, 'a', 'A'));
-alter table t1 add primary key (str1, zeroval, str2, str3);
-explain select * from t1 where key1 < 5 or key2 > 197;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
-select * from t1 where key1 < 5 or key2 > 197;
-key1 key2 str1 zeroval str2 str3
-4 196 aaa 0 bbb 196-2_a
-3 197 aaa 0 bbb 197-1_A
-2 198 aaa 0 bbb 198-1_a
-1 199 aaa 0 bbb 199-0_A
-0 200 aaa 0 bbb 200-0_a
-explain select * from t1 where key1 < 3 or key2 > 195;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
-select * from t1 where key1 < 3 or key2 > 195;
-key1 key2 str1 zeroval str2 str3
-4 196 aaa 0 bbb 196-2_a
-3 197 aaa 0 bbb 197-1_A
-2 198 aaa 0 bbb 198-1_a
-1 199 aaa 0 bbb 199-0_A
-0 200 aaa 0 bbb 200-0_a
-drop table t1;
-create table t1 (
-pk integer not null auto_increment primary key,
-key1 integer,
-key2 integer not null,
-filler char (200),
-index (key1),
-index (key2)
-);
-show warnings;
-Level Code Message
-explain select pk from t1 where key1 = 1 and key2 = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index
-select pk from t1 where key2 = 1 and key1 = 1;
-pk
-26
-27
-select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1;
-pk
-26
-27
-drop table t1;
-create table t1 (
-pk int primary key auto_increment,
-key1a int,
-key2a int,
-key1b int,
-key2b int,
-dummy1 int,
-dummy2 int,
-dummy3 int,
-dummy4 int,
-key3a int,
-key3b int,
-filler1 char (200),
-index i1(key1a, key1b),
-index i2(key2a, key2b),
-index i3(key3a, key3b)
-);
-create table t2 (a int);
-insert into t2 values (0),(1),(2),(3),(4),(NULL);
-insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
-select A.a, B.a, C.a, D.a, C.a, D.a from t2 A,t2 B,t2 C, t2 D;
-insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
-select key1a, key1b, key2a, key2b, key3a, key3b from t1;
-insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
-select key1a, key1b, key2a, key2b, key3a, key3b from t1;
-analyze table t1;
-Table Op Msg_type Msg_text
-test.t1 analyze status OK
-select count(*) from t1;
-count(*)
-5184
-explain select count(*) from t1 where
-key1a = 2 and key1b is null and key2a = 2 and key2b is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL # Using intersect(i1,i2); Using where; Using index
-select count(*) from t1 where
-key1a = 2 and key1b is null and key2a = 2 and key2b is null;
-count(*)
-4
-explain select count(*) from t1 where
-key1a = 2 and key1b is null and key3a = 2 and key3b is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL # Using intersect(i1,i3); Using where; Using index
-select count(*) from t1 where
-key1a = 2 and key1b is null and key3a = 2 and key3b is null;
-count(*)
-4
-drop table t1,t2;
-create table t1 (
-id1 int,
-id2 date ,
-index idx2 (id1,id2),
-index idx1 (id2)
-);
-insert into t1 values(1,'20040101'), (2,'20040102');
-select * from t1 where id1 = 1 and id2= '20040101';
-id1 id2
-1 2004-01-01
-drop table t1;
-drop view if exists v1;
-CREATE TABLE t1 (
-`oid` int(11) unsigned NOT NULL auto_increment,
-`fk_bbk_niederlassung` int(11) unsigned NOT NULL,
-`fk_wochentag` int(11) unsigned NOT NULL,
-`uhrzeit_von` time NOT NULL COMMENT 'HH:MM',
-`uhrzeit_bis` time NOT NULL COMMENT 'HH:MM',
-`geloescht` tinyint(4) NOT NULL,
-`version` int(5) NOT NULL,
-PRIMARY KEY (`oid`),
-KEY `fk_bbk_niederlassung` (`fk_bbk_niederlassung`),
-KEY `fk_wochentag` (`fk_wochentag`),
-KEY `ix_version` (`version`)
-) DEFAULT CHARSET=latin1;
-insert into t1 values
-(1, 38, 1, '08:00:00', '13:00:00', 0, 1),
-(2, 38, 2, '08:00:00', '13:00:00', 0, 1),
-(3, 38, 3, '08:00:00', '13:00:00', 0, 1),
-(4, 38, 4, '08:00:00', '13:00:00', 0, 1),
-(5, 38, 5, '08:00:00', '13:00:00', 0, 1),
-(6, 38, 5, '08:00:00', '13:00:00', 1, 2),
-(7, 38, 3, '08:00:00', '13:00:00', 1, 2),
-(8, 38, 1, '08:00:00', '13:00:00', 1, 2),
-(9, 38, 2, '08:00:00', '13:00:00', 1, 2),
-(10, 38, 4, '08:00:00', '13:00:00', 1, 2),
-(11, 38, 1, '08:00:00', '13:00:00', 0, 3),
-(12, 38, 2, '08:00:00', '13:00:00', 0, 3),
-(13, 38, 3, '08:00:00', '13:00:00', 0, 3),
-(14, 38, 4, '08:00:00', '13:00:00', 0, 3),
-(15, 38, 5, '08:00:00', '13:00:00', 0, 3),
-(16, 38, 4, '08:00:00', '13:00:00', 0, 4),
-(17, 38, 5, '08:00:00', '13:00:00', 0, 4),
-(18, 38, 1, '08:00:00', '13:00:00', 0, 4),
-(19, 38, 2, '08:00:00', '13:00:00', 0, 4),
-(20, 38, 3, '08:00:00', '13:00:00', 0, 4),
-(21, 7, 1, '08:00:00', '13:00:00', 0, 1),
-(22, 7, 2, '08:00:00', '13:00:00', 0, 1),
-(23, 7, 3, '08:00:00', '13:00:00', 0, 1),
-(24, 7, 4, '08:00:00', '13:00:00', 0, 1),
-(25, 7, 5, '08:00:00', '13:00:00', 0, 1);
-create view v1 as
-select
-zeit1.oid AS oid,
-zeit1.fk_bbk_niederlassung AS fk_bbk_niederlassung,
-zeit1.fk_wochentag AS fk_wochentag,
-zeit1.uhrzeit_von AS uhrzeit_von,
-zeit1.uhrzeit_bis AS uhrzeit_bis,
-zeit1.geloescht AS geloescht,
-zeit1.version AS version
-from
-t1 zeit1
-where
-(zeit1.version =
-(select max(zeit2.version) AS `max(version)`
- from t1 zeit2
-where
-((zeit1.fk_bbk_niederlassung = zeit2.fk_bbk_niederlassung) and
-(zeit1.fk_wochentag = zeit2.fk_wochentag) and
-(zeit1.uhrzeit_von = zeit2.uhrzeit_von) and
-(zeit1.uhrzeit_bis = zeit2.uhrzeit_bis)
-)
-)
-)
-and (zeit1.geloescht = 0);
-select * from v1 where oid = 21;
-oid fk_bbk_niederlassung fk_wochentag uhrzeit_von uhrzeit_bis geloescht version
-21 7 1 08:00:00 13:00:00 0 1
-drop view v1;
-drop table t1;
-CREATE TABLE t1(
-t_cpac varchar(2) NOT NULL,
-t_vers varchar(4) NOT NULL,
-t_rele varchar(2) NOT NULL,
-t_cust varchar(4) NOT NULL,
-filler1 char(250) default NULL,
-filler2 char(250) default NULL,
-PRIMARY KEY (t_cpac,t_vers,t_rele,t_cust),
-UNIQUE KEY IX_4 (t_cust,t_cpac,t_vers,t_rele),
-KEY IX_5 (t_vers,t_rele,t_cust)
-);
-insert into t1 values
-('tm','2.5 ','a ',' ','',''), ('tm','2.5U','a ','stnd','',''),
-('da','3.3 ','b ',' ','',''), ('da','3.3U','b ','stnd','',''),
-('tl','7.6 ','a ',' ','',''), ('tt','7.6 ','a ',' ','',''),
-('bc','B61 ','a ',' ','',''), ('bp','B61 ','a ',' ','',''),
-('ca','B61 ','a ',' ','',''), ('ci','B61 ','a ',' ','',''),
-('cp','B61 ','a ',' ','',''), ('dm','B61 ','a ',' ','',''),
-('ec','B61 ','a ',' ','',''), ('ed','B61 ','a ',' ','',''),
-('fm','B61 ','a ',' ','',''), ('nt','B61 ','a ',' ','',''),
-('qm','B61 ','a ',' ','',''), ('tc','B61 ','a ',' ','',''),
-('td','B61 ','a ',' ','',''), ('tf','B61 ','a ',' ','',''),
-('tg','B61 ','a ',' ','',''), ('ti','B61 ','a ',' ','',''),
-('tp','B61 ','a ',' ','',''), ('ts','B61 ','a ',' ','',''),
-('wh','B61 ','a ',' ','',''), ('bc','B61U','a ','stnd','',''),
-('bp','B61U','a ','stnd','',''), ('ca','B61U','a ','stnd','',''),
-('ci','B61U','a ','stnd','',''), ('cp','B61U','a ','stnd','',''),
-('dm','B61U','a ','stnd','',''), ('ec','B61U','a ','stnd','',''),
-('fm','B61U','a ','stnd','',''), ('nt','B61U','a ','stnd','',''),
-('qm','B61U','a ','stnd','',''), ('tc','B61U','a ','stnd','',''),
-('td','B61U','a ','stnd','',''), ('tf','B61U','a ','stnd','',''),
-('tg','B61U','a ','stnd','',''), ('ti','B61U','a ','stnd','',''),
-('tp','B61U','a ','stnd','',''), ('ts','B61U','a ','stnd','',''),
-('wh','B61U','a ','stnd','','');
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `t_cpac` varchar(2) NOT NULL,
- `t_vers` varchar(4) NOT NULL,
- `t_rele` varchar(2) NOT NULL,
- `t_cust` varchar(4) NOT NULL,
- `filler1` char(250) DEFAULT NULL,
- `filler2` char(250) DEFAULT NULL,
- PRIMARY KEY (`t_cpac`,`t_vers`,`t_rele`,`t_cust`),
- UNIQUE KEY `IX_4` (`t_cust`,`t_cpac`,`t_vers`,`t_rele`),
- KEY `IX_5` (`t_vers`,`t_rele`,`t_cust`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-select t_vers,t_rele,t_cust,filler1 from t1 where t_vers = '7.6';
-t_vers t_rele t_cust filler1
-7.6 a
-7.6 a
-select t_vers,t_rele,t_cust,filler1 from t1 where t_vers = '7.6'
- and t_rele='a' and t_cust = ' ';
-t_vers t_rele t_cust filler1
-7.6 a
-7.6 a
-drop table t1;
-create table t1 (
-pk int(11) not null auto_increment,
-a int(11) not null default '0',
-b int(11) not null default '0',
-c int(11) not null default '0',
-filler1 datetime, filler2 varchar(15),
-filler3 longtext,
-kp1 varchar(4), kp2 varchar(7),
-kp3 varchar(2), kp4 varchar(4),
-kp5 varchar(7),
-filler4 char(1),
-primary key (pk),
-key idx1(a,b,c),
-key idx2(c),
-key idx3(kp1,kp2,kp3,kp4,kp5)
-) default charset=latin1;
-set @fill=NULL;
-SELECT COUNT(*) FROM t1 WHERE b = 0 AND a = 0 AND c = 13286427 AND
-kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R ';
-COUNT(*)
-1
-drop table t1;
-create table t1
-(
-key1 int not null,
-key2 int not null default 0,
-key3 int not null default 0
-);
-insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8);
-set @d=8;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-insert into t1 (key1) select key1+@d from t1;
-set @d=@d*2;
-alter table t1 add index i2(key2);
-alter table t1 add index i3(key3);
-update t1 set key2=key1,key3=key1;
-explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 9 Using sort_union(i3,i2); Using where
-select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
-key1 key2 key3
-31 31 31
-32 32 32
-33 33 33
-34 34 34
-35 35 35
-36 36 36
-37 37 37
-38 38 38
-39 39 39
-drop table t1;
#---------------- 2-sweeps read Index merge test 2 -------------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1;
diff --git a/mysql-test/r/information_schema-big.result b/mysql-test/r/information_schema-big.result
new file mode 100644
index 00000000000..248b8d606dc
--- /dev/null
+++ b/mysql-test/r/information_schema-big.result
@@ -0,0 +1,93 @@
+DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
+DROP VIEW IF EXISTS v1;
+#
+# Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA
+#
+SELECT t.table_name, c1.column_name
+FROM information_schema.tables t
+INNER JOIN
+information_schema.columns c1
+ON t.table_schema = c1.table_schema AND
+t.table_name = c1.table_name
+WHERE t.table_schema = 'information_schema' AND
+c1.ordinal_position =
+( SELECT COALESCE(MIN(c2.ordinal_position),1)
+FROM information_schema.columns c2
+WHERE c2.table_schema = t.table_schema AND
+c2.table_name = t.table_name AND
+c2.column_name LIKE '%SCHEMA%'
+ )
+AND t.table_name NOT LIKE 'innodb%';
+table_name column_name
+CHARACTER_SETS CHARACTER_SET_NAME
+COLLATIONS COLLATION_NAME
+COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
+COLUMNS TABLE_SCHEMA
+COLUMN_PRIVILEGES TABLE_SCHEMA
+ENGINES ENGINE
+EVENTS EVENT_SCHEMA
+FILES TABLE_SCHEMA
+GLOBAL_STATUS VARIABLE_NAME
+GLOBAL_VARIABLES VARIABLE_NAME
+KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
+PARTITIONS TABLE_SCHEMA
+PLUGINS PLUGIN_NAME
+PROCESSLIST ID
+PROFILING QUERY_ID
+REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
+ROUTINES ROUTINE_SCHEMA
+SCHEMATA SCHEMA_NAME
+SCHEMA_PRIVILEGES TABLE_SCHEMA
+SESSION_STATUS VARIABLE_NAME
+SESSION_VARIABLES VARIABLE_NAME
+STATISTICS TABLE_SCHEMA
+TABLES TABLE_SCHEMA
+TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
+TABLE_PRIVILEGES TABLE_SCHEMA
+TRIGGERS TRIGGER_SCHEMA
+USER_PRIVILEGES GRANTEE
+VIEWS TABLE_SCHEMA
+SELECT t.table_name, c1.column_name
+FROM information_schema.tables t
+INNER JOIN
+information_schema.columns c1
+ON t.table_schema = c1.table_schema AND
+t.table_name = c1.table_name
+WHERE t.table_schema = 'information_schema' AND
+c1.ordinal_position =
+( SELECT COALESCE(MIN(c2.ordinal_position),1)
+FROM information_schema.columns c2
+WHERE c2.table_schema = 'information_schema' AND
+c2.table_name = t.table_name AND
+c2.column_name LIKE '%SCHEMA%'
+ )
+AND t.table_name NOT LIKE 'innodb%';
+table_name column_name
+CHARACTER_SETS CHARACTER_SET_NAME
+COLLATIONS COLLATION_NAME
+COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
+COLUMNS TABLE_SCHEMA
+COLUMN_PRIVILEGES TABLE_SCHEMA
+ENGINES ENGINE
+EVENTS EVENT_SCHEMA
+FILES TABLE_SCHEMA
+GLOBAL_STATUS VARIABLE_NAME
+GLOBAL_VARIABLES VARIABLE_NAME
+KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
+PARTITIONS TABLE_SCHEMA
+PLUGINS PLUGIN_NAME
+PROCESSLIST ID
+PROFILING QUERY_ID
+REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
+ROUTINES ROUTINE_SCHEMA
+SCHEMATA SCHEMA_NAME
+SCHEMA_PRIVILEGES TABLE_SCHEMA
+SESSION_STATUS VARIABLE_NAME
+SESSION_VARIABLES VARIABLE_NAME
+STATISTICS TABLE_SCHEMA
+TABLES TABLE_SCHEMA
+TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
+TABLE_PRIVILEGES TABLE_SCHEMA
+TRIGGERS TRIGGER_SCHEMA
+USER_PRIVILEGES GRANTEE
+VIEWS TABLE_SCHEMA
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index ffa9b596d2f..9a66c809226 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1226,94 +1226,6 @@ f1()
DROP FUNCTION f1;
DROP PROCEDURE p1;
DROP USER mysql_bug20230@localhost;
-SELECT t.table_name, c1.column_name
-FROM information_schema.tables t
-INNER JOIN
-information_schema.columns c1
-ON t.table_schema = c1.table_schema AND
-t.table_name = c1.table_name
-WHERE t.table_schema = 'information_schema' AND
-c1.ordinal_position =
-( SELECT COALESCE(MIN(c2.ordinal_position),1)
-FROM information_schema.columns c2
-WHERE c2.table_schema = t.table_schema AND
-c2.table_name = t.table_name AND
-c2.column_name LIKE '%SCHEMA%'
- )
-AND t.table_name not like 'innodb_%';
-table_name column_name
-CHARACTER_SETS CHARACTER_SET_NAME
-COLLATIONS COLLATION_NAME
-COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
-COLUMNS TABLE_SCHEMA
-COLUMN_PRIVILEGES TABLE_SCHEMA
-ENGINES ENGINE
-EVENTS EVENT_SCHEMA
-FILES TABLE_SCHEMA
-GLOBAL_STATUS VARIABLE_NAME
-GLOBAL_VARIABLES VARIABLE_NAME
-KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
-PARTITIONS TABLE_SCHEMA
-PLUGINS PLUGIN_NAME
-PROCESSLIST ID
-PROFILING QUERY_ID
-REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
-ROUTINES ROUTINE_SCHEMA
-SCHEMATA SCHEMA_NAME
-SCHEMA_PRIVILEGES TABLE_SCHEMA
-SESSION_STATUS VARIABLE_NAME
-SESSION_VARIABLES VARIABLE_NAME
-STATISTICS TABLE_SCHEMA
-TABLES TABLE_SCHEMA
-TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
-TABLE_PRIVILEGES TABLE_SCHEMA
-TRIGGERS TRIGGER_SCHEMA
-USER_PRIVILEGES GRANTEE
-VIEWS TABLE_SCHEMA
-SELECT t.table_name, c1.column_name
-FROM information_schema.tables t
-INNER JOIN
-information_schema.columns c1
-ON t.table_schema = c1.table_schema AND
-t.table_name = c1.table_name
-WHERE t.table_schema = 'information_schema' AND
-c1.ordinal_position =
-( SELECT COALESCE(MIN(c2.ordinal_position),1)
-FROM information_schema.columns c2
-WHERE c2.table_schema = 'information_schema' AND
-c2.table_name = t.table_name AND
-c2.column_name LIKE '%SCHEMA%'
- )
-AND t.table_name not like 'innodb_%';
-table_name column_name
-CHARACTER_SETS CHARACTER_SET_NAME
-COLLATIONS COLLATION_NAME
-COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME
-COLUMNS TABLE_SCHEMA
-COLUMN_PRIVILEGES TABLE_SCHEMA
-ENGINES ENGINE
-EVENTS EVENT_SCHEMA
-FILES TABLE_SCHEMA
-GLOBAL_STATUS VARIABLE_NAME
-GLOBAL_VARIABLES VARIABLE_NAME
-KEY_COLUMN_USAGE CONSTRAINT_SCHEMA
-PARTITIONS TABLE_SCHEMA
-PLUGINS PLUGIN_NAME
-PROCESSLIST ID
-PROFILING QUERY_ID
-REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
-ROUTINES ROUTINE_SCHEMA
-SCHEMATA SCHEMA_NAME
-SCHEMA_PRIVILEGES TABLE_SCHEMA
-SESSION_STATUS VARIABLE_NAME
-SESSION_VARIABLES VARIABLE_NAME
-STATISTICS TABLE_SCHEMA
-TABLES TABLE_SCHEMA
-TABLE_CONSTRAINTS CONSTRAINT_SCHEMA
-TABLE_PRIVILEGES TABLE_SCHEMA
-TRIGGERS TRIGGER_SCHEMA
-USER_PRIVILEGES GRANTEE
-VIEWS TABLE_SCHEMA
SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test');
MAX(table_name)
VIEWS
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index 6b498e55d85..58dd97ee9f3 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -2,7 +2,7 @@ drop table if exists t1,t2;
select 1, 1.0, -1, "hello", NULL;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def 1 8 1 1 N 32897 0 63
-def 1.0 246 4 3 N 129 1 63
+def 1.0 246 4 3 N 32897 1 63
def -1 8 2 2 N 32897 0 63
def hello 253 5 5 N 1 31 8
def NULL 6 0 0 Y 32896 0 63
@@ -18,7 +18,7 @@ def test t1 t1 d d 3 11 0 Y 32768 0 63
def test t1 t1 e e 8 20 0 Y 32768 0 63
def test t1 t1 f f 4 3 0 Y 32768 2 63
def test t1 t1 g g 5 4 0 Y 32768 3 63
-def test t1 t1 h h 246 7 0 Y 0 4 63
+def test t1 t1 h h 246 7 0 Y 32768 4 63
def test t1 t1 i i 13 4 0 Y 32864 0 63
def test t1 t1 j j 10 10 0 Y 128 0 63
def test t1 t1 k k 7 19 0 N 9441 0 63
@@ -199,3 +199,95 @@ def IFNULL(d, d) IFNULL(d, d) 10 10 10 Y 128 0 63
def LEAST(d, d) LEAST(d, d) 10 10 10 Y 128 0 63
DROP TABLE t1;
End of 5.0 tests
+create table t1(
+# numeric types
+bool_col bool,
+boolean_col boolean,
+bit_col bit(5),
+tiny tinyint,
+tiny_uns tinyint unsigned,
+small smallint,
+small_uns smallint unsigned,
+medium mediumint,
+medium_uns mediumint unsigned,
+int_col int,
+int_col_uns int unsigned,
+big bigint,
+big_uns bigint unsigned,
+decimal_col decimal(10,5),
+# synonyms of DECIMAL
+numeric_col numeric(10),
+fixed_col fixed(10),
+dec_col dec(10),
+decimal_col_uns decimal(10,5) unsigned,
+fcol float,
+fcol_uns float unsigned,
+dcol double,
+double_precision_col double precision,
+dcol_uns double unsigned,
+# date/time types
+date_col date,
+time_col time,
+timestamp_col timestamp,
+year_col year,
+datetime_col datetime,
+# string types
+char_col char(5),
+varchar_col varchar(10),
+binary_col binary(10),
+varbinary_col varbinary(10),
+tinyblob_col tinyblob,
+blob_col blob,
+mediumblob_col mediumblob,
+longblob_col longblob,
+text_col text,
+mediumtext_col mediumtext,
+longtext_col longtext,
+enum_col enum("A","B","C"),
+set_col set("F","E","D")
+);
+select * from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 bool_col bool_col 1 1 0 Y 32768 0 63
+def test t1 t1 boolean_col boolean_col 1 1 0 Y 32768 0 63
+def test t1 t1 bit_col bit_col 16 5 0 Y 32 0 63
+def test t1 t1 tiny tiny 1 4 0 Y 32768 0 63
+def test t1 t1 tiny_uns tiny_uns 1 3 0 Y 32800 0 63
+def test t1 t1 small small 2 6 0 Y 32768 0 63
+def test t1 t1 small_uns small_uns 2 5 0 Y 32800 0 63
+def test t1 t1 medium medium 9 9 0 Y 32768 0 63
+def test t1 t1 medium_uns medium_uns 9 8 0 Y 32800 0 63
+def test t1 t1 int_col int_col 3 11 0 Y 32768 0 63
+def test t1 t1 int_col_uns int_col_uns 3 10 0 Y 32800 0 63
+def test t1 t1 big big 8 20 0 Y 32768 0 63
+def test t1 t1 big_uns big_uns 8 20 0 Y 32800 0 63
+def test t1 t1 decimal_col decimal_col 246 12 0 Y 32768 5 63
+def test t1 t1 numeric_col numeric_col 246 11 0 Y 32768 0 63
+def test t1 t1 fixed_col fixed_col 246 11 0 Y 32768 0 63
+def test t1 t1 dec_col dec_col 246 11 0 Y 32768 0 63
+def test t1 t1 decimal_col_uns decimal_col_uns 246 11 0 Y 32800 5 63
+def test t1 t1 fcol fcol 4 12 0 Y 32768 31 63
+def test t1 t1 fcol_uns fcol_uns 4 12 0 Y 32800 31 63
+def test t1 t1 dcol dcol 5 22 0 Y 32768 31 63
+def test t1 t1 double_precision_col double_precision_col 5 22 0 Y 32768 31 63
+def test t1 t1 dcol_uns dcol_uns 5 22 0 Y 32800 31 63
+def test t1 t1 date_col date_col 10 10 0 Y 128 0 63
+def test t1 t1 time_col time_col 11 8 0 Y 128 0 63
+def test t1 t1 timestamp_col timestamp_col 7 19 0 N 9441 0 63
+def test t1 t1 year_col year_col 13 4 0 Y 32864 0 63
+def test t1 t1 datetime_col datetime_col 12 19 0 Y 128 0 63
+def test t1 t1 char_col char_col 254 5 0 Y 0 0 8
+def test t1 t1 varchar_col varchar_col 253 10 0 Y 0 0 8
+def test t1 t1 binary_col binary_col 254 10 0 Y 128 0 63
+def test t1 t1 varbinary_col varbinary_col 253 10 0 Y 128 0 63
+def test t1 t1 tinyblob_col tinyblob_col 252 255 0 Y 144 0 63
+def test t1 t1 blob_col blob_col 252 65535 0 Y 144 0 63
+def test t1 t1 mediumblob_col mediumblob_col 252 16777215 0 Y 144 0 63
+def test t1 t1 longblob_col longblob_col 252 4294967295 0 Y 144 0 63
+def test t1 t1 text_col text_col 252 65535 0 Y 16 0 8
+def test t1 t1 mediumtext_col mediumtext_col 252 16777215 0 Y 16 0 8
+def test t1 t1 longtext_col longtext_col 252 4294967295 0 Y 16 0 8
+def test t1 t1 enum_col enum_col 254 1 0 Y 256 0 8
+def test t1 t1 set_col set_col 254 5 0 Y 2048 0 8
+bool_col boolean_col bit_col tiny tiny_uns small small_uns medium medium_uns int_col int_col_uns big big_uns decimal_col numeric_col fixed_col dec_col decimal_col_uns fcol fcol_uns dcol double_precision_col dcol_uns date_col time_col timestamp_col year_col datetime_col char_col varchar_col binary_col varbinary_col tinyblob_col blob_col mediumblob_col longblob_col text_col mediumtext_col longtext_col enum_col set_col
+drop table t1;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 8162e1aca05..e4889b86987 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -40,7 +40,7 @@ CREATE TABLE `t1` (
`a` decimal(64,20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
+INSERT INTO `t1` VALUES (1234567890123456789012345678901234567890.00000000000000000000),(987654321098765432109876543210987654321.00000000000000000000);
DROP TABLE t1;
#
# Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL"
@@ -77,7 +77,7 @@ CREATE TABLE `t1` (
`b` float DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
+INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -85,7 +85,7 @@ CREATE TABLE `t1` (
`b` float DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
+INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -108,7 +108,7 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
+INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -135,7 +135,7 @@ CREATE TABLE `t1` (
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456);
+INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
diff --git a/mysql-test/r/partition_hash.result b/mysql-test/r/partition_hash.result
index 19da70db5a0..dcefd70ff43 100644
--- a/mysql-test/r/partition_hash.result
+++ b/mysql-test/r/partition_hash.result
@@ -93,7 +93,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
explain partitions select * from t1 where a >= 1 and a <= 5;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 9 Using where
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 9 Using where
drop table t1;
CREATE TABLE t1 (
a int not null,
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 769d499fc0a..d8bff2cbe01 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -2229,3 +2229,22 @@ explain partitions select * from t1 where recdate < '2006-01-01 00:00:00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
drop table t1;
+#
+# BUG#33730 Full table scan instead selected partitions for query more than 10 partitions
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int)
+partition by range(a+0) (
+partition p0 values less than (64),
+partition p1 values less than (128),
+partition p2 values less than (255)
+);
+insert into t1 select A.a + 10*B.a from t0 A, t0 B;
+explain partitions select * from t1 where a between 10 and 13;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 64 Using where
+explain partitions select * from t1 where a between 10 and 10+33;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 100 Using where
+drop table t0, t1;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index a91d13d11a1..c51863b73f7 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1807,8 +1807,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1829,7 +1829,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1927,8 +1927,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1974,8 +1974,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2024,8 +2024,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2064,8 +2064,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2112,8 +2112,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2156,8 +2156,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2202,8 +2202,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2240,8 +2240,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 50c94d6cc4e..2670451f24e 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1790,8 +1790,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1812,7 +1812,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index a85809d3800..4372c470b2d 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -60,8 +60,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1791,8 +1791,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1813,7 +1813,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1911,8 +1911,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1958,8 +1958,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2008,8 +2008,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2048,8 +2048,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2096,8 +2096,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2140,8 +2140,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2186,8 +2186,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2224,8 +2224,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index fd1b69c0ffd..35a43f7c032 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -102,8 +102,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1727,8 +1727,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1749,7 +1749,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1847,8 +1847,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1894,8 +1894,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1944,8 +1944,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1984,8 +1984,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2032,8 +2032,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2076,8 +2076,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2122,8 +2122,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2160,8 +2160,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -3124,8 +3124,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -4749,8 +4749,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -4771,7 +4771,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -4869,8 +4869,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -4916,8 +4916,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -4966,8 +4966,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -5006,8 +5006,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -5054,8 +5054,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -5098,8 +5098,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -5144,8 +5144,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -5182,8 +5182,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result
index 73a2e0c1dda..e57fdcb6df6 100644
--- a/mysql-test/suite/ndb/r/ps_7ndb.result
+++ b/mysql-test/suite/ndb/r/ps_7ndb.result
@@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
-def test t9 t9 c11 c11 246 9 6 Y 0 4 63
-def test t9 t9 c12 c12 246 10 6 Y 0 4 63
+def test t9 t9 c11 c11 246 9 6 Y 32768 4 63
+def test t9 t9 c12 c12 246 10 6 Y 32768 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 9441 0 63
@@ -1790,8 +1790,8 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 3 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
-def test t5 t5 const02 const02 246 4 3 N 1 1 63
-def test t5 t5 param02 param02 246 67 32 Y 0 30 63
+def test t5 t5 const02 const02 246 4 3 N 32769 1 63
+def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
@@ -1812,7 +1812,7 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 0 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
@@ -1910,8 +1910,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -1957,8 +1957,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2007,8 +2007,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2047,8 +2047,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2095,8 +2095,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2139,8 +2139,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2185,8 +2185,8 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 128 30 63
-def @arg12 246 83 6 Y 128 30 63
+def @arg11 246 83 6 Y 32896 30 63
+def @arg12 246 83 6 Y 32896 30 63
def @arg13 251 16777216 10 Y 128 31 63
def @arg14 251 16777216 19 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
@@ -2223,8 +2223,8 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 128 30 63
-def @arg12 246 83 0 Y 128 30 63
+def @arg11 246 83 0 Y 32896 30 63
+def @arg12 246 83 0 Y 32896 30 63
def @arg13 251 16777216 0 Y 128 31 63
def @arg14 251 16777216 0 Y 128 31 63
def @arg15 251 16777216 19 Y 128 31 63
diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
index 99a0fd21f66..3321b9b4969 100644
--- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
+++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
@@ -18,7 +18,7 @@ start slave;
SELECT RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
1
-Slave_IO_Errno= 2013
+Slave_IO_Errno= 2003
SELECT IS_FREE_LOCK("debug_lock.before_get_SERVER_ID");
IS_FREE_LOCK("debug_lock.before_get_SERVER_ID")
1
@@ -31,7 +31,7 @@ start slave;
SELECT RELEASE_LOCK("debug_lock.before_get_SERVER_ID");
RELEASE_LOCK("debug_lock.before_get_SERVER_ID")
1
-Slave_IO_Errno= 2013
+Slave_IO_Errno= 2003
set global debug= '';
reset master;
include/stop_slave.inc
diff --git a/mysql-test/t/index_merge_innodb.test b/mysql-test/t/index_merge_innodb.test
index 04516f45bfe..10d772797a2 100644
--- a/mysql-test/t/index_merge_innodb.test
+++ b/mysql-test/t/index_merge_innodb.test
@@ -21,14 +21,10 @@ let $index_merge_random_rows_in_EXPLAIN = 1;
# InnoDB does not support Merge tables (affects include/index_merge1.inc)
let $merge_table_support= 0;
-# The first two tests are disabled because of non deterministic explain output.
-# If include/index_merge1.inc can be enabled for InnoDB and all other
-# storage engines, please remove the subtest for Bug#21277 from
-# include/index_merge2.inc.
-# This test exists already in include/index_merge1.inc.
+# -- [DISABLED Bug#45727]
# --source include/index_merge1.inc
# --source include/index_merge_ror.inc
+# --source include/index_merge2.inc
---source include/index_merge2.inc
--source include/index_merge_2sweeps.inc
--source include/index_merge_ror_cpk.inc
diff --git a/mysql-test/t/information_schema-big.test b/mysql-test/t/information_schema-big.test
new file mode 100644
index 00000000000..c9cd65f0851
--- /dev/null
+++ b/mysql-test/t/information_schema-big.test
@@ -0,0 +1,48 @@
+# This test uses grants, which can't get tested for embedded server
+-- source include/big_test.inc
+-- source include/not_embedded.inc
+
+# check that CSV engine was compiled in, as the result of the test depends
+# on the presence of the log tables (which are CSV-based).
+--source include/have_csv.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+
+--echo #
+--echo # Bug#18925: subqueries with MIN/MAX functions on INFORMARTION_SCHEMA
+--echo #
+
+SELECT t.table_name, c1.column_name
+ FROM information_schema.tables t
+ INNER JOIN
+ information_schema.columns c1
+ ON t.table_schema = c1.table_schema AND
+ t.table_name = c1.table_name
+ WHERE t.table_schema = 'information_schema' AND
+ c1.ordinal_position =
+ ( SELECT COALESCE(MIN(c2.ordinal_position),1)
+ FROM information_schema.columns c2
+ WHERE c2.table_schema = t.table_schema AND
+ c2.table_name = t.table_name AND
+ c2.column_name LIKE '%SCHEMA%'
+ )
+ AND t.table_name NOT LIKE 'innodb%';
+SELECT t.table_name, c1.column_name
+ FROM information_schema.tables t
+ INNER JOIN
+ information_schema.columns c1
+ ON t.table_schema = c1.table_schema AND
+ t.table_name = c1.table_name
+ WHERE t.table_schema = 'information_schema' AND
+ c1.ordinal_position =
+ ( SELECT COALESCE(MIN(c2.ordinal_position),1)
+ FROM information_schema.columns c2
+ WHERE c2.table_schema = 'information_schema' AND
+ c2.table_name = t.table_name AND
+ c2.column_name LIKE '%SCHEMA%'
+ )
+ AND t.table_name NOT LIKE 'innodb%';
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 6060c78f791..b590ec306d6 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -914,41 +914,6 @@ DROP PROCEDURE p1;
DROP USER mysql_bug20230@localhost;
#
-# Bug#18925 subqueries with MIN/MAX functions on INFORMARTION_SCHEMA
-#
-
-SELECT t.table_name, c1.column_name
- FROM information_schema.tables t
- INNER JOIN
- information_schema.columns c1
- ON t.table_schema = c1.table_schema AND
- t.table_name = c1.table_name
- WHERE t.table_schema = 'information_schema' AND
- c1.ordinal_position =
- ( SELECT COALESCE(MIN(c2.ordinal_position),1)
- FROM information_schema.columns c2
- WHERE c2.table_schema = t.table_schema AND
- c2.table_name = t.table_name AND
- c2.column_name LIKE '%SCHEMA%'
- )
- AND t.table_name not like 'innodb_%';
-SELECT t.table_name, c1.column_name
- FROM information_schema.tables t
- INNER JOIN
- information_schema.columns c1
- ON t.table_schema = c1.table_schema AND
- t.table_name = c1.table_name
- WHERE t.table_schema = 'information_schema' AND
- c1.ordinal_position =
- ( SELECT COALESCE(MIN(c2.ordinal_position),1)
- FROM information_schema.columns c2
- WHERE c2.table_schema = 'information_schema' AND
- c2.table_name = t.table_name AND
- c2.column_name LIKE '%SCHEMA%'
- )
- AND t.table_name not like 'innodb_%';
-
-#
# Bug#2123 query with a simple non-correlated subquery over
# INFORMARTION_SCHEMA.TABLES
#
diff --git a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test
index a10767579fb..a42dcfd618d 100644
--- a/mysql-test/t/metadata.test
+++ b/mysql-test/t/metadata.test
@@ -130,3 +130,60 @@ SELECT COALESCE(d, d), IFNULL(d, d), IF(i, d, d),
DROP TABLE t1;
--echo End of 5.0 tests
+
+# Verify that column metadata is correct for all possible data types.
+# Originally about BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL"
+
+create table t1(
+# numeric types
+bool_col bool,
+boolean_col boolean,
+bit_col bit(5),
+tiny tinyint,
+tiny_uns tinyint unsigned,
+small smallint,
+small_uns smallint unsigned,
+medium mediumint,
+medium_uns mediumint unsigned,
+int_col int,
+int_col_uns int unsigned,
+big bigint,
+big_uns bigint unsigned,
+decimal_col decimal(10,5),
+# synonyms of DECIMAL
+numeric_col numeric(10),
+fixed_col fixed(10),
+dec_col dec(10),
+decimal_col_uns decimal(10,5) unsigned,
+fcol float,
+fcol_uns float unsigned,
+dcol double,
+double_precision_col double precision,
+dcol_uns double unsigned,
+# date/time types
+date_col date,
+time_col time,
+timestamp_col timestamp,
+year_col year,
+datetime_col datetime,
+# string types
+char_col char(5),
+varchar_col varchar(10),
+binary_col binary(10),
+varbinary_col varbinary(10),
+tinyblob_col tinyblob,
+blob_col blob,
+mediumblob_col mediumblob,
+longblob_col longblob,
+text_col text,
+mediumtext_col mediumtext,
+longtext_col longtext,
+enum_col enum("A","B","C"),
+set_col set("F","E","D")
+);
+
+--enable_metadata
+select * from t1;
+--disable_metadata
+
+drop table t1;
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 11e65be45fc..ea72cef5b62 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -1159,3 +1159,22 @@ INSERT INTO t1 VALUES ('2006-03-01 12:00:00');
-- echo must use p0 only:
explain partitions select * from t1 where recdate < '2006-01-01 00:00:00';
drop table t1;
+
+-- echo #
+-- echo # BUG#33730 Full table scan instead selected partitions for query more than 10 partitions
+-- echo #
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (a int)
+ partition by range(a+0) (
+ partition p0 values less than (64),
+ partition p1 values less than (128),
+ partition p2 values less than (255)
+);
+insert into t1 select A.a + 10*B.a from t0 A, t0 B;
+
+# this will use interval_via_walking
+explain partitions select * from t1 where a between 10 and 13;
+explain partitions select * from t1 where a between 10 and 10+33;
+
+drop table t0, t1;