mirror of
https://github.com/MariaDB/server.git
synced 2025-11-08 00:28:29 +03:00
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged mysql-test/r/csv.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_time.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_view.cc: Auto merged sql/table.cc: Auto merged storage/csv/ha_tina.cc: Auto merged storage/innobase/btr/btr0btr.c: Auto merged storage/innobase/buf/buf0buf.c: Auto merged storage/innobase/dict/dict0dict.c: Auto merged storage/innobase/fil/fil0fil.c: Auto merged storage/innobase/fsp/fsp0fsp.c: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged storage/innobase/include/btr0cur.ic: Auto merged storage/innobase/log/log0log.c: Auto merged storage/innobase/log/log0recv.c: Auto merged storage/innobase/os/os0file.c: Auto merged storage/innobase/row/row0mysql.c: Auto merged storage/innobase/row/row0sel.c: Auto merged storage/innobase/srv/srv0start.c: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged tests/mysql_client_test.c: Auto merged
This commit is contained in:
@@ -141,3 +141,16 @@ test.t1.product Computer TV 2 8 0 0 4.2500 NULL ENUM('Computer','Phone','TV') NO
|
||||
sum(profit) 10 6900 11 11 0 0 1946.2500 2867.6719 ENUM('10','275','600','6900') NOT NULL
|
||||
avg(profit) 10.0000 1380.0000 16 16 0 0 394.68750000 570.20033144 ENUM('10.0000','68.7500','120.0000','1380.0000') NOT NULL
|
||||
drop table t1,t2;
|
||||
create table t1 (f1 double(10,5), f2 char(10), f3 double(10,5));
|
||||
insert into t1 values (5.999, "5.9999", 5.99999), (9.555, "9.5555", 9.55555);
|
||||
select f1 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f1 5.99900 9.55500 7 7 0 0 7.77700 1.77800 FLOAT(4,3) NOT NULL
|
||||
select f2 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f2 5.9999 9.5555 6 6 0 0 6.0000 NULL FLOAT(5,4) UNSIGNED NOT NULL
|
||||
select f3 from t1 procedure analyse(1, 1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.f3 5.99999 9.55555 7 7 0 0 7.77777 1.77778 FLOAT(6,5) NOT NULL
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
|
||||
@@ -250,11 +250,6 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||
@@ -268,4 +263,20 @@ master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
11 == 11
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
drop table t1;
|
||||
|
||||
29
mysql-test/r/binlog_statement_insert_delayed.result
Normal file
29
mysql-test/r/binlog_statement_insert_delayed.result
Normal file
@@ -0,0 +1,29 @@
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=208
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (300)
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
11 == 11
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
drop table t1;
|
||||
@@ -160,11 +160,6 @@ set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
insert delayed into t1 values (207);
|
||||
insert delayed into t1 values (null);
|
||||
insert delayed into t1 values (300);
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (id tinyint auto_increment primary key)
|
||||
@@ -172,8 +167,26 @@ master-bin.000001 # Intvar 1 # INSERT_ID=127
|
||||
master-bin.000001 # Query 1 # use `test`; insert into t1 values(null)
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (207)
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=208
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (null)
|
||||
master-bin.000001 # Query 1 # use `test`; insert delayed into t1 values (300)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
11 == 11
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
208
|
||||
300
|
||||
301
|
||||
302
|
||||
303
|
||||
304
|
||||
305
|
||||
306
|
||||
400
|
||||
401
|
||||
drop table t1;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1,t2,t3;
|
||||
flush status;
|
||||
set autocommit=0;
|
||||
create table t1 (a int not null) engine=innodb;
|
||||
create table t1 (a int not null);
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
a
|
||||
@@ -15,7 +16,7 @@ drop table t1;
|
||||
commit;
|
||||
set autocommit=1;
|
||||
begin;
|
||||
create table t1 (a int not null) engine=innodb;
|
||||
create table t1 (a int not null);
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
a
|
||||
@@ -27,9 +28,9 @@ Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
drop table t1;
|
||||
commit;
|
||||
create table t1 (a int not null) engine=innodb;
|
||||
create table t2 (a int not null) engine=innodb;
|
||||
create table t3 (a int not null) engine=innodb;
|
||||
create table t1 (a int not null);
|
||||
create table t2 (a int not null);
|
||||
create table t3 (a int not null);
|
||||
insert into t1 values (1),(2);
|
||||
insert into t2 values (1),(2);
|
||||
insert into t3 values (1),(2);
|
||||
@@ -99,7 +100,7 @@ show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
drop table t3,t2,t1;
|
||||
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id));
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
@@ -109,9 +110,9 @@ count(*)
|
||||
1
|
||||
drop table t1;
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
CREATE TABLE t1 ( id int(10) NOT NULL auto_increment, a varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY a (a)) ENGINE=innodb;
|
||||
CREATE TABLE t2 ( id int(10) NOT NULL auto_increment, b varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY b (b)) ENGINE=innodb;
|
||||
CREATE TABLE t3 ( id int(10) NOT NULL auto_increment, t1_id int(10) NOT NULL default '0', t2_id int(10) NOT NULL default '0', state int(11) default NULL, PRIMARY KEY (id), UNIQUE KEY t1_id (t1_id,t2_id), KEY t2_id (t2_id,t1_id), CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`), CONSTRAINT `t3_ibfk_2` FOREIGN KEY (`t2_id`) REFERENCES `t2` (`id`)) ENGINE=innodb;
|
||||
CREATE TABLE t1 ( id int(10) NOT NULL auto_increment, a varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY a (a));
|
||||
CREATE TABLE t2 ( id int(10) NOT NULL auto_increment, b varchar(25) default NULL, PRIMARY KEY (id), UNIQUE KEY b (b));
|
||||
CREATE TABLE t3 ( id int(10) NOT NULL auto_increment, t1_id int(10) NOT NULL default '0', t2_id int(10) NOT NULL default '0', state int(11) default NULL, PRIMARY KEY (id), UNIQUE KEY t1_id (t1_id,t2_id), KEY t2_id (t2_id,t1_id), CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`), CONSTRAINT `t3_ibfk_2` FOREIGN KEY (`t2_id`) REFERENCES `t2` (`id`));
|
||||
INSERT INTO t1 VALUES (1,'me');
|
||||
INSERT INTO t2 VALUES (1,'you');
|
||||
INSERT INTO t3 VALUES (2,1,1,2);
|
||||
@@ -68,7 +68,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
||||
<resultset statement="select null from dual
|
||||
">
|
||||
<row>
|
||||
<field name="NULL">NULL</field>
|
||||
<field name="NULL" xsi:nil="true" />
|
||||
</row>
|
||||
</resultset>
|
||||
drop table t1;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -106,9 +104,7 @@ eta tipo c
|
||||
2 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
1 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -211,7 +207,7 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null) engine=innodb;
|
||||
create table t1 (a int not null, b int not null);
|
||||
insert into t1 values (1,1),(2,1),(3,1),(4,1);
|
||||
select get_lock("hello2",1000);
|
||||
get_lock("hello2",1000)
|
||||
@@ -239,9 +235,7 @@ a b
|
||||
1 1
|
||||
commit;
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -323,9 +317,7 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -407,9 +399,7 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -478,9 +468,7 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -549,9 +537,7 @@ eta tipo c
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
drop table t1;
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255)) ENGINE=innodb;
|
||||
Warnings:
|
||||
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
|
||||
create table t1(eta int(11) not null, tipo int(11), c varchar(255));
|
||||
insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||
insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
|
||||
@@ -780,6 +780,8 @@ t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
|
||||
drop table t1;
|
||||
create table t1 (upgrade int);
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
insert into t1 values (1,1),(1,2);
|
||||
CREATE TABLE t2 (primary key (a)) select * from t1;
|
||||
|
||||
@@ -5205,3 +5205,22 @@ select * from bug15205;
|
||||
val
|
||||
drop table bug15205;
|
||||
drop table bug15205_2;
|
||||
create table bug22080_1 (id int,string varchar(64)) Engine=CSV;
|
||||
create table bug22080_2 (id int,string varchar(64)) Engine=CSV;
|
||||
create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
|
||||
insert into bug22080_1 values(1,'string');
|
||||
insert into bug22080_1 values(2,'string');
|
||||
insert into bug22080_1 values(3,'string');
|
||||
"1","string"
|
||||
2","string"
|
||||
"3","string"
|
||||
check table bug22080_2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug22080_2 check error Corrupt
|
||||
"1","string"
|
||||
"2",string"
|
||||
"3","string"
|
||||
check table bug22080_3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.bug22080_3 check error Corrupt
|
||||
drop tables bug22080_1,bug22080_2,bug22080_3;
|
||||
|
||||
@@ -168,3 +168,13 @@ DROP TABLE t1;
|
||||
select hex(convert(_gbk 0xA14041 using ucs2));
|
||||
hex(convert(_gbk 0xA14041 using ucs2))
|
||||
003F0041
|
||||
create table t1 (c1 text not null, c2 text not null) character set gbk;
|
||||
alter table t1 change c1 c1 mediumtext character set gbk not null;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` mediumtext NOT NULL,
|
||||
`c2` text NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=gbk
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
||||
@@ -755,6 +755,27 @@ select export_set(5, name, upper(name), ",", 5) from bug20536;
|
||||
export_set(5, name, upper(name), ",", 5)
|
||||
test1,TEST1,test1,TEST1,TEST1
|
||||
'test\_2','TEST\_2','test\_2','TEST\_2','TEST\_2'
|
||||
CREATE TABLE t1 (
|
||||
status enum('active','passive') collate latin1_general_ci
|
||||
NOT NULL default 'passive'
|
||||
);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`status` enum('active','passive') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'passive'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD a int NOT NULL AFTER status;
|
||||
CREATE TABLE t2 (
|
||||
status enum('active','passive') collate ucs2_turkish_ci
|
||||
NOT NULL default 'passive'
|
||||
);
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`status` enum('active','passive') CHARACTER SET ucs2 COLLATE ucs2_turkish_ci NOT NULL DEFAULT 'passive'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t2 ADD a int NOT NULL AFTER status;
|
||||
DROP TABLE t1,t2;
|
||||
select password(name) from bug20536;
|
||||
password(name)
|
||||
????????????????????
|
||||
|
||||
@@ -1340,19 +1340,18 @@ select a from t1 group by a;
|
||||
a
|
||||
e
|
||||
drop table t1;
|
||||
set names utf8;
|
||||
grant select on test.* to юзер_юзер@localhost;
|
||||
user()
|
||||
юзер_юзер@localhost
|
||||
revoke all on test.* from юзер_юзер@localhost;
|
||||
drop user юзер_юзер@localhost;
|
||||
create database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
|
||||
use имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
|
||||
select database();
|
||||
database()
|
||||
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
|
||||
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
|
||||
use test;
|
||||
create table t1(a char(10)) default charset utf8;
|
||||
insert into t1 values ('123'), ('456');
|
||||
explain
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
|
||||
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
|
||||
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
|
||||
substr(Z.a,-1) a
|
||||
3 123
|
||||
6 456
|
||||
drop table t1;
|
||||
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
|
||||
SELECT id FROM t1;
|
||||
@@ -1462,3 +1461,21 @@ set @a:=null;
|
||||
execute my_stmt using @a;
|
||||
a b
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1 (
|
||||
colA int(11) NOT NULL,
|
||||
colB varchar(255) character set utf8 NOT NULL,
|
||||
PRIMARY KEY (colA)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 (colA, colB) VALUES (1, 'foo'), (2, 'foo bar');
|
||||
CREATE TABLE t2 (
|
||||
colA int(11) NOT NULL,
|
||||
colB varchar(255) character set utf8 NOT NULL,
|
||||
KEY bad (colA,colB(3))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t2 (colA, colB) VALUES (1, 'foo'),(2, 'foo bar');
|
||||
SELECT * FROM t1 JOIN t2 ON t1.colA=t2.colA AND t1.colB=t2.colB
|
||||
WHERE t1.colA < 3;
|
||||
colA colB colA colB
|
||||
1 foo 1 foo
|
||||
2 foo bar 2 foo bar
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
# Establish connection con1 (user=root)
|
||||
# Establish connection con2 (user=root)
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (id integer, x integer) engine=INNODB;
|
||||
# Switch to connection con1
|
||||
create table t1 (id integer, x integer) engine = InnoDB;
|
||||
insert into t1 values(0, 0);
|
||||
set autocommit=0;
|
||||
SELECT * from t1 where id = 0 FOR UPDATE;
|
||||
id x
|
||||
0 0
|
||||
# Switch to connection con2
|
||||
set autocommit=0;
|
||||
update t1 set x=2 where id = 0;
|
||||
# Switch to connection con1
|
||||
update t1 set x=1 where id = 0;
|
||||
select * from t1;
|
||||
id x
|
||||
0 1
|
||||
commit;
|
||||
# Switch to connection con2
|
||||
commit;
|
||||
# Switch to connection con1
|
||||
select * from t1;
|
||||
id x
|
||||
0 2
|
||||
commit;
|
||||
drop table t1;
|
||||
create table t1 (id integer, x integer) engine=INNODB;
|
||||
create table t2 (b integer, a integer) engine=INNODB;
|
||||
# Switch to connection con1
|
||||
create table t1 (id integer, x integer) engine = InnoDB;
|
||||
create table t2 (b integer, a integer) engine = InnoDB;
|
||||
insert into t1 values(0, 0), (300, 300);
|
||||
insert into t2 values(0, 10), (1, 20), (2, 30);
|
||||
commit;
|
||||
@@ -39,26 +47,31 @@ select * from t1;
|
||||
id x
|
||||
0 0
|
||||
300 300
|
||||
# Switch to connection con2
|
||||
set autocommit=0;
|
||||
update t1 set x=2 where id = 0;
|
||||
# Switch to connection con1
|
||||
update t1 set x=1 where id = 0;
|
||||
select * from t1;
|
||||
id x
|
||||
0 1
|
||||
300 300
|
||||
commit;
|
||||
# Switch to connection con2
|
||||
commit;
|
||||
# Switch to connection con1
|
||||
select * from t1;
|
||||
id x
|
||||
0 2
|
||||
300 300
|
||||
commit;
|
||||
drop table t1, t2;
|
||||
create table t1 (id integer, x integer) engine=INNODB;
|
||||
create table t2 (b integer, a integer) engine=INNODB;
|
||||
create table t1 (id integer, x integer) engine = InnoDB;
|
||||
create table t2 (b integer, a integer) engine = InnoDB;
|
||||
insert into t1 values(0, 0), (300, 300);
|
||||
insert into t2 values(0, 0), (1, 20), (2, 30);
|
||||
commit;
|
||||
# Switch to connection con1
|
||||
select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE;
|
||||
a b
|
||||
0 0
|
||||
@@ -74,6 +87,7 @@ select * from t1;
|
||||
id x
|
||||
0 0
|
||||
300 300
|
||||
# Switch to connection con2
|
||||
update t2 set a=2 where b = 0;
|
||||
select * from t2;
|
||||
b a
|
||||
@@ -81,16 +95,20 @@ b a
|
||||
1 20
|
||||
2 30
|
||||
update t1 set x=2 where id = 0;
|
||||
# Switch to connection con1
|
||||
update t1 set x=1 where id = 0;
|
||||
select * from t1;
|
||||
id x
|
||||
0 1
|
||||
300 300
|
||||
commit;
|
||||
# Switch to connection con2
|
||||
commit;
|
||||
# Switch to connection con1
|
||||
select * from t1;
|
||||
id x
|
||||
0 2
|
||||
300 300
|
||||
commit;
|
||||
# Switch to connection default + disconnect con1 and con2
|
||||
drop table t1, t2;
|
||||
@@ -7,6 +7,7 @@ insert delayed into t1 set a = 4;
|
||||
insert delayed into t1 set a = 5, tmsp = 19711006010203;
|
||||
insert delayed into t1 (a, tmsp) values (6, 19711006010203);
|
||||
insert delayed into t1 (a, tmsp) values (7, NULL);
|
||||
FLUSH TABLE t1;
|
||||
insert into t1 set a = 8,tmsp=19711006010203;
|
||||
select * from t1 where tmsp=0;
|
||||
a tmsp
|
||||
@@ -22,6 +23,7 @@ insert delayed into t1 values (null,"c");
|
||||
insert delayed into t1 values (3,"d"),(null,"e");
|
||||
insert delayed into t1 values (3,"this will give an","error");
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
FLUSH TABLE t1;
|
||||
show status like 'not_flushed_delayed_rows';
|
||||
Variable_name Value
|
||||
Not_flushed_delayed_rows 0
|
||||
@@ -54,6 +56,7 @@ insert delayed into t1 values(null);
|
||||
insert delayed into t1 values(null);
|
||||
insert delayed into t1 values(null);
|
||||
insert delayed into t1 values(null);
|
||||
FLUSH TABLE t1;
|
||||
select * from t1 order by a;
|
||||
a
|
||||
1
|
||||
@@ -69,3 +72,174 @@ a
|
||||
12
|
||||
13
|
||||
DROP TABLE t1;
|
||||
SET @bug20627_old_auto_increment_offset=
|
||||
@@auto_increment_offset= 2;
|
||||
SET @bug20627_old_auto_increment_increment=
|
||||
@@auto_increment_increment= 3;
|
||||
SET @bug20627_old_session_auto_increment_offset=
|
||||
@@session.auto_increment_offset= 4;
|
||||
SET @bug20627_old_session_auto_increment_increment=
|
||||
@@session.auto_increment_increment= 5;
|
||||
SET @@auto_increment_offset= 2;
|
||||
SET @@auto_increment_increment= 3;
|
||||
SET @@session.auto_increment_offset= 4;
|
||||
SET @@session.auto_increment_increment= 5;
|
||||
CREATE TABLE t1 (
|
||||
c1 INT NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (c1)
|
||||
);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
4
|
||||
9
|
||||
14
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 INT NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (c1)
|
||||
);
|
||||
INSERT DELAYED INTO t1 VALUES (NULL),(NULL),(NULL);
|
||||
FLUSH TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
4
|
||||
9
|
||||
14
|
||||
DROP TABLE t1;
|
||||
SET @@auto_increment_offset=
|
||||
@bug20627_old_auto_increment_offset;
|
||||
SET @@auto_increment_increment=
|
||||
@bug20627_old_auto_increment_increment;
|
||||
SET @@session.auto_increment_offset=
|
||||
@bug20627_old_session_auto_increment_offset;
|
||||
SET @@session.auto_increment_increment=
|
||||
@bug20627_old_session_auto_increment_increment;
|
||||
SET @bug20830_old_auto_increment_offset=
|
||||
@@auto_increment_offset= 2;
|
||||
SET @bug20830_old_auto_increment_increment=
|
||||
@@auto_increment_increment= 3;
|
||||
SET @bug20830_old_session_auto_increment_offset=
|
||||
@@session.auto_increment_offset= 4;
|
||||
SET @bug20830_old_session_auto_increment_increment=
|
||||
@@session.auto_increment_increment= 5;
|
||||
SET @@auto_increment_offset= 2;
|
||||
SET @@auto_increment_increment= 3;
|
||||
SET @@session.auto_increment_offset= 4;
|
||||
SET @@session.auto_increment_increment= 5;
|
||||
CREATE TABLE t1 (
|
||||
c1 INT(11) NOT NULL AUTO_INCREMENT,
|
||||
c2 INT(11) DEFAULT NULL,
|
||||
PRIMARY KEY (c1)
|
||||
);
|
||||
SET insert_id= 14;
|
||||
INSERT INTO t1 VALUES(NULL, 11), (NULL, 12), (NULL, 13);
|
||||
INSERT INTO t1 VALUES(NULL, 21), (NULL, 22), (NULL, 23);
|
||||
INSERT INTO t1 VALUES( 69, 31), (NULL, 32), (NULL, 33);
|
||||
INSERT INTO t1 VALUES(NULL, 41), (NULL, 42), (NULL, 43);
|
||||
SET insert_id= 114;
|
||||
INSERT INTO t1 VALUES(NULL, 51), (NULL, 52), (NULL, 53);
|
||||
INSERT INTO t1 VALUES(NULL, 61), (NULL, 62), (NULL, 63);
|
||||
INSERT INTO t1 VALUES( 49, 71), (NULL, 72), (NULL, 73);
|
||||
INSERT INTO t1 VALUES(NULL, 81), (NULL, 82), (NULL, 83);
|
||||
SET insert_id= 114;
|
||||
INSERT INTO t1 VALUES(NULL, 91);
|
||||
ERROR 23000: Duplicate entry '114' for key 'PRIMARY'
|
||||
INSERT INTO t1 VALUES (NULL, 92), (NULL, 93);
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
14 11
|
||||
19 12
|
||||
24 13
|
||||
29 21
|
||||
34 22
|
||||
39 23
|
||||
69 31
|
||||
74 32
|
||||
79 33
|
||||
84 41
|
||||
89 42
|
||||
94 43
|
||||
114 51
|
||||
119 52
|
||||
124 53
|
||||
129 61
|
||||
134 62
|
||||
139 63
|
||||
49 71
|
||||
144 72
|
||||
149 73
|
||||
154 81
|
||||
159 82
|
||||
164 83
|
||||
169 92
|
||||
174 93
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
26
|
||||
SELECT SUM(c1) FROM t1;
|
||||
SUM(c1)
|
||||
2569
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 INT(11) NOT NULL AUTO_INCREMENT,
|
||||
c2 INT(11) DEFAULT NULL,
|
||||
PRIMARY KEY (c1)
|
||||
);
|
||||
SET insert_id= 14;
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 11), (NULL, 12), (NULL, 13);
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 21), (NULL, 22), (NULL, 23);
|
||||
INSERT DELAYED INTO t1 VALUES( 69, 31), (NULL, 32), (NULL, 33);
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 41), (NULL, 42), (NULL, 43);
|
||||
SET insert_id= 114;
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 51), (NULL, 52), (NULL, 53);
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 61), (NULL, 62), (NULL, 63);
|
||||
INSERT DELAYED INTO t1 VALUES( 49, 71), (NULL, 72), (NULL, 73);
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 81), (NULL, 82), (NULL, 83);
|
||||
SET insert_id= 114;
|
||||
INSERT DELAYED INTO t1 VALUES(NULL, 91);
|
||||
INSERT DELAYED INTO t1 VALUES (NULL, 92), (NULL, 93);
|
||||
FLUSH TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
14 11
|
||||
19 12
|
||||
24 13
|
||||
29 21
|
||||
34 22
|
||||
39 23
|
||||
69 31
|
||||
74 32
|
||||
79 33
|
||||
84 41
|
||||
89 42
|
||||
94 43
|
||||
114 51
|
||||
119 52
|
||||
124 53
|
||||
129 61
|
||||
134 62
|
||||
139 63
|
||||
49 71
|
||||
144 72
|
||||
149 73
|
||||
154 81
|
||||
159 82
|
||||
164 83
|
||||
169 92
|
||||
174 93
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
26
|
||||
SELECT SUM(c1) FROM t1;
|
||||
SUM(c1)
|
||||
2569
|
||||
DROP TABLE t1;
|
||||
SET @@auto_increment_offset=
|
||||
@bug20830_old_auto_increment_offset;
|
||||
SET @@auto_increment_increment=
|
||||
@bug20830_old_auto_increment_increment;
|
||||
SET @@session.auto_increment_offset=
|
||||
@bug20830_old_session_auto_increment_offset;
|
||||
SET @@session.auto_increment_increment=
|
||||
@bug20830_old_session_auto_increment_increment;
|
||||
|
||||
@@ -172,6 +172,10 @@ a
|
||||
0
|
||||
2
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
delete `4.t1` from t1 as `4.t1` where `4.t1`.a = 5;
|
||||
delete FROM `4.t1` USING t1 as `4.t1` where `4.t1`.a = 5;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (a int not null,b int not null);
|
||||
CREATE TABLE t2 (a int not null, b int not null, primary key (a,b));
|
||||
CREATE TABLE t3 (a int not null, b int not null, primary key (a,b));
|
||||
|
||||
@@ -38,52 +38,37 @@ drop event event2;
|
||||
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
|
||||
drop event event2;
|
||||
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost RECURRING NULL 10 SECOND # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
0 1
|
||||
SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
interval_field interval_value body
|
||||
SECOND 10 SELECT 1
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
1 0 1
|
||||
ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02';
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
1 1
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
0 1 1
|
||||
ALTER EVENT event_starts_test COMMENT "non-empty comment";
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
1 1 non-empty comment
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
0 1 1 non-empty comment
|
||||
ALTER EVENT event_starts_test COMMENT "";
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
1 1
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
0 1 1
|
||||
DROP EVENT event_starts_test;
|
||||
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
0 0
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
1 0 0
|
||||
ALTER EVENT event_starts_test COMMENT "non-empty comment";
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
|
||||
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
starts IS NULL ends IS NULL comment
|
||||
0 0 non-empty comment
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
1 0 0 non-empty comment
|
||||
ALTER EVENT event_starts_test COMMENT "";
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
|
||||
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
|
||||
execute_at IS NULL starts IS NULL ends IS NULL comment
|
||||
1 0 0
|
||||
DROP EVENT event_starts_test;
|
||||
create table test_nested(a int);
|
||||
create event e_43 on schedule every 1 second do set @a = 5;
|
||||
|
||||
@@ -213,4 +213,17 @@ create event e_53 on schedule every 5 second starts (select s1 from ttx) do drop
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select s1 from ttx) do drop table t' at line 1
|
||||
create event e_53 on schedule every 5 second ends (select s1 from ttx) do drop table t;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select s1 from ttx) do drop table t' at line 1
|
||||
drop event if exists e_16;
|
||||
drop procedure if exists p_16;
|
||||
create event e_16 on schedule every 1 second do set @a=5;
|
||||
create procedure p_16 () alter event e_16 on schedule every @a second;
|
||||
set @a = null;
|
||||
call p_16();
|
||||
ERROR HY000: Incorrect INTERVAL value: 'NULL'
|
||||
call p_16();
|
||||
ERROR HY000: Incorrect INTERVAL value: 'NULL'
|
||||
set @a= 6;
|
||||
call p_16();
|
||||
drop procedure p_16;
|
||||
drop event e_16;
|
||||
drop database events_test;
|
||||
|
||||
22
mysql-test/r/events_restart_phase0.result
Normal file
22
mysql-test/r/events_restart_phase0.result
Normal file
@@ -0,0 +1,22 @@
|
||||
SHOW VARIABLES LIKE 'event%';
|
||||
Variable_name Value
|
||||
event_scheduler DISABLED
|
||||
SELECT @@global.event_scheduler;
|
||||
@@global.event_scheduler
|
||||
DISABLED
|
||||
SET GLOBAL event_scheduler=on;
|
||||
ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
|
||||
SET GLOBAL event_scheduler=off;
|
||||
ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
|
||||
SET GLOBAL event_scheduler=0;
|
||||
ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
|
||||
SET GLOBAL event_scheduler=1;
|
||||
ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement
|
||||
SET GLOBAL event_scheduler=2;
|
||||
ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2'
|
||||
SET GLOBAL event_scheduler=SUSPEND;
|
||||
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND'
|
||||
SET GLOBAL event_scheduler=SUSPENDED;
|
||||
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED'
|
||||
SET GLOBAL event_scheduler=disabled;
|
||||
ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled'
|
||||
12
mysql-test/r/execution_constants.result
Normal file
12
mysql-test/r/execution_constants.result
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE `t_bug21476` (
|
||||
`ID_BOARD` smallint(5) unsigned NOT NULL default '0',
|
||||
`ID_MEMBER` mediumint(8) unsigned NOT NULL default '0',
|
||||
`logTime` int(10) unsigned NOT NULL default '0',
|
||||
`ID_MSG` mediumint(8) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`ID_MEMBER`,`ID_BOARD`),
|
||||
KEY `logTime` (`logTime`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci;
|
||||
INSERT INTO `t_bug21476` VALUES (2,2,1154870939,0),(1,2,1154870957,0),(2,183,1154941362,0),(2,84,1154904301,0),(1,84,1154905867,0),(2,13,1154947484,10271),(3,84,1154880549,0),(1,6,1154892183,0),(2,25,1154947581,10271),(3,25,1154904760,0),(1,25,1154947373,10271),(1,179,1154899992,0),(2,179,1154899410,0),(5,25,1154901666,0),(2,329,1154902026,0),(3,329,1154902040,0),(1,329,1154902058,0),(1,13,1154930841,0),(3,85,1154904987,0),(1,183,1154929665,0),(3,13,1154931268,0),(1,85,1154936888,0),(1,169,1154937959,0),(2,169,1154941717,0),(3,183,1154939810,0),(3,169,1154941734,0);
|
||||
Assertion: mysql_errno 1436 == 1436
|
||||
DROP TABLE `t_bug21476`;
|
||||
End of 5.0 tests.
|
||||
@@ -572,14 +572,14 @@ COUNT(*) GROUP_CONCAT(DISTINCT t2.somename SEPARATOR ' |')
|
||||
DROP TABLE t1,t2;
|
||||
select * from (select group_concat('c') from DUAL) t;
|
||||
group_concat('c')
|
||||
NULL
|
||||
c
|
||||
create table t1 ( a int not null default 0);
|
||||
select * from (select group_concat(a) from t1) t2;
|
||||
group_concat(a)
|
||||
NULL
|
||||
select group_concat('x') UNION ALL select 1;
|
||||
group_concat('x')
|
||||
NULL
|
||||
x
|
||||
1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id int, a varchar(9));
|
||||
@@ -660,3 +660,12 @@ CHAR_LENGTH( GROUP_CONCAT(b) )
|
||||
240001
|
||||
SET GROUP_CONCAT_MAX_LEN = 1024;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
INSERT INTO t1 VALUES (2,1), (1,2), (2,2), (1,3);
|
||||
SELECT GROUP_CONCAT(a), x
|
||||
FROM (SELECT a, GROUP_CONCAT(b) x FROM t1 GROUP BY a) AS s
|
||||
GROUP BY x;
|
||||
GROUP_CONCAT(a) x
|
||||
2 1,2
|
||||
1 2,3
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -847,6 +847,22 @@ EXPLAIN SELECT MAX(b) FROM t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,1),(1,2),(2,3);
|
||||
SELECT (SELECT COUNT(DISTINCT t1.b)) FROM t1 GROUP BY t1.a;
|
||||
(SELECT COUNT(DISTINCT t1.b))
|
||||
2
|
||||
1
|
||||
SELECT (SELECT COUNT(DISTINCT 12)) FROM t1 GROUP BY t1.a;
|
||||
(SELECT COUNT(DISTINCT 12))
|
||||
1
|
||||
1
|
||||
SELECT AVG(2), BIT_AND(2), BIT_OR(2), BIT_XOR(2), COUNT(*), COUNT(12),
|
||||
COUNT(DISTINCT 12), MIN(2),MAX(2),STD(2), VARIANCE(2),SUM(2),
|
||||
GROUP_CONCAT(2),GROUP_CONCAT(DISTINCT 2);
|
||||
AVG(2) BIT_AND(2) BIT_OR(2) BIT_XOR(2) COUNT(*) COUNT(12) COUNT(DISTINCT 12) MIN(2) MAX(2) STD(2) VARIANCE(2) SUM(2) GROUP_CONCAT(2) GROUP_CONCAT(DISTINCT 2)
|
||||
2.00000 2 2 2 1 1 1 2 2 0.00000 0.00000 2 2 2
|
||||
DROP TABLE t1;
|
||||
create table t2 (ff double);
|
||||
insert into t2 values (2.2);
|
||||
select cast(sum(distinct ff) as decimal(5,2)) from t2;
|
||||
@@ -988,7 +1004,7 @@ SELECT SQL_NO_CACHE
|
||||
WHERE ttt.a = ccc.b AND ttt.a = t.a GROUP BY ttt.a) AS minid
|
||||
FROM t1 t, t2 c WHERE t.a = c.b;
|
||||
minid
|
||||
NULL
|
||||
1
|
||||
DROP TABLE t1,t2;
|
||||
create table t1 select variance(0);
|
||||
show create table t1;
|
||||
|
||||
@@ -21,7 +21,7 @@ min(7)
|
||||
NULL
|
||||
select min(7) from DUAL;
|
||||
min(7)
|
||||
NULL
|
||||
7
|
||||
explain select min(7) from t2m join t1m;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
@@ -36,7 +36,7 @@ max(7)
|
||||
NULL
|
||||
select max(7) from DUAL;
|
||||
max(7)
|
||||
NULL
|
||||
7
|
||||
explain select max(7) from t2m join t1m;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
@@ -75,7 +75,7 @@ min(7)
|
||||
NULL
|
||||
select min(7) from DUAL;
|
||||
min(7)
|
||||
NULL
|
||||
7
|
||||
explain select min(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
@@ -91,7 +91,7 @@ max(7)
|
||||
NULL
|
||||
select max(7) from DUAL;
|
||||
max(7)
|
||||
NULL
|
||||
7
|
||||
explain select max(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
|
||||
@@ -343,3 +343,71 @@ some_id
|
||||
1
|
||||
2
|
||||
drop table t1;
|
||||
create table t1(f1 char(1));
|
||||
insert into t1 values ('a'),('b'),('1');
|
||||
select f1 from t1 where f1 in ('a',1);
|
||||
f1
|
||||
a
|
||||
1
|
||||
select f1, case f1 when 'a' then '+' when 1 then '-' end from t1;
|
||||
f1 case f1 when 'a' then '+' when 1 then '-' end
|
||||
a +
|
||||
b NULL
|
||||
1 -
|
||||
create index t1f1_idx on t1(f1);
|
||||
select f1 from t1 where f1 in ('a',1);
|
||||
f1
|
||||
1
|
||||
a
|
||||
explain select f1 from t1 where f1 in ('a',1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index NULL t1f1_idx 2 NULL 3 Using where; Using index
|
||||
select f1 from t1 where f1 in ('a','b');
|
||||
f1
|
||||
a
|
||||
b
|
||||
explain select f1 from t1 where f1 in ('a','b');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
|
||||
select f1 from t1 where f1 in (2,1);
|
||||
f1
|
||||
1
|
||||
explain select f1 from t1 where f1 in (2,1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
|
||||
create table t2(f2 int, index t2f2(f2));
|
||||
insert into t2 values(0),(1),(2);
|
||||
select f2 from t2 where f2 in ('a',2);
|
||||
f2
|
||||
0
|
||||
2
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
explain select f2 from t2 where f2 in ('a',2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL t2f2 5 NULL 3 Using where; Using index
|
||||
select f2 from t2 where f2 in ('a','b');
|
||||
f2
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
explain select f2 from t2 where f2 in ('a','b');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'a'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
select f2 from t2 where f2 in (1,'b');
|
||||
f2
|
||||
0
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'b'
|
||||
explain select f2 from t2 where f2 in (1,'b');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL t2f2 5 NULL 3 Using where; Using index
|
||||
drop table t1, t2;
|
||||
|
||||
@@ -1113,4 +1113,39 @@ conv("18383815659218730760",10,10) + 0
|
||||
select "18383815659218730760" + 0;
|
||||
"18383815659218730760" + 0
|
||||
1.8383815659219e+19
|
||||
CREATE TABLE t1 (code varchar(10));
|
||||
INSERT INTO t1 VALUES ('a12'), ('A12'), ('a13');
|
||||
SELECT ASCII(code), code FROM t1 WHERE code='A12';
|
||||
ASCII(code) code
|
||||
97 a12
|
||||
65 A12
|
||||
SELECT ASCII(code), code FROM t1 WHERE code='A12' AND ASCII(code)=65;
|
||||
ASCII(code) code
|
||||
65 A12
|
||||
INSERT INTO t1 VALUES ('a12 '), ('A12 ');
|
||||
SELECT LENGTH(code), code FROM t1 WHERE code='A12';
|
||||
LENGTH(code) code
|
||||
3 a12
|
||||
3 A12
|
||||
4 a12
|
||||
5 A12
|
||||
SELECT LENGTH(code), code FROM t1 WHERE code='A12' AND LENGTH(code)=5;
|
||||
LENGTH(code) code
|
||||
5 A12
|
||||
ALTER TABLE t1 ADD INDEX (code);
|
||||
CREATE TABLE t2 (id varchar(10) PRIMARY KEY);
|
||||
INSERT INTO t2 VALUES ('a11'), ('a12'), ('a13'), ('a14');
|
||||
SELECT * FROM t1 INNER JOIN t2 ON t1.code=t2.id
|
||||
WHERE t2.id='a12' AND (LENGTH(code)=5 OR code < 'a00');
|
||||
code id
|
||||
A12 a12
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 INNER JOIN t2 ON code=id
|
||||
WHERE id='a12' AND (LENGTH(code)=5 OR code < 'a00');
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ref code code 13 const 3 100.00 Using where; Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 12 const 1 100.00 Using where; Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`code` AS `code`,`test`.`t2`.`id` AS `id` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`code` = _latin1'a12') and (`test`.`t2`.`id` = _latin1'a12') and (length(`test`.`t1`.`code`) = 5))
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.0 tests
|
||||
|
||||
@@ -840,39 +840,38 @@ drop table t1;
|
||||
create table t1(f1 date, f2 time, f3 datetime);
|
||||
insert into t1 values ("2006-01-01", "12:01:01", "2006-01-01 12:01:01");
|
||||
insert into t1 values ("2006-01-02", "12:01:02", "2006-01-02 12:01:02");
|
||||
select f1 from t1 where f1 between "2006-1-1" and 20060101;
|
||||
select f1 from t1 where f1 between CAST("2006-1-1" as date) and CAST(20060101 as date);
|
||||
f1
|
||||
2006-01-01
|
||||
select f1 from t1 where f1 between "2006-1-1" and "2006.1.1";
|
||||
select f1 from t1 where f1 between cast("2006-1-1" as date) and cast("2006.1.1" as date);
|
||||
f1
|
||||
2006-01-01
|
||||
select f1 from t1 where date(f1) between "2006-1-1" and "2006.1.1";
|
||||
select f1 from t1 where date(f1) between cast("2006-1-1" as date) and cast("2006.1.1" as date);
|
||||
f1
|
||||
2006-01-01
|
||||
select f2 from t1 where f2 between "12:1:2" and "12:2:2";
|
||||
select f2 from t1 where f2 between cast("12:1:2" as time) and cast("12:2:2" as time);
|
||||
f2
|
||||
12:01:02
|
||||
select f2 from t1 where time(f2) between "12:1:2" and "12:2:2";
|
||||
select f2 from t1 where time(f2) between cast("12:1:2" as time) and cast("12:2:2" as time);
|
||||
f2
|
||||
12:01:02
|
||||
select f3 from t1 where f3 between "2006-1-1 12:1:1" and "2006-1-1 12:1:2";
|
||||
select f3 from t1 where f3 between cast("2006-1-1 12:1:1" as datetime) and cast("2006-1-1 12:1:2" as datetime);
|
||||
f3
|
||||
2006-01-01 12:01:01
|
||||
select f3 from t1 where timestamp(f3) between "2006-1-1 12:1:1" and "2006-1-1 12:1:2";
|
||||
select f3 from t1 where timestamp(f3) between cast("2006-1-1 12:1:1" as datetime) and cast("2006-1-1 12:1:2" as datetime);
|
||||
f3
|
||||
2006-01-01 12:01:01
|
||||
select f1 from t1 where "2006-1-1" between f1 and f3;
|
||||
select f1 from t1 where cast("2006-1-1" as date) between f1 and f3;
|
||||
f1
|
||||
2006-01-01
|
||||
select f1 from t1 where "2006-1-1" between date(f1) and date(f3);
|
||||
select f1 from t1 where cast("2006-1-1" as date) between date(f1) and date(f3);
|
||||
f1
|
||||
2006-01-01
|
||||
select f1 from t1 where "2006-1-1" between f1 and 'zzz';
|
||||
select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date);
|
||||
f1
|
||||
Warnings:
|
||||
Warning 1292 Incorrect date value: 'zzz' for column 'f1' at row 1
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'zzz'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'zzz'
|
||||
Warning 1292 Incorrect datetime value: 'zzz'
|
||||
Warning 1292 Incorrect datetime value: 'zzz'
|
||||
select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
|
||||
f1
|
||||
2006-01-01
|
||||
@@ -891,6 +890,18 @@ t1 CREATE TABLE `t1` (
|
||||
`from_unixtime(1) + 0` double(23,6) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
SET character_set_results = NULL;
|
||||
SHOW VARIABLES LIKE 'character_set_results';
|
||||
Variable_name Value
|
||||
character_set_results
|
||||
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||
fmtddate field2
|
||||
Sep-4 12:00AM abcd
|
||||
DROP TABLE testBug8868;
|
||||
SET NAMES DEFAULT;
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
|
||||
union
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
|
||||
|
||||
@@ -703,7 +703,7 @@ def test t1 t1 g g 255 4294967295 0 Y 144 0 63
|
||||
g
|
||||
select asbinary(g) from t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def asbinary(g) 252 8192 0 Y 128 0 63
|
||||
def asbinary(g) 252 16777216 0 Y 128 0 63
|
||||
asbinary(g)
|
||||
drop table t1;
|
||||
create table t1 select GeomFromText('point(1 1)');
|
||||
|
||||
@@ -233,7 +233,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -245,7 +245,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -257,7 +257,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -269,7 +269,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
set optimizer_search_depth=1;
|
||||
select @@optimizer_search_depth;
|
||||
@@optimizer_search_depth
|
||||
@@ -385,7 +385,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -397,7 +397,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -409,7 +409,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 6
|
||||
@@ -421,7 +421,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
|
||||
show status like 'Last_query_cost';
|
||||
Variable_name Value
|
||||
Last_query_cost 274.418727
|
||||
Last_query_cost 289.418727
|
||||
set optimizer_prune_level=1;
|
||||
select @@optimizer_prune_level;
|
||||
@@optimizer_prune_level
|
||||
|
||||
@@ -807,8 +807,8 @@ explain
|
||||
SELECT straight_join sql_no_cache v1.a, v1.b, v1.real_b from t2, v1
|
||||
where t2.b=v1.a GROUP BY t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 index b b 2 NULL 10 Using index
|
||||
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 1 test.t2.b 1
|
||||
1 SIMPLE t2 index b b 2 NULL 10 Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 1 test.t2.b 1
|
||||
SELECT straight_join sql_no_cache v1.a, v1.b, v1.real_b from t2, v1
|
||||
where t2.b=v1.a GROUP BY t2.b;
|
||||
a b real_b
|
||||
|
||||
517
mysql-test/r/handler_innodb.result
Normal file
517
mysql-test/r/handler_innodb.result
Normal file
@@ -0,0 +1,517 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1,t3,t4,t5;
|
||||
create table t1 (a int, b char(10), key a(a), key b(a,b));
|
||||
insert into t1 values
|
||||
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
|
||||
(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
handler t1 open as t2;
|
||||
handler t2 read a=(SELECT 1);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1
|
||||
handler t2 read a first;
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a next;
|
||||
a b
|
||||
16 ccc
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a last;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
20 ggg
|
||||
handler t2 read a first;
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
handler t2 read a last;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t2 read a next;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a=(16);
|
||||
a b
|
||||
16 ccc
|
||||
handler t2 read a=(19,"fff");
|
||||
ERROR 42000: Too many key parts specified; max 1 parts allowed
|
||||
handler t2 read b=(19,"fff");
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read b=(19,"yyy");
|
||||
a b
|
||||
19 yyy
|
||||
handler t2 read b=(19);
|
||||
a b
|
||||
19 fff
|
||||
handler t1 read a last;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t2 read a=(11);
|
||||
a b
|
||||
handler t2 read a>=(11);
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a>=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a>(18);
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read a<=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a<(18);
|
||||
a b
|
||||
17 ddd
|
||||
handler t2 read a first limit 5;
|
||||
a b
|
||||
14 aaa
|
||||
15 bbb
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
handler t2 read a next limit 3;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
handler t2 read a prev limit 10;
|
||||
a b
|
||||
19 fff
|
||||
18 eee
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
15 bbb
|
||||
14 aaa
|
||||
handler t2 read a>=(16) limit 4;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
handler t2 read a>=(16) limit 2,2;
|
||||
a b
|
||||
17 ddd
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
handler t2 read a=(19);
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read a=(19) where b="yyy";
|
||||
a b
|
||||
19 yyy
|
||||
handler t2 read first;
|
||||
a b
|
||||
17 ddd
|
||||
handler t2 read next;
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read next;
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read last;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
||||
handler t2 close;
|
||||
handler t1 open;
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
a b
|
||||
17 ddd
|
||||
alter table t1 engine = InnoDB;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open as t2;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (17);
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open as t2;
|
||||
alter table t1 engine=MEMORY;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6);
|
||||
delete from t1 limit 2;
|
||||
handler t1 open;
|
||||
handler t1 read first;
|
||||
a
|
||||
3
|
||||
handler t1 read first limit 1,1;
|
||||
a
|
||||
4
|
||||
handler t1 read first limit 2,2;
|
||||
a
|
||||
5
|
||||
6
|
||||
delete from t1 limit 3;
|
||||
handler t1 read first;
|
||||
a
|
||||
6
|
||||
drop table t1;
|
||||
create table t1(a int, index(a));
|
||||
insert into t1 values (1), (2), (3);
|
||||
handler t1 open;
|
||||
handler t1 read a=(W);
|
||||
ERROR 42S22: Unknown column 'W' in 'field list'
|
||||
handler t1 read a=(a);
|
||||
ERROR HY000: Incorrect arguments to HANDLER ... READ
|
||||
drop table t1;
|
||||
create table t1 (a char(5));
|
||||
insert into t1 values ("Ok");
|
||||
handler t1 open as t;
|
||||
handler t read first;
|
||||
a
|
||||
Ok
|
||||
use mysql;
|
||||
handler t read first;
|
||||
a
|
||||
Ok
|
||||
handler t close;
|
||||
handler test.t1 open as t;
|
||||
handler t read first;
|
||||
a
|
||||
Ok
|
||||
handler t close;
|
||||
use test;
|
||||
drop table t1;
|
||||
create table t1 ( a int, b int, INDEX a (a) );
|
||||
insert into t1 values (1,2), (2,1);
|
||||
handler t1 open;
|
||||
handler t1 read a=(1) where b=2;
|
||||
a b
|
||||
1 2
|
||||
handler t1 read a=(1) where b=3;
|
||||
a b
|
||||
handler t1 read a=(1) where b=1;
|
||||
a b
|
||||
handler t1 close;
|
||||
drop table t1;
|
||||
drop database if exists test_test;
|
||||
create database test_test;
|
||||
use test_test;
|
||||
create table t1(table_id char(20) primary key);
|
||||
insert into t1 values ('test_test.t1');
|
||||
insert into t1 values ('');
|
||||
handler t1 open;
|
||||
handler t1 read first limit 9;
|
||||
table_id
|
||||
|
||||
test_test.t1
|
||||
create table t2(table_id char(20) primary key);
|
||||
insert into t2 values ('test_test.t2');
|
||||
insert into t2 values ('');
|
||||
handler t2 open;
|
||||
handler t2 read first limit 9;
|
||||
table_id
|
||||
|
||||
test_test.t2
|
||||
use test;
|
||||
drop table if exists t1;
|
||||
create table t1(table_id char(20) primary key);
|
||||
insert into t1 values ('test.t1');
|
||||
insert into t1 values ('');
|
||||
handler t1 open;
|
||||
ERROR 42000: Not unique table/alias: 't1'
|
||||
use test;
|
||||
handler test.t1 read first limit 9;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read first limit 9' at line 1
|
||||
handler test_test.t1 read first limit 9;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read first limit 9' at line 1
|
||||
handler t1 read first limit 9;
|
||||
table_id
|
||||
|
||||
test_test.t1
|
||||
handler test_test.t2 read first limit 9;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read first limit 9' at line 1
|
||||
handler t2 read first limit 9;
|
||||
table_id
|
||||
|
||||
test_test.t2
|
||||
handler test_test.t1 close;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'close' at line 1
|
||||
handler t1 close;
|
||||
drop table test_test.t1;
|
||||
handler test_test.t2 close;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'close' at line 1
|
||||
handler t2 close;
|
||||
drop table test_test.t2;
|
||||
drop database test_test;
|
||||
use test;
|
||||
handler test.t1 close;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'close' at line 1
|
||||
handler t1 close;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
drop table test.t1;
|
||||
drop database if exists test_test;
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
drop table if exists t3;
|
||||
create database test_test;
|
||||
use test_test;
|
||||
create table t1 (c1 char(20));
|
||||
insert into t1 values ('test_test.t1');
|
||||
create table t3 (c1 char(20));
|
||||
insert into t3 values ('test_test.t3');
|
||||
handler t1 open;
|
||||
handler t1 read first limit 9;
|
||||
c1
|
||||
test_test.t1
|
||||
handler t1 open h1;
|
||||
handler h1 read first limit 9;
|
||||
c1
|
||||
test_test.t1
|
||||
use test;
|
||||
create table t1 (c1 char(20));
|
||||
create table t2 (c1 char(20));
|
||||
create table t3 (c1 char(20));
|
||||
insert into t1 values ('t1');
|
||||
insert into t2 values ('t2');
|
||||
insert into t3 values ('t3');
|
||||
handler t1 open;
|
||||
ERROR 42000: Not unique table/alias: 't1'
|
||||
handler t2 open t1;
|
||||
ERROR 42000: Not unique table/alias: 't1'
|
||||
handler t3 open t1;
|
||||
ERROR 42000: Not unique table/alias: 't1'
|
||||
handler t1 read first limit 9;
|
||||
c1
|
||||
test_test.t1
|
||||
handler test.t1 close;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'close' at line 1
|
||||
handler test.t1 open h1;
|
||||
ERROR 42000: Not unique table/alias: 'h1'
|
||||
handler test_test.t1 open h1;
|
||||
ERROR 42000: Not unique table/alias: 'h1'
|
||||
handler test_test.t3 open h3;
|
||||
handler test.t1 open h2;
|
||||
handler t1 read first limit 9;
|
||||
c1
|
||||
test_test.t1
|
||||
handler h1 read first limit 9;
|
||||
c1
|
||||
test_test.t1
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
test_test.t3
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
handler test.h1 close;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'close' at line 1
|
||||
handler t1 close;
|
||||
handler h1 close;
|
||||
handler h2 close;
|
||||
handler t1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler h1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1' in HANDLER
|
||||
handler h2 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h2' in HANDLER
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
test_test.t3
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
test_test.t3
|
||||
use test_test;
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
test_test.t3
|
||||
handler test.h3 read first limit 9;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read first limit 9' at line 1
|
||||
handler h3 close;
|
||||
use test;
|
||||
drop table t3;
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
drop database test_test;
|
||||
create table t1 (c1 char(20));
|
||||
insert into t1 values ("t1");
|
||||
handler t1 open as h1;
|
||||
handler h1 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
create table t2 (c1 char(20));
|
||||
insert into t2 values ("t2");
|
||||
handler t2 open as h2;
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t2
|
||||
create table t3 (c1 char(20));
|
||||
insert into t3 values ("t3");
|
||||
handler t3 open as h3;
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
t3
|
||||
create table t4 (c1 char(20));
|
||||
insert into t4 values ("t4");
|
||||
handler t4 open as h4;
|
||||
handler h4 read first limit 9;
|
||||
c1
|
||||
t4
|
||||
create table t5 (c1 char(20));
|
||||
insert into t5 values ("t5");
|
||||
handler t5 open as h5;
|
||||
handler h5 read first limit 9;
|
||||
c1
|
||||
t5
|
||||
alter table t1 engine=MyISAM;
|
||||
handler h1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1' in HANDLER
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t2
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
t3
|
||||
handler h4 read first limit 9;
|
||||
c1
|
||||
t4
|
||||
handler h5 read first limit 9;
|
||||
c1
|
||||
t5
|
||||
alter table t5 engine=MyISAM;
|
||||
handler h1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1' in HANDLER
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t2
|
||||
handler h3 read first limit 9;
|
||||
c1
|
||||
t3
|
||||
handler h4 read first limit 9;
|
||||
c1
|
||||
t4
|
||||
handler h5 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h5' in HANDLER
|
||||
alter table t3 engine=MyISAM;
|
||||
handler h1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1' in HANDLER
|
||||
handler h2 read first limit 9;
|
||||
c1
|
||||
t2
|
||||
handler h3 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h3' in HANDLER
|
||||
handler h4 read first limit 9;
|
||||
c1
|
||||
t4
|
||||
handler h5 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h5' in HANDLER
|
||||
handler h2 close;
|
||||
handler h4 close;
|
||||
handler t1 open as h1_1;
|
||||
handler t1 open as h1_2;
|
||||
handler t1 open as h1_3;
|
||||
handler h1_1 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
handler h1_2 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
handler h1_3 read first limit 9;
|
||||
c1
|
||||
t1
|
||||
alter table t1 engine=InnoDB;
|
||||
handler h1_1 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1_1' in HANDLER
|
||||
handler h1_2 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1_2' in HANDLER
|
||||
handler h1_3 read first limit 9;
|
||||
ERROR 42S02: Unknown table 'h1_3' in HANDLER
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
||||
drop table t5;
|
||||
create table t1 (c1 int);
|
||||
insert into t1 values (1);
|
||||
handler t1 open;
|
||||
handler t1 read first;
|
||||
c1
|
||||
1
|
||||
send the below to another connection, do not wait for the result
|
||||
optimize table t1;
|
||||
proceed with the normal connection
|
||||
handler t1 read next;
|
||||
c1
|
||||
1
|
||||
handler t1 close;
|
||||
read the result from the other connection
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
proceed with the normal connection
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2));
|
||||
INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ `primary` = (1, 1000);
|
||||
no1 no2
|
||||
HANDLER t1 READ `primary` PREV;
|
||||
no1 no2
|
||||
1 275
|
||||
DROP TABLE t1;
|
||||
create table t1 (c1 int);
|
||||
insert into t1 values (14397);
|
||||
flush tables with read lock;
|
||||
drop table t1;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
send the below to another connection, do not wait for the result
|
||||
drop table t1;
|
||||
proceed with the normal connection
|
||||
select * from t1;
|
||||
c1
|
||||
14397
|
||||
unlock tables;
|
||||
read the result from the other connection
|
||||
proceed with the normal connection
|
||||
select * from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
@@ -1,3 +1,4 @@
|
||||
SET SESSION STORAGE_ENGINE = MyISAM;
|
||||
drop table if exists t1,t3,t4,t5;
|
||||
create table t1 (a int, b char(10), key a(a), key b(a,b));
|
||||
insert into t1 values
|
||||
@@ -137,6 +138,29 @@ a b
|
||||
handler t2 read last;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
||||
handler t2 close;
|
||||
handler t1 open;
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
a b
|
||||
17 ddd
|
||||
alter table t1 engine = MyISAM;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open as t2;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
@@ -144,7 +168,7 @@ insert into t1 values (17);
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
handler t1 open as t2;
|
||||
alter table t1 engine=MyISAM;
|
||||
alter table t1 engine=MEMORY;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
drop table t1;
|
||||
@@ -463,6 +487,15 @@ Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
proceed with the normal connection
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2));
|
||||
INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ `primary` = (1, 1000);
|
||||
no1 no2
|
||||
HANDLER t1 READ `primary` PREV;
|
||||
no1 no2
|
||||
1 275
|
||||
DROP TABLE t1;
|
||||
create table t1 (c1 int);
|
||||
insert into t1 values (14397);
|
||||
flush tables with read lock;
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_archive YES
|
||||
@@ -1,2 +1,2 @@
|
||||
Variable_name Value
|
||||
have_ndbcluster YES
|
||||
binlog_format MIXED
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_blackhole_engine YES
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_csv YES
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_example_engine YES
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_federated_engine YES
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_innodb YES
|
||||
@@ -1,2 +0,0 @@
|
||||
ndb_status_ok
|
||||
YES
|
||||
@@ -1,2 +0,0 @@
|
||||
Variable_name Value
|
||||
have_raid YES
|
||||
@@ -354,7 +354,7 @@ t3 1 a 2 b NULL 13 NULL NULL HASH
|
||||
explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref heap_idx heap_idx 22 const 7 Using where
|
||||
1 SIMPLE t3 ref a a 44 const,const 7 Using where
|
||||
1 SIMPLE t3 ref a a 44 func,const 7 Using where
|
||||
drop table t1, t2, t3;
|
||||
create temporary table t1 ( a int, index (a) ) engine=memory;
|
||||
insert into t1 values (1),(2),(3),(4),(5);
|
||||
|
||||
@@ -8,3 +8,17 @@ mysqld2 offline
|
||||
Killing the process...
|
||||
Sleeping...
|
||||
Success: the process was restarted.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
-- Test for BUG#12751
|
||||
--------------------------------------------------------------------
|
||||
START INSTANCE mysqld2;
|
||||
Success: the process has been started.
|
||||
Killing the process...
|
||||
Sleeping...
|
||||
Success: the process was restarted.
|
||||
SHOW INSTANCE STATUS mysqld1;
|
||||
instance_name state version_number version mysqld_compatible
|
||||
mysqld1 online VERSION_NUMBER VERSION no
|
||||
STOP INSTANCE mysqld2;
|
||||
Success: the process has been stopped.
|
||||
|
||||
@@ -1,426 +0,0 @@
|
||||
drop table if exists t0, t1, t2, t3, t4;
|
||||
create table t0
|
||||
(
|
||||
key1 int not null,
|
||||
INDEX i1(key1)
|
||||
);
|
||||
alter table t0 add key2 int not null, add index i2(key2);
|
||||
alter table t0 add key3 int not null, add index i3(key3);
|
||||
alter table t0 add key4 int not null, add index i4(key4);
|
||||
alter table t0 add key5 int not null, add index i5(key5);
|
||||
alter table t0 add key6 int not null, add index i6(key6);
|
||||
alter table t0 add key7 int not null, add index i7(key7);
|
||||
alter table t0 add key8 int not null, add index i8(key8);
|
||||
update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1024-key1;
|
||||
analyze table t0;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t0 analyze status OK
|
||||
explain select * from t0 where key1 < 3 or key1 > 1020;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 78 Using where
|
||||
explain
|
||||
select * from t0 where key1 < 3 or key2 > 1020;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 45 Using sort_union(i1,i2); Using where
|
||||
select * from t0 where key1 < 3 or key2 > 1020;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 1023
|
||||
2 2 2 2 2 2 2 1022
|
||||
1021 1021 1021 1021 1021 1021 1021 3
|
||||
1022 1022 1022 1022 1022 1022 1022 2
|
||||
1023 1023 1023 1023 1023 1023 1023 1
|
||||
1024 1024 1024 1024 1024 1024 1024 0
|
||||
explain select * from t0 where key1 < 3 or key2 <4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
|
||||
explain
|
||||
select * from t0 where (key1 > 30 and key1<35) or (key2 >32 and key2 < 40);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 11 Using sort_union(i1,i2); Using where
|
||||
select * from t0 where (key1 > 30 and key1<35) or (key2 >32 and key2 < 40);
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
31 31 31 31 31 31 31 993
|
||||
32 32 32 32 32 32 32 992
|
||||
33 33 33 33 33 33 33 991
|
||||
34 34 34 34 34 34 34 990
|
||||
35 35 35 35 35 35 35 989
|
||||
36 36 36 36 36 36 36 988
|
||||
37 37 37 37 37 37 37 987
|
||||
38 38 38 38 38 38 38 986
|
||||
39 39 39 39 39 39 39 985
|
||||
explain select * from t0 ignore index (i2) where key1 < 3 or key2 <4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 where (key1 < 3 or key2 <4) and key3 = 50;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ref i1,i2,i3 i3 4 const 1 Using where
|
||||
explain select * from t0 use index (i1,i2) where (key1 < 3 or key2 <4) and key3 = 50;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
|
||||
explain select * from t0 where (key1 > 1 or key2 > 2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 force index (i1,i2) where (key1 > 1 or key2 > 2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 1024 Using sort_union(i1,i2); Using where
|
||||
explain
|
||||
select * from t0 where key1<3 or key2<3 or (key1>5 and key1<8) or
|
||||
(key1>10 and key1<12) or (key2>100 and key2<110);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 17 Using sort_union(i1,i2); Using where
|
||||
explain select * from t0 where key2 = 45 or key1 <=> null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1,i2 i2 4 NULL 1 Using where
|
||||
explain select * from t0 where key2 = 45 or key1 is not null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 where key2 = 45 or key1 is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ref i2 i2 4 const 1
|
||||
explain select * from t0 where key2=10 or key3=3 or key4 <=> null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i2,i3,i4 i2,i3 4,4 NULL 2 Using union(i2,i3); Using where
|
||||
explain select * from t0 where key2=10 or key3=3 or key4 is null;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i2,i3 i2,i3 4,4 NULL 2 Using union(i2,i3); Using where
|
||||
explain select key1 from t0 where (key1 <=> null) or (key2 < 5) or
|
||||
(key3=10) or (key4 <=> null);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i4 i2,i3 4,4 NULL 6 Using sort_union(i2,i3); Using where
|
||||
explain select key1 from t0 where (key1 <=> null) or (key1 < 5) or
|
||||
(key3=10) or (key4 <=> null);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i3,i4 i1,i3 4,4 NULL 6 Using sort_union(i1,i3); Using where
|
||||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 5 or key6 < 5);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
|
||||
explain
|
||||
select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 9 Using sort_union(i1,i2); Using where
|
||||
select * from t0 where (key1 < 3 or key2 < 6) and (key1 < 7 or key3 < 4);
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 1023
|
||||
2 2 2 2 2 2 2 1022
|
||||
3 3 3 3 3 3 3 1021
|
||||
4 4 4 4 4 4 4 1020
|
||||
5 5 5 5 5 5 5 1019
|
||||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 4 or key4 < 4) and (key5 < 2 or key6 < 2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i4,i5,i6 i1,i2 4,4 NULL 6 Using sort_union(i1,i2); Using where
|
||||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 100);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using where
|
||||
explain select * from t0 where
|
||||
(key1 < 3 or key2 < 3) and (key3 < 1000);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2,i3 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 where
|
||||
((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4))
|
||||
or
|
||||
key2 > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2,i3 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 where
|
||||
((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4))
|
||||
or
|
||||
key1 < 7;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
|
||||
select * from t0 where
|
||||
((key1 < 4 or key2 < 4) and (key2 <5 or key3 < 4))
|
||||
or
|
||||
key1 < 7;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 1023
|
||||
2 2 2 2 2 2 2 1022
|
||||
3 3 3 3 3 3 3 1021
|
||||
4 4 4 4 4 4 4 1020
|
||||
5 5 5 5 5 5 5 1019
|
||||
6 6 6 6 6 6 6 1018
|
||||
explain select * from t0 where
|
||||
((key1 < 4 or key2 < 4) and (key3 <5 or key5 < 4))
|
||||
or
|
||||
((key5 < 5 or key6 < 6) and (key7 <7 or key8 < 4));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i1,i2,i5,i6 4,4,4,4 NULL 19 Using sort_union(i1,i2,i5,i6); Using where
|
||||
explain select * from t0 where
|
||||
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
|
||||
or
|
||||
((key7 <7 or key8 < 4) and (key5 < 5 or key6 < 6));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7,i8 i3,i5,i7,i8 4,4,4,4 NULL 20 Using sort_union(i3,i5,i7,i8); Using where
|
||||
explain select * from t0 where
|
||||
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
|
||||
or
|
||||
((key3 <7 or key5 < 2) and (key5 < 5 or key6 < 6));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where
|
||||
explain select * from t0 where
|
||||
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
|
||||
or
|
||||
(((key3 <7 and key7 < 6) or key5 < 2) and (key5 < 5 or key6 < 6));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6,i7 i3,i5 4,4 NULL 11 Using sort_union(i3,i5); Using where
|
||||
explain select * from t0 where
|
||||
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
|
||||
or
|
||||
((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2,i3,i5,i6 NULL NULL NULL 1024 Using where
|
||||
explain select * from t0 force index(i1, i2, i3, i4, i5, i6 ) where
|
||||
((key3 <5 or key5 < 4) and (key1 < 4 or key2 < 4))
|
||||
or
|
||||
((key3 >=5 or key5 < 2) and (key5 < 5 or key6 < 6));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2,i3,i5,i6 i3,i5 0,4 NULL 1024 Using sort_union(i3,i5); Using where
|
||||
select * from t0 where key1 < 5 or key8 < 4 order by key1;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 1023
|
||||
2 2 2 2 2 2 2 1022
|
||||
3 3 3 3 3 3 3 1021
|
||||
4 4 4 4 4 4 4 1020
|
||||
1021 1021 1021 1021 1021 1021 1021 3
|
||||
1022 1022 1022 1022 1022 1022 1022 2
|
||||
1023 1023 1023 1023 1023 1023 1023 1
|
||||
1024 1024 1024 1024 1024 1024 1024 0
|
||||
explain
|
||||
select * from t0 where key1 < 5 or key8 < 4 order by key1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i8 i1,i8 4,4 NULL 9 Using sort_union(i1,i8); Using where; Using filesort
|
||||
create table t2 like t0;
|
||||
insert into t2 select * from t0;
|
||||
alter table t2 add index i1_3(key1, key3);
|
||||
alter table t2 add index i2_3(key2, key3);
|
||||
alter table t2 drop index i1;
|
||||
alter table t2 drop index i2;
|
||||
alter table t2 add index i321(key3, key2, key1);
|
||||
explain select key3 from t2 where key1 = 100 or key2 = 100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index_merge i1_3,i2_3 i1_3,i2_3 4,4 NULL 2 Using sort_union(i1_3,i2_3); Using where
|
||||
explain select key3 from t2 where key1 <100 or key2 < 100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index i1_3,i2_3 i321 12 NULL 1024 Using where; Using index
|
||||
explain select key7 from t2 where key1 <100 or key2 < 100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL i1_3,i2_3 NULL NULL NULL 1024 Using where
|
||||
create table t4 (
|
||||
key1a int not null,
|
||||
key1b int not null,
|
||||
key2 int not null,
|
||||
key2_1 int not null,
|
||||
key2_2 int not null,
|
||||
key3 int not null,
|
||||
index i1a (key1a, key1b),
|
||||
index i1b (key1b, key1a),
|
||||
index i2_1(key2, key2_1),
|
||||
index i2_2(key2, key2_1)
|
||||
);
|
||||
insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0;
|
||||
select * from t4 where key1a = 3 or key1b = 4;
|
||||
key1a key1b key2 key2_1 key2_2 key3
|
||||
3 3 0 3 3 3
|
||||
4 4 0 4 4 4
|
||||
explain select * from t4 where key1a = 3 or key1b = 4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 index_merge i1a,i1b i1a,i1b 4,4 NULL 2 Using sort_union(i1a,i1b); Using where
|
||||
explain select * from t4 where key2 = 1 and (key2_1 = 1 or key3 = 5);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where
|
||||
explain select * from t4 where key2 = 1 and (key2_1 = 1 or key2_2 = 5);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ref i2_1,i2_2 i2_1 4 const 10 Using where
|
||||
explain select * from t4 where key2_1 = 1 or key2_2 = 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 1024 Using where
|
||||
create table t1 like t0;
|
||||
insert into t1 select * from t0;
|
||||
explain select * from t0 left join t1 on (t0.key1=t1.key1)
|
||||
where t0.key1=3 or t0.key2=4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
|
||||
1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1
|
||||
select * from t0 left join t1 on (t0.key1=t1.key1)
|
||||
where t0.key1=3 or t0.key2=4;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8 key1 key2 key3 key4 key5 key6 key7 key8
|
||||
3 3 3 3 3 3 3 1021 3 3 3 3 3 3 3 1021
|
||||
4 4 4 4 4 4 4 1020 4 4 4 4 4 4 4 1020
|
||||
explain
|
||||
select * from t0,t1 where (t0.key1=t1.key1) and ( t0.key1=3 or t0.key2=4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
|
||||
1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1
|
||||
explain
|
||||
select * from t0,t1 where (t0.key1=t1.key1) and
|
||||
(t0.key1=3 or t0.key2=4) and t1.key1<200;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ALL i1,i2 NULL NULL NULL 1024 Using where
|
||||
1 SIMPLE t1 ref i1 i1 4 test.t0.key1 1
|
||||
explain
|
||||
select * from t0,t1 where (t0.key1=t1.key1) and
|
||||
(t0.key1=3 or t0.key2<4) and t1.key1=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ref i1,i2 i1 4 const 1 Using where
|
||||
1 SIMPLE t1 ref i1 i1 4 const 1
|
||||
explain select * from t0,t1 where t0.key1 = 5 and
|
||||
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 ref i1 i1 4 const 1
|
||||
1 SIMPLE t1 index_merge i1,i8 i1,i8 4,4 NULL 2 Using union(i1,i8); Using where
|
||||
explain select * from t0,t1 where t0.key1 < 3 and
|
||||
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 range i1 i1 4 NULL 3 Using where
|
||||
1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81)
|
||||
explain select * from t1 where key1=3 or key2=4
|
||||
union select * from t1 where key1<4 or key3=5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
|
||||
2 UNION t1 index_merge i1,i3 i1,i3 4,4 NULL 5 Using sort_union(i1,i3); Using where
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
|
||||
explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
|
||||
2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
|
||||
create table t3 like t0;
|
||||
insert into t3 select * from t0;
|
||||
alter table t3 add key9 int not null, add index i9(key9);
|
||||
alter table t3 add keyA int not null, add index iA(keyA);
|
||||
alter table t3 add keyB int not null, add index iB(keyB);
|
||||
alter table t3 add keyC int not null, add index iC(keyC);
|
||||
update t3 set key9=key1,keyA=key1,keyB=key1,keyC=key1;
|
||||
explain select * from t3 where
|
||||
key1=1 or key2=2 or key3=3 or key4=4 or
|
||||
key5=5 or key6=6 or key7=7 or key8=8 or
|
||||
key9=9 or keyA=10 or keyB=11 or keyC=12;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 index_merge i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC 4,4,4,4,4,4,4,4,4,4,4,4 NULL 12 Using union(i1,i2,i3,i4,i5,i6,i7,i8,i9,iA,iB,iC); Using where
|
||||
select * from t3 where
|
||||
key1=1 or key2=2 or key3=3 or key4=4 or
|
||||
key5=5 or key6=6 or key7=7 or key8=8 or
|
||||
key9=9 or keyA=10 or keyB=11 or keyC=12;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8 key9 keyA keyB keyC
|
||||
1 1 1 1 1 1 1 1023 1 1 1 1
|
||||
2 2 2 2 2 2 2 1022 2 2 2 2
|
||||
3 3 3 3 3 3 3 1021 3 3 3 3
|
||||
4 4 4 4 4 4 4 1020 4 4 4 4
|
||||
5 5 5 5 5 5 5 1019 5 5 5 5
|
||||
6 6 6 6 6 6 6 1018 6 6 6 6
|
||||
7 7 7 7 7 7 7 1017 7 7 7 7
|
||||
9 9 9 9 9 9 9 1015 9 9 9 9
|
||||
10 10 10 10 10 10 10 1014 10 10 10 10
|
||||
11 11 11 11 11 11 11 1013 11 11 11 11
|
||||
12 12 12 12 12 12 12 1012 12 12 12 12
|
||||
1016 1016 1016 1016 1016 1016 1016 8 1016 1016 1016 1016
|
||||
explain select * from t0 where key1 < 3 or key2 < 4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t0 index_merge i1,i2 i1,i2 4,4 NULL 7 Using sort_union(i1,i2); Using where
|
||||
select * from t0 where key1 < 3 or key2 < 4;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 1023
|
||||
2 2 2 2 2 2 2 1022
|
||||
3 3 3 3 3 3 3 1021
|
||||
update t0 set key8=123 where key1 < 3 or key2 < 4;
|
||||
select * from t0 where key1 < 3 or key2 < 4;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
1 1 1 1 1 1 1 123
|
||||
2 2 2 2 2 2 2 123
|
||||
3 3 3 3 3 3 3 123
|
||||
delete from t0 where key1 < 3 or key2 < 4;
|
||||
select * from t0 where key1 < 3 or key2 < 4;
|
||||
key1 key2 key3 key4 key5 key6 key7 key8
|
||||
select count(*) from t0;
|
||||
count(*)
|
||||
1021
|
||||
drop table t4;
|
||||
create table t4 (a int);
|
||||
insert into t4 values (1),(4),(3);
|
||||
set @save_join_buffer_size=@@join_buffer_size;
|
||||
set join_buffer_size= 4000;
|
||||
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
and (B.key1 < 500000 or B.key2 < 3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1013 Using sort_union(i1,i2); Using where
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
and (B.key1 < 500000 or B.key2 < 3);
|
||||
max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
10240
|
||||
update t0 set key1=1;
|
||||
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 = 1 or A.key2 = 1)
|
||||
and (B.key1 = 1 or B.key2 = 1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where
|
||||
1 SIMPLE B index_merge i1,i2 i1,i2 4,4 NULL 1020 Using union(i1,i2); Using where
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 = 1 or A.key2 = 1)
|
||||
and (B.key1 = 1 or B.key2 = 1);
|
||||
max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
8194
|
||||
alter table t0 add filler1 char(200), add filler2 char(200), add filler3 char(200);
|
||||
update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500;
|
||||
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A, t0 as B
|
||||
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
|
||||
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
|
||||
1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL # Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
|
||||
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A, t0 as B
|
||||
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
|
||||
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
|
||||
max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
8186
|
||||
set join_buffer_size= @save_join_buffer_size;
|
||||
drop table t0, t1, t2, t3, t4;
|
||||
CREATE TABLE t1 (
|
||||
cola char(3) not null, colb char(3) not null, filler char(200),
|
||||
key(cola), key(colb)
|
||||
);
|
||||
INSERT INTO t1 VALUES ('foo','bar', 'ZZ'),('fuz','baz', 'ZZ');
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
8704
|
||||
explain select * from t1 WHERE cola = 'foo' AND colb = 'bar';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge cola,colb cola,colb 3,3 NULL 32 Using intersect(cola,colb); Using where
|
||||
explain select * from t1 force index(cola,colb) WHERE cola = 'foo' AND colb = 'bar';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge cola,colb cola,colb 3,3 NULL 32 Using intersect(cola,colb); Using where
|
||||
drop table t1;
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t1 (
|
||||
a int, b int,
|
||||
filler1 char(200), filler2 char(200),
|
||||
key(a),key(b)
|
||||
);
|
||||
insert into t1 select @v:= A.a, @v, 't1', 'filler2' from t0 A, t0 B, t0 C;
|
||||
create table t2 like t1;
|
||||
create table t3 (
|
||||
a int, b int,
|
||||
filler1 char(200), filler2 char(200),
|
||||
key(a),key(b)
|
||||
) engine=merge union=(t1,t2);
|
||||
explain select * from t1 where a=1 and b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge a,b a,b 5,5 NULL # Using intersect(a,b); Using where
|
||||
explain select * from t3 where a=1 and b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 index_merge a,b a,b 5,5 NULL # Using intersect(a,b); Using where
|
||||
drop table t3;
|
||||
drop table t0, t1, t2;
|
||||
@@ -1,11 +1,13 @@
|
||||
#---------------- 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,
|
||||
key1 int not null,
|
||||
key2 int not null,
|
||||
INDEX i1(key1),
|
||||
INDEX i2(key2)
|
||||
) engine=innodb;
|
||||
);
|
||||
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
|
||||
@@ -26,7 +28,7 @@ key1 key2
|
||||
2 198
|
||||
3 197
|
||||
4 196
|
||||
alter table t1 add str1 char (255) not null,
|
||||
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;
|
||||
@@ -60,7 +62,7 @@ key2 integer not null,
|
||||
filler char (200),
|
||||
index (key1),
|
||||
index (key2)
|
||||
) engine=innodb;
|
||||
);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
explain select pk from t1 where key1 = 1 and key2 = 1;
|
||||
@@ -91,14 +93,14 @@ filler1 char (200),
|
||||
index i1(key1a, key1b),
|
||||
index i2(key2a, key2b),
|
||||
index i3(key3a, key3b)
|
||||
) engine=innodb;
|
||||
);
|
||||
create table t2 (a int);
|
||||
insert into t2 values (0),(1),(2),(3),(4),(NULL);
|
||||
insert into t1 (key1a, key1b, key2a, key2b, key3a, key3b)
|
||||
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)
|
||||
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)
|
||||
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
|
||||
@@ -106,19 +108,19 @@ test.t1 analyze status OK
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
5184
|
||||
explain select count(*) from t1 where
|
||||
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 4 Using intersect(i1,i2); Using where; Using index
|
||||
select count(*) from t1 where
|
||||
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
|
||||
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 4 Using intersect(i1,i3); Using where; Using index
|
||||
select count(*) from t1 where
|
||||
select count(*) from t1 where
|
||||
key1a = 2 and key1b is null and key3a = 2 and key3b is null;
|
||||
count(*)
|
||||
4
|
||||
@@ -127,8 +129,8 @@ create table t1 (
|
||||
id1 int,
|
||||
id2 date ,
|
||||
index idx2 (id1,id2),
|
||||
index idx1 (id2)
|
||||
) engine = innodb;
|
||||
index idx1 (id2)
|
||||
);
|
||||
insert into t1 values(1,'20040101'), (2,'20040102');
|
||||
select * from t1 where id1 = 1 and id2= '20040101';
|
||||
id1 id2
|
||||
@@ -147,8 +149,8 @@ PRIMARY KEY (`oid`),
|
||||
KEY `fk_bbk_niederlassung` (`fk_bbk_niederlassung`),
|
||||
KEY `fk_wochentag` (`fk_wochentag`),
|
||||
KEY `ix_version` (`version`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
insert into t1 values
|
||||
) 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),
|
||||
@@ -174,25 +176,25 @@ insert into t1 values
|
||||
(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,
|
||||
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.uhrzeit_von AS uhrzeit_von,
|
||||
zeit1.uhrzeit_bis AS uhrzeit_bis,
|
||||
zeit1.geloescht AS geloescht,
|
||||
zeit1.version AS version
|
||||
from
|
||||
from
|
||||
t1 zeit1
|
||||
where
|
||||
(zeit1.version =
|
||||
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
|
||||
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)
|
||||
)
|
||||
)
|
||||
@@ -213,7 +215,7 @@ 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;
|
||||
);
|
||||
insert into t1 values
|
||||
('tm','2.5 ','a ',' ','',''), ('tm','2.5U','a ','stnd','',''),
|
||||
('da','3.3 ','b ',' ','',''), ('da','3.3U','b ','stnd','',''),
|
||||
@@ -275,9 +277,9 @@ primary key (pk),
|
||||
key idx1(a,b,c),
|
||||
key idx2(c),
|
||||
key idx3(kp1,kp2,kp3,kp4,kp5)
|
||||
) engine=innodb default charset=latin1;
|
||||
) default charset=latin1;
|
||||
set @fill=NULL;
|
||||
SELECT COUNT(*) FROM t1 WHERE b = 0 AND a = 0 AND c = 13286427 AND
|
||||
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
|
||||
@@ -309,7 +311,7 @@ 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 11 Using sort_union(i3,i2); Using where
|
||||
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
|
||||
@@ -322,3 +324,260 @@ key1 key2 key3
|
||||
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;
|
||||
create table t1 (
|
||||
pk int primary key,
|
||||
key1 int,
|
||||
key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2)
|
||||
);
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
pk key1 key2 filler filler2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
9 9 9 filler-data filler-data-2
|
||||
10 10 10 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
5 5 5 filler-data filler-data-2
|
||||
6 6 6 filler-data filler-data-2
|
||||
7 7 7 filler-data filler-data-2
|
||||
8 8 8 filler-data filler-data-2
|
||||
set @maxv=1000;
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1=18 or key1=60;
|
||||
pk key1 key2 filler filler2
|
||||
18 18 18 filler-data filler-data-2
|
||||
60 60 60 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1 < 3 or key1 > @maxv-11;
|
||||
pk key1 key2 filler filler2
|
||||
990 990 990 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or
|
||||
(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
|
||||
or
|
||||
(key1 < 5) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
drop table t1;
|
||||
#---------------- Clustered PK ROR-index_merge tests -----------------------------
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1;
|
||||
create table t1
|
||||
(
|
||||
pk1 int not null,
|
||||
pk2 int not null,
|
||||
key1 int not null,
|
||||
key2 int not null,
|
||||
pktail1ok int not null,
|
||||
pktail2ok int not null,
|
||||
pktail3bad int not null,
|
||||
pktail4bad int not null,
|
||||
pktail5bad int not null,
|
||||
pk2copy int not null,
|
||||
badkey int not null,
|
||||
filler1 char (200),
|
||||
filler2 char (200),
|
||||
key (key1),
|
||||
key (key2),
|
||||
/* keys with tails from CPK members */
|
||||
key (pktail1ok, pk1),
|
||||
key (pktail2ok, pk1, pk2),
|
||||
key (pktail3bad, pk2, pk1),
|
||||
key (pktail4bad, pk1, pk2copy),
|
||||
key (pktail5bad, pk1, pk2, pk2copy),
|
||||
primary key (pk1, pk2)
|
||||
);
|
||||
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using where
|
||||
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
|
||||
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
|
||||
1 11 0 0 0 0 0 0 0 11 0 filler-data-11 filler2
|
||||
1 12 0 0 0 0 0 0 0 12 0 filler-data-12 filler2
|
||||
1 13 0 0 0 0 0 0 0 13 0 filler-data-13 filler2
|
||||
1 14 0 0 0 0 0 0 0 14 0 filler-data-14 filler2
|
||||
1 15 0 0 0 0 0 0 0 15 0 filler-data-15 filler2
|
||||
1 16 0 0 0 0 0 0 0 16 0 filler-data-16 filler2
|
||||
1 17 0 0 0 0 0 0 0 17 0 filler-data-17 filler2
|
||||
1 18 0 0 0 0 0 0 0 18 0 filler-data-18 filler2
|
||||
1 19 0 0 0 0 0 0 0 19 0 filler-data-19 filler2
|
||||
explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index
|
||||
select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
pk1 pk2
|
||||
95 50
|
||||
95 51
|
||||
95 52
|
||||
95 53
|
||||
95 54
|
||||
95 55
|
||||
95 56
|
||||
95 57
|
||||
95 58
|
||||
95 59
|
||||
explain select * from t1 where badkey=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
|
||||
explain select * from t1 where pk1 < 7500 and key1 = 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where
|
||||
explain select * from t1 where pktail1ok=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
|
||||
explain select * from t1 where pktail2ok=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,pktail2ok key1,pktail2ok 4,4 NULL 1 Using intersect(key1,pktail2ok); Using where
|
||||
explain select * from t1 where (pktail2ok=1 and pk1< 50000) or key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where
|
||||
explain select * from t1 where pktail3bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail3bad key1 4 const 100 Using where
|
||||
explain select * from t1 where pktail4bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail4bad key1 4 const 100 Using where
|
||||
explain select * from t1 where pktail5bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail5bad key1 4 const 100 Using where
|
||||
explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index
|
||||
select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
|
||||
pk1 pk2 key1 key2
|
||||
95 50 10 10
|
||||
95 51 10 10
|
||||
95 52 10 10
|
||||
95 53 10 10
|
||||
95 54 10 10
|
||||
95 55 10 10
|
||||
95 56 10 10
|
||||
95 57 10 10
|
||||
95 58 10 10
|
||||
95 59 10 10
|
||||
drop table t1;
|
||||
create table t1
|
||||
(
|
||||
RUNID varchar(22),
|
||||
SUBMITNR varchar(5),
|
||||
ORDERNR char(1),
|
||||
PROGRAMM varchar(8),
|
||||
TESTID varchar(4),
|
||||
UCCHECK char(1),
|
||||
ETEXT varchar(80),
|
||||
ETEXT_TYPE char(1),
|
||||
INFO char(1),
|
||||
SEVERITY tinyint(3),
|
||||
TADIRFLAG char(1),
|
||||
PRIMARY KEY (RUNID,SUBMITNR,ORDERNR,PROGRAMM,TESTID,UCCHECK),
|
||||
KEY `TVERM~KEY` (PROGRAMM,TESTID,UCCHECK)
|
||||
) DEFAULT CHARSET=latin1;
|
||||
update t1 set `ETEXT` = '', `ETEXT_TYPE`='', `INFO`='', `SEVERITY`='', `TADIRFLAG`=''
|
||||
WHERE
|
||||
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
|
||||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (
|
||||
pk int primary key,
|
||||
key1 int,
|
||||
key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2)
|
||||
) engine=innodb;
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
pk key1 key2 filler filler2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
9 9 9 filler-data filler-data-2
|
||||
10 10 10 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
5 5 5 filler-data filler-data-2
|
||||
6 6 6 filler-data filler-data-2
|
||||
7 7 7 filler-data filler-data-2
|
||||
8 8 8 filler-data filler-data-2
|
||||
set @maxv=1000;
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1=18 or key1=60;
|
||||
pk key1 key2 filler filler2
|
||||
18 18 18 filler-data filler-data-2
|
||||
60 60 60 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or key1 < 3 or key1 > @maxv-11;
|
||||
pk key1 key2 filler filler2
|
||||
990 990 990 filler-data filler-data-2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk < 5) or (pk > 10 and pk < 15) or (pk >= 50 and pk < 55 ) or (pk > @maxv-10)
|
||||
or
|
||||
(key1 < 5) or (key1 > 10 and key1 < 15) or (key1 >= 50 and key1 < 55 ) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
select * from t1 where
|
||||
(pk > 10 and pk < 15) or (pk >= 50 and pk < 55 )
|
||||
or
|
||||
(key1 < 5) or (key1 > @maxv-10);
|
||||
pk key1 key2 filler filler2
|
||||
1 1 1 filler-data filler-data-2
|
||||
2 2 2 filler-data filler-data-2
|
||||
3 3 3 filler-data filler-data-2
|
||||
4 4 4 filler-data filler-data-2
|
||||
991 991 991 filler-data filler-data-2
|
||||
992 992 992 filler-data filler-data-2
|
||||
993 993 993 filler-data filler-data-2
|
||||
994 994 994 filler-data filler-data-2
|
||||
995 995 995 filler-data filler-data-2
|
||||
996 996 996 filler-data filler-data-2
|
||||
997 997 997 filler-data filler-data-2
|
||||
998 998 998 filler-data filler-data-2
|
||||
999 999 999 filler-data filler-data-2
|
||||
1000 1000 1000 filler-data filler-data-2
|
||||
11 11 11 filler-data filler-data-2
|
||||
12 12 12 filler-data filler-data-2
|
||||
13 13 13 filler-data filler-data-2
|
||||
14 14 14 filler-data filler-data-2
|
||||
50 50 50 filler-data filler-data-2
|
||||
51 51 51 filler-data filler-data-2
|
||||
52 52 52 filler-data filler-data-2
|
||||
53 53 53 filler-data filler-data-2
|
||||
54 54 54 filler-data filler-data-2
|
||||
drop table t1;
|
||||
1281
mysql-test/r/index_merge_myisam.result
Normal file
1281
mysql-test/r/index_merge_myisam.result
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,196 +0,0 @@
|
||||
drop table if exists t0,t1,t2;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
64801
|
||||
explain select key1,key2 from t1 where key1=100 and key2=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 77 Using intersect(key1,key2); Using where; Using index
|
||||
select key1,key2 from t1 where key1=100 and key2=100;
|
||||
key1 key2
|
||||
100 100
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 100 100 key1-key2-key3-key4
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, -1, -1, 'key1-key2');
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 100, 100, 'key4-key3');
|
||||
explain select key1,key2,filler1 from t1 where key1=100 and key2=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 77 Using intersect(key1,key2); Using where
|
||||
select key1,key2,filler1 from t1 where key1=100 and key2=100;
|
||||
key1 key2 filler1
|
||||
100 100 key1-key2-key3-key4
|
||||
100 100 key1-key2
|
||||
explain select key1,key2 from t1 where key1=100 and key2=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 77 Using intersect(key1,key2); Using where; Using index
|
||||
select key1,key2 from t1 where key1=100 and key2=100;
|
||||
key1 key2
|
||||
100 100
|
||||
100 100
|
||||
explain select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
|
||||
select key1,key2,key3,key4 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
key1 key2 key3 key4
|
||||
100 100 100 100
|
||||
100 100 -1 -1
|
||||
-1 -1 100 100
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 154 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 100 100 key1-key2-key3-key4
|
||||
100 100 -1 -1 key1-key2
|
||||
-1 -1 100 100 key4-key3
|
||||
explain select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3 key1,key2,key3 5,5,5 NULL 2 Using intersect(key1,key2,key3); Using where; Using index
|
||||
select key1,key2,key3 from t1 where key1=100 and key2=100 and key3=100;
|
||||
key1 key2 key3
|
||||
100 100 100
|
||||
insert into t1 (key1,key2,key3,key4,filler1) values (101,101,101,101, 'key1234-101');
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=101;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3 key1,key2,key3 5,5,5 NULL 83 Using union(intersect(key1,key2),key3); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=101;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 100 100 key1-key2-key3-key4
|
||||
100 100 -1 -1 key1-key2
|
||||
101 101 101 101 key1234-101
|
||||
select key1,key2, filler1 from t1 where key1=100 and key2=100;
|
||||
key1 key2 filler1
|
||||
100 100 key1-key2-key3-key4
|
||||
100 100 key1-key2
|
||||
update t1 set filler1='to be deleted' where key1=100 and key2=100;
|
||||
update t1 set key1=200,key2=200 where key1=100 and key2=100;
|
||||
delete from t1 where key1=200 and key2=200;
|
||||
select key1,key2,filler1 from t1 where key2=100 and key2=200;
|
||||
key1 key2 filler1
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
key1 key2 key3 key4 filler1
|
||||
-1 -1 100 100 key4-key3
|
||||
delete from t1 where key3=100 and key4=100;
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key1,key2,key3,key4 5,5,5,5 NULL 152 Using union(intersect(key1,key2),intersect(key3,key4)); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key1=100 and key2=100 or key3=100 and key4=100;
|
||||
key1 key2 key3 key4 filler1
|
||||
explain select key1,key2 from t1 where key1=100 and key2=100;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL 76 Using intersect(key1,key2); Using where; Using index
|
||||
select key1,key2 from t1 where key1=100 and key2=100;
|
||||
key1 key2
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-1');
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-2');
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (100, 100, 200, 200,'key1-key2-key3-key4-3');
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 136 Using union(key3,intersect(key1,key2),key4); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 200 200 key1-key2-key3-key4-3
|
||||
100 100 200 200 key1-key2-key3-key4-2
|
||||
100 100 200 200 key1-key2-key3-key4-1
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, -1, 200,'key4');
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 146 Using union(key3,intersect(key1,key2),key4); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 200 200 key1-key2-key3-key4-3
|
||||
100 100 200 200 key1-key2-key3-key4-2
|
||||
100 100 200 200 key1-key2-key3-key4-1
|
||||
-1 -1 -1 200 key4
|
||||
insert into t1 (key1, key2, key3, key4, filler1) values (-1, -1, 200, -1,'key3');
|
||||
explain select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2,key3,key4 key3,key1,key2,key4 5,5,5,5 NULL 156 Using union(key3,intersect(key1,key2),key4); Using where
|
||||
select key1,key2,key3,key4,filler1 from t1 where key3=200 or (key1=100 and key2=100) or key4=200;
|
||||
key1 key2 key3 key4 filler1
|
||||
100 100 200 200 key1-key2-key3-key4-3
|
||||
100 100 200 200 key1-key2-key3-key4-2
|
||||
100 100 200 200 key1-key2-key3-key4-1
|
||||
-1 -1 -1 200 key4
|
||||
-1 -1 200 -1 key3
|
||||
explain select * from t1 where st_a=1 and st_b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b st_a,st_b 4,4 NULL 3515 Using intersect(st_a,st_b); Using where
|
||||
explain select st_a,st_b from t1 where st_a=1 and st_b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b st_a,st_b 4,4 NULL 3515 Using intersect(st_a,st_b); Using where; Using index
|
||||
explain select st_a from t1 ignore index (st_a) where st_a=1 and st_b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,stb_swt1a_2b,stb_swt1b,st_b st_b 4 const 15093 Using where
|
||||
explain select * from t1 where st_a=1 and swt1a=1 and swt2a=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a sta_swt21a 12 const,const,const 971
|
||||
explain select * from t1 where st_b=1 and swt1b=1 and swt2b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref stb_swt1a_2b,stb_swt1b,st_b stb_swt1a_2b 8 const,const 3879 Using where
|
||||
explain select * from t1 where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt12a,stb_swt1a_2b 12,12 NULL 58 Using intersect(sta_swt12a,stb_swt1a_2b); Using where
|
||||
explain select * from t1 ignore index (sta_swt21a, stb_swt1a_2b)
|
||||
where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,st_a,stb_swt1b,st_b sta_swt12a,stb_swt1b 12,8 NULL 58 Using intersect(sta_swt12a,stb_swt1b); Using where
|
||||
explain select * from t1 ignore index (sta_swt21a, sta_swt12a, stb_swt1a_2b)
|
||||
where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt1a,sta_swt2a,st_a,stb_swt1b,st_b sta_swt1a,sta_swt2a,stb_swt1b 8,8,8 NULL 57 Using intersect(sta_swt1a,sta_swt2a,stb_swt1b); Using where
|
||||
explain select * from t1 ignore index (sta_swt21a, sta_swt12a, stb_swt1a_2b, stb_swt1b)
|
||||
where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt1a,sta_swt2a,st_a,st_b sta_swt1a,sta_swt2a,st_b 8,8,4 NULL 223 Using intersect(sta_swt1a,sta_swt2a,st_b); Using where
|
||||
explain select * from t1
|
||||
where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt12a,stb_swt1a_2b 12,12 NULL 58 Using intersect(sta_swt12a,stb_swt1a_2b); Using where
|
||||
explain select * from t1
|
||||
where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 232 Using intersect(sta_swt1a,stb_swt1b); Using where
|
||||
explain select st_a from t1
|
||||
where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 232 Using intersect(sta_swt1a,stb_swt1b); Using where; Using index
|
||||
explain select st_a from t1
|
||||
where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge sta_swt12a,sta_swt1a,sta_swt2a,sta_swt21a,st_a,stb_swt1a_2b,stb_swt1b,st_b sta_swt1a,stb_swt1b 8,8 NULL 232 Using intersect(sta_swt1a,stb_swt1b); Using where; Using index
|
||||
drop table t0,t1;
|
||||
create table t2 (
|
||||
a char(10),
|
||||
b char(10),
|
||||
filler1 char(255),
|
||||
filler2 char(255),
|
||||
key(a(5)),
|
||||
key(b(5))
|
||||
);
|
||||
select count(a) from t2 where a='BBBBBBBB';
|
||||
count(a)
|
||||
4
|
||||
select count(a) from t2 where b='BBBBBBBB';
|
||||
count(a)
|
||||
4
|
||||
expla_or_bin select count(a_or_b) from t2 where a_or_b='AAAAAAAA' a_or_bnd a_or_b='AAAAAAAA';
|
||||
id select_type ta_or_ba_or_ble type possia_or_ble_keys key key_len ref rows Extra_or_b
|
||||
1 SIMPLE t2 ref a_or_b,a_or_b a_or_b 6 const 4 Using where
|
||||
select count(a) from t2 where a='AAAAAAAA' and b='AAAAAAAA';
|
||||
count(a)
|
||||
4
|
||||
select count(a) from t2 ignore index(a,b) where a='AAAAAAAA' and b='AAAAAAAA';
|
||||
count(a)
|
||||
4
|
||||
insert into t2 values ('ab', 'ab', 'uh', 'oh');
|
||||
explain select a from t2 where a='ab';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 6 const 1 Using where
|
||||
drop table t2;
|
||||
@@ -1,120 +0,0 @@
|
||||
drop table if exists t1;
|
||||
create table t1
|
||||
(
|
||||
pk1 int not null,
|
||||
pk2 int not null,
|
||||
key1 int not null,
|
||||
key2 int not null,
|
||||
pktail1ok int not null,
|
||||
pktail2ok int not null,
|
||||
pktail3bad int not null,
|
||||
pktail4bad int not null,
|
||||
pktail5bad int not null,
|
||||
pk2copy int not null,
|
||||
badkey int not null,
|
||||
filler1 char (200),
|
||||
filler2 char (200),
|
||||
key (key1),
|
||||
key (key2),
|
||||
/* keys with tails from CPK members */
|
||||
key (pktail1ok, pk1),
|
||||
key (pktail2ok, pk1, pk2),
|
||||
key (pktail3bad, pk2, pk1),
|
||||
key (pktail4bad, pk1, pk2copy),
|
||||
key (pktail5bad, pk1, pk2, pk2copy),
|
||||
primary key (pk1, pk2)
|
||||
) engine=innodb;
|
||||
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using where
|
||||
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
|
||||
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
|
||||
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
|
||||
1 11 0 0 0 0 0 0 0 11 0 filler-data-11 filler2
|
||||
1 12 0 0 0 0 0 0 0 12 0 filler-data-12 filler2
|
||||
1 13 0 0 0 0 0 0 0 13 0 filler-data-13 filler2
|
||||
1 14 0 0 0 0 0 0 0 14 0 filler-data-14 filler2
|
||||
1 15 0 0 0 0 0 0 0 15 0 filler-data-15 filler2
|
||||
1 16 0 0 0 0 0 0 0 16 0 filler-data-16 filler2
|
||||
1 17 0 0 0 0 0 0 0 17 0 filler-data-17 filler2
|
||||
1 18 0 0 0 0 0 0 0 18 0 filler-data-18 filler2
|
||||
1 19 0 0 0 0 0 0 0 19 0 filler-data-19 filler2
|
||||
explain select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index
|
||||
select pk1,pk2 from t1 where key1 = 10 and key2=10 and 2*pk1+1 < 2*96+1;
|
||||
pk1 pk2
|
||||
95 50
|
||||
95 51
|
||||
95 52
|
||||
95 53
|
||||
95 54
|
||||
95 55
|
||||
95 56
|
||||
95 57
|
||||
95 58
|
||||
95 59
|
||||
explain select * from t1 where badkey=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
|
||||
explain select * from t1 where pk1 < 7500 and key1 = 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL ROWS Using intersect(key1,PRIMARY); Using where
|
||||
explain select * from t1 where pktail1ok=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,pktail1ok key1,pktail1ok 4,4 NULL 1 Using intersect(key1,pktail1ok); Using where
|
||||
explain select * from t1 where pktail2ok=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,pktail2ok key1,pktail2ok 4,4 NULL 1 Using intersect(key1,pktail2ok); Using where
|
||||
select ' The following is actually a deficiency, it uses sort_union currently:' as 'note:';
|
||||
note:
|
||||
The following is actually a deficiency, it uses sort_union currently:
|
||||
explain select * from t1 where (pktail2ok=1 and pk1< 50000) or key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where
|
||||
explain select * from t1 where pktail3bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail3bad key1 4 const 100 Using where
|
||||
explain select * from t1 where pktail4bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail4bad key1 4 const 100 Using where
|
||||
explain select * from t1 where pktail5bad=1 and key1=10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref key1,pktail5bad key1 4 const 100 Using where
|
||||
explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index
|
||||
select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
|
||||
pk1 pk2 key1 key2
|
||||
95 50 10 10
|
||||
95 51 10 10
|
||||
95 52 10 10
|
||||
95 53 10 10
|
||||
95 54 10 10
|
||||
95 55 10 10
|
||||
95 56 10 10
|
||||
95 57 10 10
|
||||
95 58 10 10
|
||||
95 59 10 10
|
||||
drop table t1;
|
||||
create table t1
|
||||
(
|
||||
RUNID varchar(22),
|
||||
SUBMITNR varchar(5),
|
||||
ORDERNR char(1) ,
|
||||
PROGRAMM varchar(8),
|
||||
TESTID varchar(4),
|
||||
UCCHECK char(1),
|
||||
ETEXT varchar(80),
|
||||
ETEXT_TYPE char(1),
|
||||
INFO char(1),
|
||||
SEVERITY tinyint(3),
|
||||
TADIRFLAG char(1),
|
||||
PRIMARY KEY (RUNID,SUBMITNR,ORDERNR,PROGRAMM,TESTID,UCCHECK),
|
||||
KEY `TVERM~KEY` (PROGRAMM,TESTID,UCCHECK)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
update t1 set `ETEXT` = '', `ETEXT_TYPE`='', `INFO`='', `SEVERITY`='', `TADIRFLAG`=''
|
||||
WHERE
|
||||
`RUNID`= '' AND `SUBMITNR`= '' AND `ORDERNR`='' AND `PROGRAMM`='' AND
|
||||
`TESTID`='' AND `UCCHECK`='';
|
||||
drop table t1;
|
||||
@@ -46,6 +46,8 @@ COLUMN_PRIVILEGES
|
||||
ENGINES
|
||||
EVENTS
|
||||
FILES
|
||||
GLOBAL_STATUS
|
||||
GLOBAL_VARIABLES
|
||||
KEY_COLUMN_USAGE
|
||||
PARTITIONS
|
||||
PLUGINS
|
||||
@@ -54,6 +56,8 @@ REFERENTIAL_CONSTRAINTS
|
||||
ROUTINES
|
||||
SCHEMATA
|
||||
SCHEMA_PRIVILEGES
|
||||
SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLE_CONSTRAINTS
|
||||
@@ -353,7 +357,7 @@ mysql
|
||||
test
|
||||
explain select * from v0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY # ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE # ALL NULL NULL NULL NULL 2
|
||||
create view v1 (c) as select table_name from information_schema.tables
|
||||
where table_name="v1";
|
||||
select * from v1;
|
||||
@@ -758,6 +762,7 @@ table_schema table_name column_name
|
||||
information_schema COLUMNS COLUMN_TYPE
|
||||
information_schema EVENTS EVENT_DEFINITION
|
||||
information_schema EVENTS SQL_MODE
|
||||
information_schema GLOBAL_VARIABLES VARIABLE_VALUE
|
||||
information_schema PARTITIONS PARTITION_EXPRESSION
|
||||
information_schema PARTITIONS SUBPARTITION_EXPRESSION
|
||||
information_schema PARTITIONS PARTITION_DESCRIPTION
|
||||
@@ -765,6 +770,7 @@ information_schema PLUGINS PLUGIN_DESCRIPTION
|
||||
information_schema PROCESSLIST INFO
|
||||
information_schema ROUTINES ROUTINE_DEFINITION
|
||||
information_schema ROUTINES SQL_MODE
|
||||
information_schema SESSION_VARIABLES VARIABLE_VALUE
|
||||
information_schema TRIGGERS ACTION_CONDITION
|
||||
information_schema TRIGGERS ACTION_STATEMENT
|
||||
information_schema TRIGGERS SQL_MODE
|
||||
@@ -847,7 +853,7 @@ delete from mysql.db where user='mysqltest_4';
|
||||
flush privileges;
|
||||
SELECT table_schema, count(*) FROM information_schema.TABLES where TABLE_SCHEMA!='cluster' GROUP BY TABLE_SCHEMA;
|
||||
table_schema count(*)
|
||||
information_schema 23
|
||||
information_schema 27
|
||||
mysql 21
|
||||
create table t1 (i int, j int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
@@ -1240,6 +1246,8 @@ 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
|
||||
@@ -1248,6 +1256,8 @@ 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
|
||||
@@ -1278,6 +1288,8 @@ 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
|
||||
@@ -1286,6 +1298,8 @@ 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
|
||||
|
||||
@@ -13,6 +13,8 @@ COLUMN_PRIVILEGES
|
||||
ENGINES
|
||||
EVENTS
|
||||
FILES
|
||||
GLOBAL_STATUS
|
||||
GLOBAL_VARIABLES
|
||||
KEY_COLUMN_USAGE
|
||||
PARTITIONS
|
||||
PLUGINS
|
||||
@@ -21,6 +23,8 @@ REFERENTIAL_CONSTRAINTS
|
||||
ROUTINES
|
||||
SCHEMATA
|
||||
SCHEMA_PRIVILEGES
|
||||
SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLE_CONSTRAINTS
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (a int, b char(10), key a(a), key b(a,b)) engine=innodb;
|
||||
insert into t1 values
|
||||
(17,"ddd"),(18,"eee"),(19,"fff"),(19,"yyy"),
|
||||
(14,"aaa"),(15,"bbb"),(16,"ccc"),(16,"xxx"),
|
||||
(20,"ggg"),(21,"hhh"),(22,"iii");
|
||||
handler t1 open as t2;
|
||||
handler t2 read a first;
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a next;
|
||||
a b
|
||||
16 ccc
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a last;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
20 ggg
|
||||
handler t2 read a first;
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
handler t2 read a last;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t2 read a next;
|
||||
a b
|
||||
22 iii
|
||||
handler t2 read a next;
|
||||
a b
|
||||
handler t2 read a=(15);
|
||||
a b
|
||||
15 bbb
|
||||
handler t2 read a=(16);
|
||||
a b
|
||||
16 ccc
|
||||
handler t2 read a=(19,"fff");
|
||||
ERROR 42000: Too many key parts specified; max 1 parts allowed
|
||||
handler t2 read b=(19,"fff");
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read b=(19,"yyy");
|
||||
a b
|
||||
19 yyy
|
||||
handler t2 read b=(19);
|
||||
a b
|
||||
19 fff
|
||||
handler t1 read a last;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
handler t2 read a=(11);
|
||||
a b
|
||||
handler t2 read a>=(11);
|
||||
a b
|
||||
14 aaa
|
||||
handler t2 read a=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a>=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a>(18);
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read a<=(18);
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read a<(18);
|
||||
a b
|
||||
17 ddd
|
||||
handler t2 read a first limit 5;
|
||||
a b
|
||||
14 aaa
|
||||
15 bbb
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
handler t2 read a next limit 3;
|
||||
a b
|
||||
18 eee
|
||||
19 fff
|
||||
19 yyy
|
||||
handler t2 read a prev limit 10;
|
||||
a b
|
||||
19 fff
|
||||
18 eee
|
||||
17 ddd
|
||||
16 xxx
|
||||
16 ccc
|
||||
15 bbb
|
||||
14 aaa
|
||||
handler t2 read a>=(16) limit 4;
|
||||
a b
|
||||
16 ccc
|
||||
16 xxx
|
||||
17 ddd
|
||||
18 eee
|
||||
handler t2 read a>=(16) limit 2,2;
|
||||
a b
|
||||
17 ddd
|
||||
18 eee
|
||||
handler t2 read a last limit 3;
|
||||
a b
|
||||
22 iii
|
||||
21 hhh
|
||||
20 ggg
|
||||
handler t2 read a=(19);
|
||||
a b
|
||||
19 fff
|
||||
handler t2 read a=(19) where b="yyy";
|
||||
a b
|
||||
19 yyy
|
||||
handler t2 read first;
|
||||
a b
|
||||
17 ddd
|
||||
handler t2 read next;
|
||||
a b
|
||||
18 eee
|
||||
handler t2 read last;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
||||
handler t2 close;
|
||||
handler t1 open;
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
a b
|
||||
17 ddd
|
||||
alter table t1 engine=innodb;
|
||||
handler t2 read first;
|
||||
ERROR 42S02: Unknown table 't2' in HANDLER
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( no1 smallint(5) NOT NULL default '0', no2 int(10) NOT NULL default '0', PRIMARY KEY (no1,no2)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,274),(1,275),(2,6),(2,8),(4,1),(4,2);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ `primary` = (1, 1000);
|
||||
no1 no2
|
||||
HANDLER t1 READ `primary` PREV;
|
||||
no1 no2
|
||||
1 275
|
||||
DROP TABLE t1;
|
||||
@@ -1,5 +1,6 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1,t2,t1m,t1i,t2m,t2i,t4;
|
||||
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
|
||||
create table t1(f1 varchar(800) binary not null, key(f1))
|
||||
character set utf8 collate utf8_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 765 bytes
|
||||
@@ -10,8 +11,8 @@ c_id int(11) not null default '0',
|
||||
org_id int(11) default null,
|
||||
unique key contacts$c_id (c_id),
|
||||
key contacts$org_id (org_id)
|
||||
) engine=innodb;
|
||||
insert into t1 values
|
||||
);
|
||||
insert into t1 values
|
||||
(2,null),(120,null),(141,null),(218,7), (128,1),
|
||||
(151,2),(234,2),(236,2),(243,2),(255,2),(259,2),(232,3),(235,3),(238,3),
|
||||
(246,3),(253,3),(269,3),(285,3),(291,3),(293,3),(131,4),(230,4),(231,4);
|
||||
@@ -33,16 +34,16 @@ sla_set int(11) default null,
|
||||
unique key t2$slai_id (slai_id),
|
||||
key t2$owner_id (owner_id),
|
||||
key t2$sla_id (sla_id)
|
||||
) engine=innodb;
|
||||
);
|
||||
insert into t2(slai_id, owner_tbl, owner_id, sla_id) values
|
||||
(1,3,1,1), (3,3,10,2), (4,3,3,6), (5,3,2,5), (6,3,8,3), (7,3,9,7),
|
||||
(8,3,6,8), (9,3,4,9), (10,3,5,10), (11,3,11,11), (12,3,7,12);
|
||||
flush tables;
|
||||
select si.slai_id
|
||||
from t1 c join t2 si on
|
||||
((si.owner_tbl = 3 and si.owner_id = c.org_id) or
|
||||
( si.owner_tbl = 2 and si.owner_id = c.c_id))
|
||||
where
|
||||
((si.owner_tbl = 3 and si.owner_id = c.org_id) or
|
||||
( si.owner_tbl = 2 and si.owner_id = c.c_id))
|
||||
where
|
||||
c.c_id = 218 and expiredate is null;
|
||||
slai_id
|
||||
12
|
||||
@@ -53,17 +54,17 @@ c_id org_id
|
||||
141 NULL
|
||||
select si.slai_id
|
||||
from t1 c join t2 si on
|
||||
((si.owner_tbl = 3 and si.owner_id = c.org_id) or
|
||||
( si.owner_tbl = 2 and si.owner_id = c.c_id))
|
||||
where
|
||||
((si.owner_tbl = 3 and si.owner_id = c.org_id) or
|
||||
( si.owner_tbl = 2 and si.owner_id = c.c_id))
|
||||
where
|
||||
c.c_id = 218 and expiredate is null;
|
||||
slai_id
|
||||
12
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (a int, b int, KEY b (b)) Engine=InnoDB;
|
||||
CREATE TABLE t2 (a int, b int, PRIMARY KEY (a,b)) Engine=InnoDB;
|
||||
CREATE TABLE t3 (a int, b int, c int, PRIMARY KEY (a),
|
||||
UNIQUE KEY b (b,c), KEY a (a,b,c)) Engine=InnoDB;
|
||||
CREATE TABLE t1 (a int, b int, KEY b (b));
|
||||
CREATE TABLE t2 (a int, b int, PRIMARY KEY (a,b));
|
||||
CREATE TABLE t3 (a int, b int, c int, PRIMARY KEY (a),
|
||||
UNIQUE KEY b (b,c), KEY a (a,b,c));
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
INSERT INTO t1 SELECT a + 1, b + 1 FROM t1;
|
||||
INSERT INTO t1 SELECT a + 2, b + 2 FROM t1;
|
||||
@@ -73,14 +74,14 @@ DELETE FROM t2 WHERE a = 1 AND b < 2;
|
||||
INSERT INTO t3 VALUES (1,1,1),(2,1,2);
|
||||
INSERT INTO t3 SELECT a + 2, a + 2, 3 FROM t3;
|
||||
INSERT INTO t3 SELECT a + 4, a + 4, 3 FROM t3;
|
||||
SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
|
||||
t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
|
||||
SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
|
||||
t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
|
||||
ORDER BY t1.b LIMIT 2;
|
||||
b a
|
||||
1 1
|
||||
2 2
|
||||
SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
|
||||
t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
|
||||
SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
|
||||
t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
|
||||
ORDER BY t1.b LIMIT 5;
|
||||
b a
|
||||
1 1
|
||||
@@ -98,8 +99,8 @@ CREATE TABLE `t2` (
|
||||
`id4` INT NOT NULL,
|
||||
UNIQUE (`id2`,`id4`),
|
||||
KEY (`id1`)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
|
||||
);
|
||||
INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
|
||||
(1,1,1,0),
|
||||
(1,1,2,1),
|
||||
(5,1,2,2),
|
||||
@@ -110,66 +111,12 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
|
||||
id1
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
create table t1m (a int) engine=myisam;
|
||||
create table t1i (a int) engine=innodb;
|
||||
create table t2m (a int) engine=myisam;
|
||||
create table t2i (a int) engine=innodb;
|
||||
create table t1m (a int) engine = MEMORY;
|
||||
create table t1i (a int);
|
||||
create table t2m (a int) engine = MEMORY;
|
||||
create table t2i (a int);
|
||||
insert into t2m values (5);
|
||||
insert into t2i values (5);
|
||||
select min(a) from t1m;
|
||||
min(a)
|
||||
NULL
|
||||
select min(7) from t1m;
|
||||
min(7)
|
||||
NULL
|
||||
select min(7) from DUAL;
|
||||
min(7)
|
||||
NULL
|
||||
explain select min(7) from t2m join t1m;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
select min(7) from t2m join t1m;
|
||||
min(7)
|
||||
NULL
|
||||
select max(a) from t1m;
|
||||
max(a)
|
||||
NULL
|
||||
select max(7) from t1m;
|
||||
max(7)
|
||||
NULL
|
||||
select max(7) from DUAL;
|
||||
max(7)
|
||||
NULL
|
||||
explain select max(7) from t2m join t1m;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
select max(7) from t2m join t1m;
|
||||
max(7)
|
||||
NULL
|
||||
select 1, min(a) from t1m where a=99;
|
||||
1 min(a)
|
||||
1 NULL
|
||||
select 1, min(a) from t1m where 1=99;
|
||||
1 min(a)
|
||||
1 NULL
|
||||
select 1, min(1) from t1m where a=99;
|
||||
1 min(1)
|
||||
1 NULL
|
||||
select 1, min(1) from t1m where 1=99;
|
||||
1 min(1)
|
||||
1 NULL
|
||||
select 1, max(a) from t1m where a=99;
|
||||
1 max(a)
|
||||
1 NULL
|
||||
select 1, max(a) from t1m where 1=99;
|
||||
1 max(a)
|
||||
1 NULL
|
||||
select 1, max(1) from t1m where a=99;
|
||||
1 max(1)
|
||||
1 NULL
|
||||
select 1, max(1) from t1m where 1=99;
|
||||
1 max(1)
|
||||
1 NULL
|
||||
select min(a) from t1i;
|
||||
min(a)
|
||||
NULL
|
||||
@@ -178,7 +125,7 @@ min(7)
|
||||
NULL
|
||||
select min(7) from DUAL;
|
||||
min(7)
|
||||
NULL
|
||||
7
|
||||
explain select min(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
@@ -194,7 +141,7 @@ max(7)
|
||||
NULL
|
||||
select max(7) from DUAL;
|
||||
max(7)
|
||||
NULL
|
||||
7
|
||||
explain select max(7) from t2i join t1i;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2i ALL NULL NULL NULL NULL 1
|
||||
@@ -250,7 +197,7 @@ count(*) min(7) max(7)
|
||||
drop table t1m, t1i, t2m, t2i;
|
||||
create table t1 (
|
||||
a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' '
|
||||
);
|
||||
) ENGINE = MEMORY;
|
||||
insert into t1 (a1, a2, b, c, d) values
|
||||
('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'),
|
||||
('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'),
|
||||
@@ -286,14 +233,14 @@ insert into t1 (a1, a2, b, c, d) values
|
||||
('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4');
|
||||
create table t4 (
|
||||
pk_col int auto_increment primary key, a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' '
|
||||
) engine=innodb;
|
||||
);
|
||||
insert into t4 (a1, a2, b, c, d, dummy) select * from t1;
|
||||
create index idx12672_0 on t4 (a1);
|
||||
create index idx12672_1 on t4 (a1,a2,b,c);
|
||||
create index idx12672_2 on t4 (a1,a2,b);
|
||||
analyze table t1;
|
||||
analyze table t4;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
test.t4 analyze status OK
|
||||
select distinct a1 from t4 where pk_col not in (1,2,3,4);
|
||||
a1
|
||||
a
|
||||
@@ -303,18 +250,18 @@ d
|
||||
drop table t1,t4;
|
||||
create table t1 (
|
||||
a varchar(30), b varchar(30), primary key(a), key(b)
|
||||
) engine=innodb;
|
||||
);
|
||||
select distinct a from t1;
|
||||
a
|
||||
drop table t1;
|
||||
create table t1(a int, key(a)) engine=innodb;
|
||||
create table t1(a int, key(a));
|
||||
insert into t1 values(1);
|
||||
select a, count(a) from t1 group by a with rollup;
|
||||
a count(a)
|
||||
1 1
|
||||
NULL 1
|
||||
drop table t1;
|
||||
create table t1 (f1 int, f2 char(1), primary key(f1,f2)) engine=innodb;
|
||||
create table t1 (f1 int, f2 char(1), primary key(f1,f2));
|
||||
insert into t1 values ( 1,"e"),(2,"a"),( 3,"c"),(4,"d");
|
||||
alter table t1 drop primary key, add primary key (f2, f1);
|
||||
explain select distinct f1 a, f1 b from t1;
|
||||
@@ -325,25 +272,24 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
|
||||
INDEX (name)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11),
|
||||
FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB;
|
||||
INDEX (name));
|
||||
CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11));
|
||||
ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id);
|
||||
INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B');
|
||||
INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3);
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
WHERE t1.name LIKE 'A%';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
|
||||
1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
|
||||
EXPLAIN
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
|
||||
WHERE t1.name LIKE 'A%' OR FALSE;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
|
||||
DROP TABLE t1,t2;
|
||||
set storage_engine=innodb;
|
||||
CREATE TABLE t1 (a int, b int);
|
||||
insert into t1 values (1,1),(1,2);
|
||||
CREATE TABLE t2 (primary key (a)) select * from t1;
|
||||
@@ -401,7 +347,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
SELECT * from t2;
|
||||
a b
|
||||
drop table t1,t2;
|
||||
create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb
|
||||
create table t1(f1 varchar(800) binary not null, key(f1))
|
||||
character set utf8 collate utf8_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 765 bytes
|
||||
@@ -413,7 +359,7 @@ CREATE TABLE `t2` (
|
||||
`c` int(11) default NULL,
|
||||
PRIMARY KEY (`k`),
|
||||
UNIQUE KEY `idx_1` (`a`)
|
||||
) ENGINE=InnoDB;
|
||||
);
|
||||
insert into t2 ( a ) values ( 6 ) on duplicate key update c =
|
||||
ifnull( c,
|
||||
0 ) + 1;
|
||||
|
||||
@@ -63,9 +63,9 @@ Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,values(`test`.`t1`.`a`) AS `VALUES(a)` from `test`.`t1`
|
||||
explain extended select * from t1 where values(a);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1`
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where values(`test`.`t1`.`a`)
|
||||
DROP TABLE t1;
|
||||
create table t1(a int primary key, b int);
|
||||
insert into t1 values(1,1),(2,2),(3,3),(4,4),(5,5);
|
||||
@@ -197,3 +197,25 @@ PRIMARY KEY (a)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a) ;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
a BIGINT UNSIGNED,
|
||||
b BIGINT UNSIGNED,
|
||||
PRIMARY KEY (a)
|
||||
);
|
||||
INSERT INTO t1 VALUES (45, 1) ON DUPLICATE KEY UPDATE b =
|
||||
IF(VALUES(b) > t1.b, VALUES(b), t1.b);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
45 1
|
||||
INSERT INTO t1 VALUES (45, 2) ON DUPLICATE KEY UPDATE b =
|
||||
IF(VALUES(b) > t1.b, VALUES(b), t1.b);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
45 2
|
||||
INSERT INTO t1 VALUES (45, 1) ON DUPLICATE KEY UPDATE b =
|
||||
IF(VALUES(b) > t1.b, VALUES(b), t1.b);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
45 2
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -776,3 +776,31 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL a,b NULL NULL NULL 1000 Using where
|
||||
1 SIMPLE t3 ref b b 5 test.t2.b 1 Using where
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2 (a int, b int, primary key(a));
|
||||
insert into t2 select @v:=A.a+10*B.a, @v from t1 A, t1 B;
|
||||
explain select * from t1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
show status like '%cost%';
|
||||
Variable_name Value
|
||||
Last_query_cost 4.016090
|
||||
select 'The cost of accessing t1 (dont care if it changes' '^';
|
||||
The cost of accessing t1 (dont care if it changes
|
||||
The cost of accessing t1 (dont care if it changes^
|
||||
select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z;
|
||||
Z
|
||||
vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv
|
||||
explain select * from t1, t2 A, t2 B where A.a = t1.a and B.a=A.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
|
||||
1 SIMPLE A eq_ref PRIMARY PRIMARY 4 test.t1.a 1
|
||||
1 SIMPLE B eq_ref PRIMARY PRIMARY 4 test.A.b 1
|
||||
show status like '%cost%';
|
||||
Variable_name Value
|
||||
Last_query_cost 24.016090
|
||||
select '^^: The above should be ~= 20 + cost(select * from t1). Value less than 20 is an error' Z;
|
||||
Z
|
||||
^^: The above should be ~= 20 + cost(select * from t1). Value less than 20 is an error
|
||||
drop table t1, t2;
|
||||
|
||||
@@ -1126,7 +1126,7 @@ a b a b
|
||||
7 8 7 5
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a = t2.a OR t1.a = t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
|
||||
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a IN(t2.a, t2.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
||||
@@ -43,9 +43,9 @@ drop table t1;
|
||||
create table t1 (a int, b char(10));
|
||||
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
|
||||
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
|
||||
Warning 1264 Out of range value for column 'a' at row 5
|
||||
Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
|
||||
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
|
||||
select * from t1;
|
||||
a b
|
||||
@@ -57,7 +57,8 @@ a b
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 4
|
||||
Warning 1366 Incorrect integer value: '
|
||||
' for column 'a' at row 4
|
||||
Warning 1261 Row 4 doesn't contain data for all columns
|
||||
select * from t1;
|
||||
a b
|
||||
|
||||
@@ -73,16 +73,16 @@ select * from mysql.slow_log;
|
||||
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
|
||||
TIMESTAMP USER_HOST QUERY_TIME 00:00:00 1 0 test 0 0 1 select sleep(2)
|
||||
alter table mysql.general_log engine=myisam;
|
||||
ERROR HY000: You can't alter a log table if logging is enabled
|
||||
ERROR HY000: You cannot 'ALTER' a log table if logging is enabled
|
||||
alter table mysql.slow_log engine=myisam;
|
||||
ERROR HY000: You can't alter a log table if logging is enabled
|
||||
ERROR HY000: You cannot 'ALTER' a log table if logging is enabled
|
||||
drop table mysql.general_log;
|
||||
ERROR HY000: Cannot drop log table if log is enabled
|
||||
ERROR HY000: You cannot 'DROP' a log table if logging is enabled
|
||||
drop table mysql.slow_log;
|
||||
ERROR HY000: Cannot drop log table if log is enabled
|
||||
ERROR HY000: You cannot 'DROP' a log table if logging is enabled
|
||||
set global general_log='OFF';
|
||||
alter table mysql.slow_log engine=myisam;
|
||||
ERROR HY000: You can't alter a log table if logging is enabled
|
||||
ERROR HY000: You cannot 'ALTER' a log table if logging is enabled
|
||||
set global slow_query_log='OFF';
|
||||
show create table mysql.general_log;
|
||||
Table Create Table
|
||||
@@ -112,8 +112,8 @@ slow_log CREATE TABLE `slow_log` (
|
||||
alter table mysql.general_log engine=myisam;
|
||||
alter table mysql.slow_log engine=myisam;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'last_insert_id' at row 0
|
||||
Warning 1264 Out of range value for column 'insert_id' at row 0
|
||||
Warning 1366 Incorrect integer value: '' for column 'last_insert_id' at row 0
|
||||
Warning 1366 Incorrect integer value: '' for column 'insert_id' at row 0
|
||||
show create table mysql.general_log;
|
||||
Table Create Table
|
||||
general_log CREATE TABLE `general_log` (
|
||||
@@ -173,13 +173,13 @@ unlock tables;
|
||||
set global general_log='OFF';
|
||||
set global slow_query_log='OFF';
|
||||
alter table mysql.slow_log engine=ndb;
|
||||
ERROR HY000: One can use only CSV and MyISAM engines for the log tables
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=innodb;
|
||||
ERROR HY000: One can use only CSV and MyISAM engines for the log tables
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=archive;
|
||||
ERROR HY000: One can use only CSV and MyISAM engines for the log tables
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=blackhole;
|
||||
ERROR HY000: One can use only CSV and MyISAM engines for the log tables
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
drop table mysql.slow_log;
|
||||
drop table mysql.general_log;
|
||||
drop table mysql.general_log;
|
||||
|
||||
@@ -178,12 +178,12 @@ t3 CREATE TABLE `t3` (
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`,`t2`)
|
||||
create table t4 (a int not null, b char(10), key(a)) engine=MERGE UNION=(t1,t2);
|
||||
select * from t4;
|
||||
ERROR HY000: All tables in the MERGE table are not identically defined
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
alter table t4 add column c int;
|
||||
ERROR HY000: All tables in the MERGE table are not identically defined
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
flush tables;
|
||||
select * from t4;
|
||||
ERROR HY000: All tables in the MERGE table are not identically defined
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
create database mysqltest;
|
||||
create table mysqltest.t6 (a int not null primary key auto_increment, message char(20));
|
||||
create table t5 (a int not null, b char(20), key(a)) engine=MERGE UNION=(test.t1,mysqltest.t6);
|
||||
@@ -277,7 +277,7 @@ t3 CREATE TABLE `t3` (
|
||||
drop table t3,t2,t1;
|
||||
create table t1 (a int not null, key(a)) engine=merge;
|
||||
select * from t1;
|
||||
a
|
||||
ERROR HY000: Got error 124 from storage engine
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b int not null, key(a,b));
|
||||
create table t2 (a int not null, b int not null, key(a,b));
|
||||
@@ -771,6 +771,21 @@ Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
test.t2 check status OK
|
||||
drop table t1, t2, t3;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(2),(1);
|
||||
CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);
|
||||
SELECT * FROM t2 WHERE a=2;
|
||||
ERROR HY000: Got error 124 from storage engine
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1(a INT) ENGINE=MEMORY;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
|
||||
SELECT * FROM t2;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
|
||||
SELECT * FROM t2;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE t2;
|
||||
create table t1 (b bit(1));
|
||||
create table t2 (b bit(1));
|
||||
create table tm (b bit(1)) engine = merge union = (t1,t2);
|
||||
|
||||
2475
mysql-test/r/mix2_myisam.result
Normal file
2475
mysql-test/r/mix2_myisam.result
Normal file
File diff suppressed because it is too large
Load Diff
@@ -515,6 +515,34 @@ select c1 from t1 order by c1 limit 1;
|
||||
c1
|
||||
a
|
||||
drop table t1;
|
||||
create table t1 (a int not null, primary key(a));
|
||||
create table t2 (a int not null, b int not null, primary key(a,b));
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6);
|
||||
insert into t2 values (1,1),(2,1);
|
||||
lock tables t1 read local, t2 read local;
|
||||
select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
|
||||
a a b
|
||||
1 1 1
|
||||
2 2 1
|
||||
insert into t2 values(2,0);
|
||||
select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
|
||||
a a b
|
||||
1 1 1
|
||||
2 2 1
|
||||
drop table t1,t2;
|
||||
CREATE TABLE t1 (c1 varchar(250) NOT NULL);
|
||||
CREATE TABLE t2 (c1 varchar(250) NOT NULL, PRIMARY KEY (c1));
|
||||
INSERT INTO t1 VALUES ('test000001'), ('test000002'), ('test000003');
|
||||
INSERT INTO t2 VALUES ('test000002'), ('test000003'), ('test000004');
|
||||
LOCK TABLES t1 READ LOCAL, t2 READ LOCAL;
|
||||
SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
|
||||
WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
|
||||
t1c1 t2c1
|
||||
INSERT INTO t2 VALUES ('test000001'), ('test000005');
|
||||
SELECT t1.c1 AS t1c1, t2.c1 AS t2c1 FROM t1, t2
|
||||
WHERE t1.c1 = t2.c1 HAVING t1c1 != t2c1;
|
||||
t1c1 t2c1
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
|
||||
Got one of the listed errors
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||
|
||||
@@ -23,6 +23,9 @@ INSERT INTO t1 VALUES (1), (2);
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2005
|
||||
#
|
||||
CREATE TABLE t1 (a decimal(64, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
@@ -31,6 +34,9 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000');
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2055
|
||||
#
|
||||
CREATE TABLE t1 (a double);
|
||||
INSERT INTO t1 VALUES ('-9e999999');
|
||||
Warnings:
|
||||
@@ -40,6 +46,9 @@ CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `t1` VALUES (RES);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #3361 mysqldump quotes DECIMAL values inconsistently
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||
@@ -137,6 +146,9 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1707
|
||||
#
|
||||
CREATE TABLE t1 (`a"b"` char(2));
|
||||
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
<?xml version="1.0"?>
|
||||
@@ -156,6 +168,10 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
|
||||
</database>
|
||||
</mysqldump>
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #1994
|
||||
# Bug #4261
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||||
|
||||
@@ -191,6 +207,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2634
|
||||
#
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
@@ -240,11 +259,17 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
|
||||
#
|
||||
create table ```a` (i int);
|
||||
CREATE TABLE ```a` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
drop table ```a`;
|
||||
#
|
||||
# Bug #2591 "mysqldump quotes names inconsistently"
|
||||
#
|
||||
create table t1(a int);
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
@@ -353,6 +378,9 @@ UNLOCK TABLES;
|
||||
|
||||
set global sql_mode='';
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #2705 'mysqldump --tab extra output'
|
||||
#
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
|
||||
@@ -381,6 +409,9 @@ CREATE TABLE `t1` (
|
||||
2
|
||||
3
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #6101: create database problem
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@@ -433,6 +464,12 @@ USE `mysqldump_test_db`;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug #7020
|
||||
# Check that we don't dump in UTF8 in compatible mode by default,
|
||||
# but use the default compiled values, or the values given in
|
||||
# --default-character-set=xxx. However, we should dump in UTF8
|
||||
# if it is explicitely set.
|
||||
CREATE TABLE t1 (a CHAR(10));
|
||||
INSERT INTO t1 VALUES (_latin1 '<27><><EFBFBD><EFBFBD>');
|
||||
|
||||
@@ -466,6 +503,13 @@ UNLOCK TABLES;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
#
|
||||
# Bug#8063: make test mysqldump [ fail ]
|
||||
# We cannot tes this command because its output depends
|
||||
# on --default-character-set incompiled into "mysqldump" program.
|
||||
# If the future we can move this command into a separate test with
|
||||
# checking that "mysqldump" is compiled with "latin1"
|
||||
#
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
@@ -536,6 +580,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# WL #2319: Exclude Tables from dump
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE TABLE t2 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
@@ -573,6 +620,9 @@ UNLOCK TABLES;
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug #8830
|
||||
#
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
|
||||
@@ -607,6 +657,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for --insert-ignore
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
@@ -671,6 +724,10 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10286: mysqldump -c crashes on table that has many fields with long
|
||||
# names
|
||||
#
|
||||
create table t1 (
|
||||
F_c4ca4238a0b923820dcc509a6f75849b int,
|
||||
F_c81e728d9d4c2f636f067f89cc14862c int,
|
||||
@@ -1364,6 +1421,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Test for --add-drop-database
|
||||
#
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
|
||||
@@ -1404,6 +1464,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
|
||||
#
|
||||
CREATE DATABASE mysqldump_test_db;
|
||||
USE mysqldump_test_db;
|
||||
CREATE TABLE t1 ( a INT );
|
||||
@@ -1492,6 +1555,11 @@ CREATE TABLE `t2` (
|
||||
</mysqldump>
|
||||
DROP TABLE t1, t2;
|
||||
DROP DATABASE mysqldump_test_db;
|
||||
#
|
||||
# Testing with tables and databases that don't exists
|
||||
# or contains illegal characters
|
||||
# (Bug #9358 mysqldump crashes if tablename starts with \)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1(a varchar(30) primary key, b int not null);
|
||||
@@ -1530,6 +1598,9 @@ mysqldump: Got error: 1049: Unknown database 'mysqld\ump_test_db' when selecting
|
||||
drop table t1, t2, t3;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
|
||||
#
|
||||
create table t1 (a int(10));
|
||||
create table t2 (pk int primary key auto_increment,
|
||||
a int(10), b varchar(30), c datetime, d blob, e text);
|
||||
@@ -1586,6 +1657,9 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
|
||||
</database>
|
||||
</mysqldump>
|
||||
drop table t1, t2;
|
||||
#
|
||||
# BUG #12123
|
||||
#
|
||||
create table t1 (a text character set utf8, b text character set latin1);
|
||||
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
|
||||
select * from t1;
|
||||
@@ -1596,7 +1670,13 @@ select * from t1;
|
||||
a b
|
||||
Osnabr<EFBFBD>ck K<>ln
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
|
||||
#
|
||||
--fields-optionally-enclosed-by="
|
||||
#
|
||||
# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
|
||||
#
|
||||
create table `t1` (
|
||||
t1_name varchar(255) default null,
|
||||
t1_id int(10) unsigned not null auto_increment,
|
||||
@@ -1634,6 +1714,9 @@ t1 CREATE TABLE `t1` (
|
||||
KEY `t1_name` (`t1_name`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
|
||||
drop table `t1`;
|
||||
#
|
||||
# Bug #18536: wrong table order
|
||||
#
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table t3(a int);
|
||||
@@ -1671,6 +1754,9 @@ CREATE TABLE `t2` (
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1, t2, t3;
|
||||
#
|
||||
# Bug #21288: mysqldump segmentation fault when using --where
|
||||
#
|
||||
create table t1 (a int);
|
||||
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064)
|
||||
mysqldump: Got error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 when retrieving data from server
|
||||
@@ -1702,6 +1788,9 @@ CREATE TABLE `t1` (
|
||||
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database db1;
|
||||
use db1;
|
||||
CREATE TABLE t2 (
|
||||
@@ -1761,6 +1850,9 @@ drop table t2;
|
||||
drop view v2;
|
||||
drop database db1;
|
||||
use test;
|
||||
#
|
||||
# Bug 10713 mysqldump includes database in create view and referenced tables
|
||||
#
|
||||
create database db2;
|
||||
use db2;
|
||||
create table t1 (a int);
|
||||
@@ -1790,6 +1882,9 @@ a b
|
||||
drop table t1, t2;
|
||||
drop database db1;
|
||||
use test;
|
||||
#
|
||||
# dump of view
|
||||
#
|
||||
create table t1(a int);
|
||||
create view v1 as select * from t1;
|
||||
|
||||
@@ -1834,6 +1929,9 @@ DROP TABLE IF EXISTS `v1`;
|
||||
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
CREATE TABLE t2 (
|
||||
@@ -1893,6 +1991,9 @@ drop table t2;
|
||||
drop view v2;
|
||||
drop database mysqldump_test_db;
|
||||
use test;
|
||||
#
|
||||
# Bug #9756
|
||||
#
|
||||
CREATE TABLE t1 (a char(10));
|
||||
INSERT INTO t1 VALUES ('\'');
|
||||
|
||||
@@ -1927,6 +2028,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #10927 mysqldump: Can't reload dump with view that consist of other view
|
||||
#
|
||||
create table t1(a int, b int, c varchar(30));
|
||||
insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three");
|
||||
create view v3 as
|
||||
@@ -2004,6 +2108,9 @@ DROP TABLE IF EXISTS `v3`;
|
||||
|
||||
drop view v1, v2, v3;
|
||||
drop table t1;
|
||||
#
|
||||
# Test for dumping triggers
|
||||
#
|
||||
CREATE TABLE t1 (a int, b bigint default NULL);
|
||||
CREATE TABLE t2 (a int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
@@ -2202,8 +2309,14 @@ set @fired:= "No";
|
||||
end if;
|
||||
end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER root@localhost
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
#
|
||||
--port=1234
|
||||
--port=1234
|
||||
#
|
||||
# Test of fix to BUG 12597
|
||||
#
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test1'
|
||||
@@ -2235,6 +2348,9 @@ a2
|
||||
DROP TRIGGER testref;
|
||||
DROP TABLE test1;
|
||||
DROP TABLE test2;
|
||||
#
|
||||
# BUG#9056 - mysqldump does not dump routines
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func1;
|
||||
DROP FUNCTION IF EXISTS bug9056_func2;
|
||||
@@ -2331,6 +2447,9 @@ DROP PROCEDURE bug9056_proc1;
|
||||
DROP PROCEDURE bug9056_proc2;
|
||||
DROP PROCEDURE `a'b`;
|
||||
drop table t1;
|
||||
#
|
||||
# BUG# 13052 - mysqldump timestamp reloads broken
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (`d` timestamp, unique (`d`));
|
||||
set time_zone='+00:00';
|
||||
@@ -2417,6 +2536,9 @@ UNLOCK TABLES;
|
||||
drop table t1;
|
||||
set global time_zone=default;
|
||||
set time_zone=default;
|
||||
#
|
||||
# Test of fix to BUG 13146 - ansi quotes break loading of triggers
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1 test`;
|
||||
DROP TABLE IF EXISTS `t2 test`;
|
||||
CREATE TABLE `t1 test` (
|
||||
@@ -2480,6 +2602,9 @@ UNLOCK TABLES;
|
||||
DROP TRIGGER `test trig`;
|
||||
DROP TABLE `t1 test`;
|
||||
DROP TABLE `t2 test`;
|
||||
#
|
||||
# BUG# 12838 mysqldump -x with views exits with error
|
||||
#
|
||||
drop table if exists t1;
|
||||
create table t1 (a int, b varchar(32), c varchar(32));
|
||||
insert into t1 values (1, 'first value', 'xxxx');
|
||||
@@ -2572,6 +2697,10 @@ drop view v2;
|
||||
drop view v0;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
|
||||
# for tables with trigger created in the IGNORE_SPACE sql mode.
|
||||
#
|
||||
SET @old_sql_mode = @@SQL_MODE;
|
||||
SET SQL_MODE = IGNORE_SPACE;
|
||||
CREATE TABLE t1 (a INT);
|
||||
@@ -2627,6 +2756,9 @@ DELIMITER ;
|
||||
|
||||
DROP TRIGGER tr1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #13318: Bad result with empty field and --hex-blob
|
||||
#
|
||||
create table t1 (a binary(1), b blob);
|
||||
insert into t1 values ('','');
|
||||
|
||||
@@ -2694,6 +2826,9 @@ UNLOCK TABLES;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
drop table t1;
|
||||
#
|
||||
# Bug 14871 Invalid view dump output
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (289), (298), (234), (456), (789);
|
||||
create definer = CURRENT_USER view v1 as select * from t1;
|
||||
@@ -2720,6 +2855,9 @@ a
|
||||
789
|
||||
drop table t1;
|
||||
drop view v1, v2, v3, v4, v5;
|
||||
#
|
||||
# Bug #16878 dump of trigger
|
||||
#
|
||||
create table t1 (a int, created datetime);
|
||||
create table t2 (b int, created datetime);
|
||||
create trigger tr1 before insert on t1 for each row set
|
||||
@@ -2742,6 +2880,9 @@ end AFTER # root@localhost
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug#18462 mysqldump does not dump view structures correctly
|
||||
#
|
||||
create table t (qty int, price int);
|
||||
insert into t values(3, 50);
|
||||
insert into t values(5, 51);
|
||||
@@ -2761,6 +2902,10 @@ mysqldump {
|
||||
drop view v1;
|
||||
drop view v2;
|
||||
drop table t;
|
||||
#
|
||||
# Bug#14857 Reading dump files with single statement stored routines fails.
|
||||
# fixed by patch for bug#16878
|
||||
#
|
||||
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
|
||||
return 42 */|
|
||||
/*!50003 CREATE PROCEDURE `p`()
|
||||
@@ -2775,6 +2920,9 @@ p CREATE DEFINER=`root`@`localhost` PROCEDURE `p`()
|
||||
select 42
|
||||
drop function f;
|
||||
drop procedure p;
|
||||
#
|
||||
# Bug #17371 Unable to dump a schema with invalid views
|
||||
#
|
||||
create table t1 ( id serial );
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
@@ -2784,6 +2932,9 @@ mysqldump {
|
||||
|
||||
} mysqldump
|
||||
drop view v1;
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
@@ -2844,6 +2995,9 @@ USE `mysqldump_test_db`;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
#
|
||||
# Bug21014 Segmentation fault of mysqldump on view
|
||||
#
|
||||
create database mysqldump_tables;
|
||||
use mysqldump_tables;
|
||||
create table basetable ( id serial, tag varchar(64) );
|
||||
@@ -2877,6 +3031,9 @@ drop view nasishnasifu;
|
||||
drop database mysqldump_views;
|
||||
drop table mysqldump_tables.basetable;
|
||||
drop database mysqldump_tables;
|
||||
#
|
||||
# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
|
||||
#
|
||||
create database mysqldump_dba;
|
||||
use mysqldump_dba;
|
||||
create table t1 (f1 int, f2 int);
|
||||
@@ -2909,6 +3066,9 @@ drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_dbb;
|
||||
use test;
|
||||
#
|
||||
# Bug#21215 mysqldump creating incomplete backups without warning
|
||||
#
|
||||
create user mysqltest_1@localhost;
|
||||
create table t1(a int, b varchar(34));
|
||||
reset master;
|
||||
@@ -2920,6 +3080,12 @@ mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SU
|
||||
grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
||||
drop table t1;
|
||||
drop user mysqltest_1@localhost;
|
||||
#
|
||||
# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||
# information_schema database.
|
||||
#
|
||||
# Bug #21424 mysqldump failing to export/import views
|
||||
#
|
||||
create database mysqldump_myDB;
|
||||
use mysqldump_myDB;
|
||||
create user myDB_User;
|
||||
@@ -2938,6 +3104,9 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
|
||||
drop user myDB_User;
|
||||
drop database mysqldump_myDB;
|
||||
flush privileges;
|
||||
# Bug #21424 continues from here.
|
||||
# Restore. Flush Privileges test ends.
|
||||
#
|
||||
use mysqldump_myDB;
|
||||
select * from mysqldump_myDB.v1;
|
||||
c1
|
||||
@@ -2953,7 +3122,81 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
|
||||
drop user myDB_User;
|
||||
drop database mysqldump_myDB;
|
||||
use test;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# BUG#13926: --order-by-primary fails if PKEY contains quote character
|
||||
#
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a b` INT,
|
||||
`c"d` INT,
|
||||
`e``f` INT,
|
||||
PRIMARY KEY (`a b`, `c"d`, `e``f`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (0815, 4711, 2006);
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS "t1";
|
||||
CREATE TABLE "t1" (
|
||||
"a b" int(11) NOT NULL DEFAULT '0',
|
||||
"c""d" int(11) NOT NULL DEFAULT '0',
|
||||
"e`f" int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY ("a b","c""d","e`f")
|
||||
);
|
||||
|
||||
LOCK TABLES "t1" WRITE;
|
||||
/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
|
||||
INSERT INTO "t1" VALUES (815,4711,2006);
|
||||
/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a b` int(11) NOT NULL DEFAULT '0',
|
||||
`c"d` int(11) NOT NULL DEFAULT '0',
|
||||
`e``f` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`a b`,`c"d`,`e``f`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
INSERT INTO `t1` VALUES (815,4711,2006);
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE `t1`;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
drop table if exists t1;
|
||||
CREATE TABLE t1(a int, b int);
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
@@ -3167,6 +3410,9 @@ mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: w
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table words2;
|
||||
#
|
||||
# BUG# 16853: mysqldump doesn't show events
|
||||
#
|
||||
create database first;
|
||||
use first;
|
||||
set time_zone = 'UTC';
|
||||
@@ -3204,6 +3450,11 @@ third ee3 root@localhost ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLE
|
||||
drop database third;
|
||||
set time_zone = 'SYSTEM';
|
||||
use test;
|
||||
#
|
||||
# BUG#17201 Spurious 'DROP DATABASE' in output,
|
||||
# also confusion between tables and views.
|
||||
# Example code from Markus Popp
|
||||
#
|
||||
create database mysqldump_test_db;
|
||||
use mysqldump_test_db;
|
||||
create table t1 (id int);
|
||||
@@ -3264,4 +3515,6 @@ USE `mysqldump_test_db`;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
drop database mysqldump_test_db;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
||||
@@ -87,6 +87,8 @@ Database: information_schema
|
||||
| ENGINES |
|
||||
| EVENTS |
|
||||
| FILES |
|
||||
| GLOBAL_STATUS |
|
||||
| GLOBAL_VARIABLES |
|
||||
| KEY_COLUMN_USAGE |
|
||||
| PARTITIONS |
|
||||
| PLUGINS |
|
||||
@@ -95,6 +97,8 @@ Database: information_schema
|
||||
| ROUTINES |
|
||||
| SCHEMATA |
|
||||
| SCHEMA_PRIVILEGES |
|
||||
| SESSION_STATUS |
|
||||
| SESSION_VARIABLES |
|
||||
| STATISTICS |
|
||||
| TABLES |
|
||||
| TABLE_CONSTRAINTS |
|
||||
@@ -115,6 +119,8 @@ Database: INFORMATION_SCHEMA
|
||||
| ENGINES |
|
||||
| EVENTS |
|
||||
| FILES |
|
||||
| GLOBAL_STATUS |
|
||||
| GLOBAL_VARIABLES |
|
||||
| KEY_COLUMN_USAGE |
|
||||
| PARTITIONS |
|
||||
| PLUGINS |
|
||||
@@ -123,6 +129,8 @@ Database: INFORMATION_SCHEMA
|
||||
| ROUTINES |
|
||||
| SCHEMATA |
|
||||
| SCHEMA_PRIVILEGES |
|
||||
| SESSION_STATUS |
|
||||
| SESSION_VARIABLES |
|
||||
| STATISTICS |
|
||||
| TABLES |
|
||||
| TABLE_CONSTRAINTS |
|
||||
|
||||
@@ -217,8 +217,11 @@ hej
|
||||
|
||||
a long variable content
|
||||
a long variable content
|
||||
a long $where variable content
|
||||
a long a long variable content variable content
|
||||
a long \$where variable content
|
||||
|
||||
banana = banana
|
||||
Not a banana: ba\$cat\$cat
|
||||
mysqltest: At line 1: Missing arguments to let
|
||||
mysqltest: At line 1: Missing variable name in let
|
||||
mysqltest: At line 1: Missing assignment operator in let
|
||||
|
||||
@@ -611,7 +611,7 @@ C
|
||||
NULL
|
||||
EXPLAIN SELECT type FROM v1 GROUP BY type WITH ROLLUP;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using filesort
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using filesort
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int(11) NOT NULL);
|
||||
|
||||
@@ -495,17 +495,17 @@ gid sid uid
|
||||
103853 5 250
|
||||
EXPLAIN select t1.gid, t2.sid, t3.uid from t3, t2, t1 where t2.gid = t1.gid and t2.uid = t3.uid order by t1.gid, t3.uid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 6 Using index
|
||||
1 SIMPLE t2 eq_ref PRIMARY,uid PRIMARY 4 test.t1.gid 1
|
||||
1 SIMPLE t2 ALL PRIMARY,uid NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t2.uid 1 Using where; Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.gid 1 Using index
|
||||
EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t1.gid,t3.skr;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 ALL PRIMARY NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t3.uid 1 Using where; Using index
|
||||
EXPLAIN SELECT t1.gid, t2.sid, t3.uid from t2, t1, t3 where t2.gid = t1.gid and t2.uid = t3.uid order by t3.uid, t1.gid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort
|
||||
1 SIMPLE t2 eq_ref PRIMARY,uid PRIMARY 4 test.t1.gid 1
|
||||
1 SIMPLE t2 ALL PRIMARY,uid NULL NULL NULL 6 Using temporary; Using filesort
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.gid 1 Using index
|
||||
1 SIMPLE t3 eq_ref PRIMARY PRIMARY 2 test.t2.uid 1 Using where; Using index
|
||||
EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t3.skr,t1.gid;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
||||
@@ -7,7 +7,7 @@ drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
partitions 0.2+e1;
|
||||
ERROR 42000: Only normal integers allowed as number here near '0.2+e1' at line 3
|
||||
ERROR 42000: Only integers allowed as number here near '0.2+e1' at line 3
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
partitions -1;
|
||||
@@ -15,11 +15,11 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
partitions 1.5;
|
||||
ERROR 42000: Only normal integers allowed as number here near '1.5' at line 3
|
||||
ERROR 42000: Only integers allowed as number here near '1.5' at line 3
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
partitions 1e+300;
|
||||
ERROR 42000: Only normal integers allowed as number here near '1e+300' at line 3
|
||||
ERROR 42000: Only integers allowed as number here near '1e+300' at line 3
|
||||
create table t1 (a int)
|
||||
engine = innodb
|
||||
partition by key (a);
|
||||
@@ -68,7 +68,7 @@ create table t1 (a int)
|
||||
engine = csv
|
||||
partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
ERROR HY000: CSV handler cannot be used in partitioned tables
|
||||
ERROR HY000: Engine cannot be used in partitioned tables
|
||||
create table t1 (a bigint)
|
||||
partition by range (a)
|
||||
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
|
||||
@@ -102,7 +102,7 @@ create table t1 (a int)
|
||||
engine = csv
|
||||
partition by list (a)
|
||||
(partition p0 values in (null));
|
||||
ERROR HY000: CSV handler cannot be used in partitioned tables
|
||||
ERROR HY000: Engine cannot be used in partitioned tables
|
||||
create table t1 (a int)
|
||||
partition by key(a)
|
||||
(partition p0 engine = MEMORY);
|
||||
@@ -1054,7 +1054,7 @@ drop table t1;
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 engine = MERGE);
|
||||
ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables
|
||||
ERROR HY000: Engine cannot be used in partitioned tables
|
||||
create table t1 (a varchar(1))
|
||||
partition by key (a)
|
||||
as select 'a';
|
||||
|
||||
@@ -499,6 +499,54 @@ create temporary table if not exists t1 (a1 int);
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
deallocate prepare stmt;
|
||||
CREATE TABLE t1(
|
||||
ID int(10) unsigned NOT NULL auto_increment,
|
||||
Member_ID varchar(15) NOT NULL default '',
|
||||
Action varchar(12) NOT NULL,
|
||||
Action_Date datetime NOT NULL,
|
||||
Track varchar(15) default NULL,
|
||||
User varchar(12) default NULL,
|
||||
Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
|
||||
CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (ID),
|
||||
KEY Action (Action),
|
||||
KEY Action_Date (Action_Date)
|
||||
);
|
||||
INSERT INTO t1(Member_ID, Action, Action_Date, Track) VALUES
|
||||
('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('111111', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
|
||||
('222222', 'Enrolled', '2006-03-07', 'CAD' ),
|
||||
('222222', 'Enrolled', '2006-03-07', 'CHF' ),
|
||||
('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
|
||||
('333333', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('444444', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('555555', 'Enrolled', '2006-07-21', 'CAD' ),
|
||||
('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
|
||||
('666666', 'Enrolled', '2006-02-09', 'CAD' ),
|
||||
('666666', 'Enrolled', '2006-05-12', 'CHF' ),
|
||||
('666666', 'Disenrolled', '2006-06-01', 'CAD' );
|
||||
PREPARE STMT FROM
|
||||
"SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t1
|
||||
WHERE Member_ID=? AND Action='Enrolled' AND
|
||||
(Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t1
|
||||
WHERE Member_ID=?
|
||||
GROUP BY Track
|
||||
HAVING Track>='CAD' AND
|
||||
MAX(Action_Date)>'2006-03-01')";
|
||||
SET @id='111111';
|
||||
EXECUTE STMT USING @id,@id;
|
||||
GROUP_CONCAT(Track SEPARATOR ', ')
|
||||
NULL
|
||||
SET @id='222222';
|
||||
EXECUTE STMT USING @id,@id;
|
||||
GROUP_CONCAT(Track SEPARATOR ', ')
|
||||
CAD
|
||||
DEALLOCATE PREPARE STMT;
|
||||
DROP TABLE t1;
|
||||
End of 4.1 tests
|
||||
create table t1 (a varchar(20));
|
||||
insert into t1 values ('foo');
|
||||
prepare stmt FROM 'SELECT char_length (a) FROM t1';
|
||||
@@ -1291,6 +1339,27 @@ EXECUTE stmt USING @a;
|
||||
i j i i j
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE IF EXISTS t1, t2, t3;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (i INT KEY);
|
||||
CREATE TABLE t2 (i INT);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
PREPARE stmt FROM "SELECT t2.i FROM t1 LEFT JOIN t2 ON t2.i = t1.i
|
||||
WHERE t1.i = ?";
|
||||
SET @arg= 1;
|
||||
EXECUTE stmt USING @arg;
|
||||
i
|
||||
1
|
||||
SET @arg= 2;
|
||||
EXECUTE stmt USING @arg;
|
||||
i
|
||||
NULL
|
||||
SET @arg= 1;
|
||||
EXECUTE stmt USING @arg;
|
||||
i
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.0 tests.
|
||||
create procedure proc_1() reset query cache;
|
||||
call proc_1();
|
||||
|
||||
@@ -1929,26 +1929,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@@ -1976,26 +1976,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
@@ -2026,26 +2026,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2066,26 +2066,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
@@ -2114,26 +2114,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2158,26 +2158,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2204,26 +2204,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2242,26 +2242,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
@@ -2689,21 +2689,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -2739,21 +2739,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
|
||||
@@ -1912,26 +1912,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@@ -1959,26 +1959,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
@@ -2009,26 +2009,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2049,26 +2049,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
@@ -2097,26 +2097,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2141,26 +2141,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2187,26 +2187,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2225,26 +2225,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
@@ -2672,21 +2672,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -2722,21 +2722,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
|
||||
@@ -1913,26 +1913,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 0 31 8
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 0 31 8
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 0 31 8
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 0 31 8
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 0 31 8
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 0 31 8
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 0 31 8
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@@ -1960,26 +1960,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 0 31 8
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 0 31 8
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 0 31 8
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 0 31 8
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 0 31 8
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 0 31 8
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 0 31 8
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 0 31 8
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
@@ -2010,26 +2010,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 0 31 8
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 0 31 8
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 0 31 8
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 0 31 8
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 0 31 8
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 0 31 8
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 0 31 8
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2050,26 +2050,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 0 31 8
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 0 31 8
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 0 31 8
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 0 31 8
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 0 31 8
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 0 31 8
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 0 31 8
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 0 31 8
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
@@ -2098,26 +2098,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 0 31 8
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 0 31 8
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 0 31 8
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 0 31 8
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 0 31 8
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 0 31 8
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 0 31 8
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2142,26 +2142,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 0 31 8
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 0 31 8
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 0 31 8
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 0 31 8
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 0 31 8
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 0 31 8
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 0 31 8
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 0 31 8
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2188,26 +2188,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 0 31 8
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 0 31 8
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 0 31 8
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 0 31 8
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 0 31 8
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 0 31 8
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 0 31 8
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2226,26 +2226,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 0 31 8
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 0 31 8
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 0 31 8
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 0 31 8
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 0 31 8
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 0 31 8
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 0 31 8
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 0 31 8
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
@@ -2673,21 +2673,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -2723,21 +2723,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
|
||||
@@ -1849,26 +1849,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@@ -1896,26 +1896,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
@@ -1946,26 +1946,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -1986,26 +1986,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
@@ -2034,26 +2034,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2078,26 +2078,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -2124,26 +2124,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -2162,26 +2162,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
@@ -2609,21 +2609,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -2659,21 +2659,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
@@ -4863,26 +4863,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@@ -4910,26 +4910,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select
|
||||
@@ -4960,26 +4960,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -5000,26 +5000,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
|
||||
@@ -5048,26 +5048,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -5092,26 +5092,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
@@ -5138,26 +5138,26 @@ def @arg09 253 23 1 Y 128 31 63
|
||||
def @arg10 253 23 1 Y 128 31 63
|
||||
def @arg11 253 67 6 Y 128 30 63
|
||||
def @arg12 253 67 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 8 Y 128 31 63
|
||||
def @arg13 253 16777216 10 Y 128 31 63
|
||||
def @arg14 253 16777216 19 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 8 Y 128 31 63
|
||||
def @arg17 253 20 4 Y 128 0 63
|
||||
def @arg18 253 20 1 Y 128 0 63
|
||||
def @arg19 253 20 1 Y 128 0 63
|
||||
def @arg20 253 8192 1 Y 0 31 8
|
||||
def @arg21 253 8192 10 Y 0 31 8
|
||||
def @arg22 253 8192 30 Y 0 31 8
|
||||
def @arg23 253 8192 8 Y 128 31 63
|
||||
def @arg24 253 8192 8 Y 0 31 8
|
||||
def @arg25 253 8192 4 Y 128 31 63
|
||||
def @arg26 253 8192 4 Y 0 31 8
|
||||
def @arg27 253 8192 10 Y 128 31 63
|
||||
def @arg28 253 8192 10 Y 0 31 8
|
||||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
def @arg20 253 16777216 1 Y 0 31 8
|
||||
def @arg21 253 16777216 10 Y 0 31 8
|
||||
def @arg22 253 16777216 30 Y 0 31 8
|
||||
def @arg23 253 16777216 8 Y 128 31 63
|
||||
def @arg24 253 16777216 8 Y 0 31 8
|
||||
def @arg25 253 16777216 4 Y 128 31 63
|
||||
def @arg26 253 16777216 4 Y 0 31 8
|
||||
def @arg27 253 16777216 10 Y 128 31 63
|
||||
def @arg28 253 16777216 10 Y 0 31 8
|
||||
def @arg29 253 16777216 8 Y 128 31 63
|
||||
def @arg30 253 16777216 8 Y 0 31 8
|
||||
def @arg31 253 16777216 3 Y 0 31 8
|
||||
def @arg32 253 16777216 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
@@ -5176,26 +5176,26 @@ def @arg09 253 23 0 Y 128 31 63
|
||||
def @arg10 253 23 0 Y 128 31 63
|
||||
def @arg11 253 67 0 Y 128 30 63
|
||||
def @arg12 253 67 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
def @arg16 253 8192 0 Y 128 31 63
|
||||
def @arg13 253 16777216 0 Y 128 31 63
|
||||
def @arg14 253 16777216 0 Y 128 31 63
|
||||
def @arg15 253 16777216 19 Y 128 31 63
|
||||
def @arg16 253 16777216 0 Y 128 31 63
|
||||
def @arg17 253 20 0 Y 128 0 63
|
||||
def @arg18 253 20 0 Y 128 0 63
|
||||
def @arg19 253 20 0 Y 128 0 63
|
||||
def @arg20 253 8192 0 Y 0 31 8
|
||||
def @arg21 253 8192 0 Y 0 31 8
|
||||
def @arg22 253 8192 0 Y 0 31 8
|
||||
def @arg23 253 8192 0 Y 128 31 63
|
||||
def @arg24 253 8192 0 Y 0 31 8
|
||||
def @arg25 253 8192 0 Y 128 31 63
|
||||
def @arg26 253 8192 0 Y 0 31 8
|
||||
def @arg27 253 8192 0 Y 128 31 63
|
||||
def @arg28 253 8192 0 Y 0 31 8
|
||||
def @arg29 253 8192 0 Y 128 31 63
|
||||
def @arg30 253 8192 0 Y 0 31 8
|
||||
def @arg31 253 8192 0 Y 0 31 8
|
||||
def @arg32 253 8192 0 Y 0 31 8
|
||||
def @arg20 253 16777216 0 Y 0 31 8
|
||||
def @arg21 253 16777216 0 Y 0 31 8
|
||||
def @arg22 253 16777216 0 Y 0 31 8
|
||||
def @arg23 253 16777216 0 Y 128 31 63
|
||||
def @arg24 253 16777216 0 Y 0 31 8
|
||||
def @arg25 253 16777216 0 Y 128 31 63
|
||||
def @arg26 253 16777216 0 Y 0 31 8
|
||||
def @arg27 253 16777216 0 Y 128 31 63
|
||||
def @arg28 253 16777216 0 Y 0 31 8
|
||||
def @arg29 253 16777216 0 Y 128 31 63
|
||||
def @arg30 253 16777216 0 Y 0 31 8
|
||||
def @arg31 253 16777216 0 Y 0 31 8
|
||||
def @arg32 253 16777216 0 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
|
||||
@@ -5623,21 +5623,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -5673,21 +5673,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
|
||||
@@ -2672,21 +2672,21 @@ set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
c2 1
|
||||
c3 1
|
||||
c4 1
|
||||
c5 1
|
||||
c6 1
|
||||
c1 127
|
||||
c2 32767
|
||||
c3 8388607
|
||||
c4 2147483647
|
||||
c5 2147483647
|
||||
c6 9223372036854775807
|
||||
c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
@@ -2722,21 +2722,21 @@ set @arg00= '-1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@arg00, @arg00, @arg00, @arg00, @arg00 ;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c1' at row 1
|
||||
Warning 1265 Data truncated for column 'c2' at row 1
|
||||
Warning 1265 Data truncated for column 'c3' at row 1
|
||||
Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c1' at row 1
|
||||
Warning 1264 Out of range value for column 'c2' at row 1
|
||||
Warning 1264 Out of range value for column 'c3' at row 1
|
||||
Warning 1264 Out of range value for column 'c4' at row 1
|
||||
Warning 1264 Out of range value for column 'c5' at row 1
|
||||
Warning 1264 Out of range value for column 'c6' at row 1
|
||||
Warning 1264 Out of range value for column 'c7' at row 1
|
||||
Warning 1264 Out of range value for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
c2 -1
|
||||
c3 -1
|
||||
c4 -1
|
||||
c5 -1
|
||||
c6 -1
|
||||
c1 -128
|
||||
c2 -32768
|
||||
c3 -8388608
|
||||
c4 -2147483648
|
||||
c5 -2147483648
|
||||
c6 -9223372036854775808
|
||||
c7 -3.40282e+38
|
||||
c8 -1.11111111111111e+50
|
||||
c9 -1.11111111111111e+50
|
||||
|
||||
@@ -949,24 +949,24 @@ COUNT(*)
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
|
||||
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
|
||||
Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050328 invalid'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050328 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050328 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050328 invalid'
|
||||
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
|
||||
COUNT(*)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
|
||||
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
|
||||
@@ -750,13 +750,13 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM t1 WHERE a < 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
EXPLAIN SELECT a,b FROM v1 WHERE a < 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
SELECT a,b FROM t1 WHERE a < 2 and b=3;
|
||||
a b
|
||||
1 3
|
||||
@@ -799,13 +799,13 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from v1 where a in (3,4) and b in (1,2,3);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from t1 where a between 3 and 4 and b between 1 and 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
explain select * from v1 where a between 3 and 4 and b between 1 and 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 8 NULL # Using where; Using index
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table t3 (a int);
|
||||
@@ -941,3 +941,17 @@ item started price
|
||||
A1 2005-11-01 08:00:00 1000.000
|
||||
A1 2005-11-15 00:00:00 2000.000
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
create table t2 (a int, b int, filler char(100));
|
||||
insert into t2 select A.a + 10 * (B.a + 10 * C.a), 10, 'filler' from t1 A,
|
||||
t1 B, t1 C where A.a < 5;
|
||||
insert into t2 select 1000, b, 'filler' from t2;
|
||||
alter table t2 add index (a,b);
|
||||
select 'In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)' Z;
|
||||
Z
|
||||
In following EXPLAIN the access method should be ref, #rows~=500 (and not 2)
|
||||
explain select * from t2 where a=1000 and b<11;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref a a 5 const 502 Using where
|
||||
drop table t1, t2;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
DROP TABLE IF EXISTS t1, t2, t3, t4;
|
||||
CREATE TABLE t1 (id INTEGER) ENGINE=MYISAM;
|
||||
CREATE TABLE t2 (id INTEGER primary key) ENGINE=INNODB;
|
||||
CREATE TABLE t3 (a char(32) primary key,id INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE t4 (a char(32) primary key,id INTEGER) ENGINE=MYISAM;
|
||||
CREATE TABLE t1 (id INTEGER) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (id INTEGER PRIMARY KEY);
|
||||
CREATE TABLE t3 (a CHAR(32) PRIMARY KEY,id INTEGER);
|
||||
CREATE TABLE t4 (a CHAR(32) PRIMARY KEY,id INTEGER) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (id) VALUES (1);
|
||||
INSERT INTO t1 SELECT id+1 FROM t1;
|
||||
INSERT INTO t1 SELECT id+2 FROM t1;
|
||||
@@ -26,9 +27,9 @@ INSERT INTO t1 SELECT id+262144 FROM t1;
|
||||
INSERT INTO t1 SELECT id+524288 FROM t1;
|
||||
INSERT INTO t1 SELECT id+1048576 FROM t1;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
INSERT INTO t3 SELECT concat(id),id from t2 ORDER BY -id;
|
||||
INSERT INTO t4 SELECT * from t3 ORDER BY concat(a);
|
||||
select sum(id) from t3;
|
||||
sum(id)
|
||||
INSERT INTO t3 SELECT CONCAT(id),id FROM t2 ORDER BY -id;
|
||||
INSERT INTO t4 SELECT * FROM t3 ORDER BY CONCAT(a);
|
||||
SELECT SUM(id) FROM t3;
|
||||
SUM(id)
|
||||
2199024304128
|
||||
drop table t1,t2,t3,t4;
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
272
mysql-test/r/round.result
Normal file
272
mysql-test/r/round.result
Normal file
@@ -0,0 +1,272 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (sint8 tinyint not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('127.4');
|
||||
INSERT INTO t1 VALUES ('127.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint8' at row 1
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
INSERT INTO t1 VALUES ('-127.4');
|
||||
INSERT INTO t1 VALUES ('-127.5');
|
||||
INSERT INTO t1 VALUES ('-128.4');
|
||||
INSERT INTO t1 VALUES ('-128.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint8' at row 1
|
||||
SELECT * FROM t1;
|
||||
sint8
|
||||
0
|
||||
1
|
||||
127
|
||||
127
|
||||
0
|
||||
-1
|
||||
-127
|
||||
-128
|
||||
-128
|
||||
-128
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (uint8 tinyint unsigned not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('127.4');
|
||||
INSERT INTO t1 VALUES ('127.5');
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint8' at row 1
|
||||
INSERT INTO t1 VALUES ('255.4');
|
||||
INSERT INTO t1 VALUES ('255.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint8' at row 1
|
||||
SELECT * FROM t1;
|
||||
uint8
|
||||
0
|
||||
1
|
||||
127
|
||||
128
|
||||
0
|
||||
0
|
||||
255
|
||||
255
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (sint16 smallint not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('32767.4');
|
||||
INSERT INTO t1 VALUES ('32767.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint16' at row 1
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
INSERT INTO t1 VALUES ('-32767.4');
|
||||
INSERT INTO t1 VALUES ('-32767.5');
|
||||
INSERT INTO t1 VALUES ('-32768.4');
|
||||
INSERT INTO t1 VALUES ('-32768.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint16' at row 1
|
||||
SELECT * FROM t1;
|
||||
sint16
|
||||
0
|
||||
1
|
||||
32767
|
||||
32767
|
||||
0
|
||||
-1
|
||||
-32767
|
||||
-32768
|
||||
-32768
|
||||
-32768
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (uint16 smallint unsigned not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('32767.4');
|
||||
INSERT INTO t1 VALUES ('32767.5');
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint16' at row 1
|
||||
INSERT INTO t1 VALUES ('65535.4');
|
||||
INSERT INTO t1 VALUES ('65535.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint16' at row 1
|
||||
SELECT * FROM t1;
|
||||
uint16
|
||||
0
|
||||
1
|
||||
32767
|
||||
32768
|
||||
0
|
||||
0
|
||||
65535
|
||||
65535
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (sint24 mediumint not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('8388607.4');
|
||||
INSERT INTO t1 VALUES ('8388607.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint24' at row 1
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
INSERT INTO t1 VALUES ('-8388607.4');
|
||||
INSERT INTO t1 VALUES ('-8388607.5');
|
||||
INSERT INTO t1 VALUES ('-8388608.4');
|
||||
INSERT INTO t1 VALUES ('-8388608.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint24' at row 1
|
||||
SELECT * FROM t1;
|
||||
sint24
|
||||
0
|
||||
1
|
||||
8388607
|
||||
8388607
|
||||
0
|
||||
-1
|
||||
-8388607
|
||||
-8388608
|
||||
-8388608
|
||||
-8388608
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (uint24 mediumint unsigned not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('8388607.4');
|
||||
INSERT INTO t1 VALUES ('8388607.5');
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint24' at row 1
|
||||
INSERT INTO t1 VALUES ('16777215.4');
|
||||
INSERT INTO t1 VALUES ('16777215.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint24' at row 1
|
||||
SELECT * FROM t1;
|
||||
uint24
|
||||
0
|
||||
1
|
||||
8388607
|
||||
8388608
|
||||
0
|
||||
0
|
||||
16777215
|
||||
16777215
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (sint64 bigint not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('9223372036854775807.4');
|
||||
INSERT INTO t1 VALUES ('9223372036854775807.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint64' at row 1
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
INSERT INTO t1 VALUES ('-9223372036854775807.4');
|
||||
INSERT INTO t1 VALUES ('-9223372036854775807.5');
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.4');
|
||||
INSERT INTO t1 VALUES ('-9223372036854775808.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sint64' at row 1
|
||||
SELECT * FROM t1;
|
||||
sint64
|
||||
0
|
||||
1
|
||||
9223372036854775807
|
||||
9223372036854775807
|
||||
0
|
||||
-1
|
||||
-9223372036854775807
|
||||
-9223372036854775808
|
||||
-9223372036854775808
|
||||
-9223372036854775808
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (uint64 bigint unsigned not null);
|
||||
INSERT INTO t1 VALUES ('0.1');
|
||||
INSERT INTO t1 VALUES ('0.5');
|
||||
INSERT INTO t1 VALUES ('9223372036854775807.4');
|
||||
INSERT INTO t1 VALUES ('9223372036854775807.5');
|
||||
INSERT INTO t1 VALUES ('-0.1');
|
||||
INSERT INTO t1 VALUES ('-0.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint64' at row 1
|
||||
INSERT INTO t1 VALUES ('18446744073709551615.4');
|
||||
INSERT INTO t1 VALUES ('18446744073709551615.5');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'uint64' at row 1
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.0');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.2');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.3');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.4');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.5');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.0e1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.1e1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.2e1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.3e1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.4e1');
|
||||
INSERT INTO t1 VALUES ('1844674407370955161.5e1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551610e-1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551611e-1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551612e-1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551613e-1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551614e-1');
|
||||
INSERT INTO t1 VALUES ('18446744073709551615e-1');
|
||||
SELECT * FROM t1;
|
||||
uint64
|
||||
0
|
||||
1
|
||||
9223372036854775807
|
||||
9223372036854775808
|
||||
0
|
||||
0
|
||||
18446744073709551615
|
||||
18446744073709551615
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955162
|
||||
18446744073709551610
|
||||
18446744073709551611
|
||||
18446744073709551612
|
||||
18446744073709551613
|
||||
18446744073709551614
|
||||
18446744073709551615
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955161
|
||||
1844674407370955162
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (str varchar(128), sint64 bigint not null default 0);
|
||||
INSERT INTO t1 (str) VALUES ('1.5');
|
||||
INSERT INTO t1 (str) VALUES ('1.00005e4');
|
||||
INSERT INTO t1 (str) VALUES ('1.0005e3');
|
||||
INSERT INTO t1 (str) VALUES ('1.005e2');
|
||||
INSERT INTO t1 (str) VALUES ('1.05e1');
|
||||
INSERT INTO t1 (str) VALUES ('1.5e0');
|
||||
INSERT INTO t1 (str) VALUES ('100005e-1');
|
||||
INSERT INTO t1 (str) VALUES ('100050e-2');
|
||||
INSERT INTO t1 (str) VALUES ('100500e-3');
|
||||
INSERT INTO t1 (str) VALUES ('105000e-4');
|
||||
INSERT INTO t1 (str) VALUES ('150000e-5');
|
||||
UPDATE t1 SET sint64=str;
|
||||
SELECT * FROM t1;
|
||||
str sint64
|
||||
1.5 2
|
||||
1.00005e4 10001
|
||||
1.0005e3 1001
|
||||
1.005e2 101
|
||||
1.05e1 11
|
||||
1.5e0 2
|
||||
100005e-1 10001
|
||||
100050e-2 1001
|
||||
100500e-3 101
|
||||
105000e-4 11
|
||||
150000e-5 2
|
||||
DROP TABLE t1;
|
||||
@@ -181,3 +181,128 @@ SELECT ROW(1,1,1) = ROW(1,1,1) as `1`, ROW(1,1,1) = ROW(1,2,1) as `0`, ROW(1,NUL
|
||||
select row(NULL,1)=(2,0);
|
||||
row(NULL,1)=(2,0)
|
||||
0
|
||||
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b));
|
||||
INSERT INTO t1 VALUES (1,1), (2,1), (3,1), (1,2), (3,2), (3,3);
|
||||
EXPLAIN SELECT * FROM t1 WHERE a=3 AND b=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Using index
|
||||
EXPLAIN SELECT * FROM t1 WHERE (a,b)=(3,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Using index
|
||||
SELECT * FROM t1 WHERE a=3 and b=2;
|
||||
a b
|
||||
3 2
|
||||
SELECT * FROM t1 WHERE (a,b)=(3,2);
|
||||
a b
|
||||
3 2
|
||||
CREATE TABLE t2 (a int, b int, c int, PRIMARY KEY (a,b,c));
|
||||
INSERT INTO t2 VALUES
|
||||
(1,1,2), (3,1,3), (1,2,2), (4,4,2),
|
||||
(1,1,1), (3,1,1), (1,2,1);
|
||||
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Using index
|
||||
EXPLAIN SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Using index
|
||||
SELECT * FROM t1,t2 WHERE t1.a=t2.a and t1.b=t2.b;
|
||||
a b a b c
|
||||
1 1 1 1 1
|
||||
1 1 1 1 2
|
||||
1 2 1 2 1
|
||||
1 2 1 2 2
|
||||
3 1 3 1 1
|
||||
3 1 3 1 3
|
||||
SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b);
|
||||
a b a b c
|
||||
1 1 1 1 1
|
||||
1 1 1 1 2
|
||||
1 2 1 2 1
|
||||
1 2 1 2 2
|
||||
3 1 3 1 1
|
||||
3 1 3 1 3
|
||||
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 Using where; Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
|
||||
EXPLAIN SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 Using where; Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Using index
|
||||
SELECT * FROM t1,t2 WHERE t1.a=1 and t1.b=t2.b;
|
||||
a b a b c
|
||||
1 1 1 1 2
|
||||
1 1 3 1 3
|
||||
1 2 1 2 2
|
||||
1 1 1 1 1
|
||||
1 1 3 1 1
|
||||
1 2 1 2 1
|
||||
SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,2);
|
||||
a b a b c
|
||||
1 2 1 1 1
|
||||
1 2 1 1 2
|
||||
1 2 1 2 1
|
||||
1 2 1 2 2
|
||||
3 2 3 1 1
|
||||
3 2 3 1 3
|
||||
EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b+1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 100.00 Using index
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t1`.`b` = (`test`.`t2`.`b` + 1)))
|
||||
SELECT * FROM t1,t2 WHERE (t1.a,t1.b)=(t2.a,t2.b+1);
|
||||
a b a b c
|
||||
1 2 1 1 1
|
||||
1 2 1 1 2
|
||||
3 2 3 1 1
|
||||
3 2 3 1 3
|
||||
EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE (t1.a-1,t1.b)=(t2.a-1,t2.b+1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 index NULL PRIMARY 8 NULL 6 100.00 Using index
|
||||
1 SIMPLE t2 index NULL PRIMARY 12 NULL 7 100.00 Using where; Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where (((`test`.`t1`.`a` - 1) = (`test`.`t2`.`a` - 1)) and (`test`.`t1`.`b` = (`test`.`t2`.`b` + 1)))
|
||||
SELECT * FROM t1,t2 WHERE (t1.a-1,t1.b)=(t2.a-1,t2.b+1);
|
||||
a b a b c
|
||||
1 2 1 1 2
|
||||
3 2 3 1 3
|
||||
1 2 1 1 1
|
||||
3 2 3 1 1
|
||||
EXPLAIN SELECT * FROM t2 WHERE a=3 AND b=2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 8 const,const 1 Using index
|
||||
EXPLAIN SELECT * FROM t2 WHERE (a,b)=(3,2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ref PRIMARY PRIMARY 8 const,const 1 Using index
|
||||
SELECT * FROM t2 WHERE a=3 and b=2;
|
||||
a b c
|
||||
SELECT * FROM t2 WHERE (a,b)=(3,2);
|
||||
a b c
|
||||
EXPLAIN SELECT * FROM t1,t2 WHERE t2.a=t1.a AND t2.b=2 AND t2.c=1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 Using index
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 12 test.t1.a,const,const 1 Using index
|
||||
EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE (t2.a,(t2.b,t2.c))=(t1.a,(2,1));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 100.00 Using index
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 12 test.t1.a,const,const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`c` = 1) and (`test`.`t2`.`b` = 2) and (`test`.`t2`.`a` = `test`.`t1`.`a`))
|
||||
SELECT * FROM t1,t2 WHERE (t2.a,(t2.b,t2.c))=(t1.a,(2,1));
|
||||
a b a b c
|
||||
1 1 1 2 1
|
||||
1 2 1 2 1
|
||||
EXPLAIN EXTENDED SELECT * FROM t1,t2 WHERE t2.a=t1.a AND (t2.b,t2.c)=(2,1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 6 100.00 Using index
|
||||
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 12 test.t1.a,const,const 1 100.00 Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`c` = 1) and (`test`.`t2`.`b` = 2) and (`test`.`t2`.`a` = `test`.`t1`.`a`))
|
||||
SELECT * FROM t1,t2 WHERE t2.a=t1.a AND (t2.b,t2.c)=(2,1);
|
||||
a b a b c
|
||||
1 1 1 2 1
|
||||
1 2 1 2 1
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
SET SESSION STORAGE_ENGINE = InnoDB;
|
||||
drop table if exists t1, t2, t3,t4;
|
||||
create table t1 (
|
||||
create table t1 (
|
||||
pk1 int not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=innodb;
|
||||
);
|
||||
insert into t1 values (-5, 1, 1),
|
||||
(-100, 1, 1),
|
||||
(3, 1, 1),
|
||||
@@ -23,14 +24,14 @@ pk1 key1 key2
|
||||
3 1 1
|
||||
10 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
create table t1 (
|
||||
pk1 int unsigned not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=innodb;
|
||||
);
|
||||
insert into t1 values (0, 1, 1),
|
||||
(0xFFFFFFFF, 1, 1),
|
||||
(0xFFFFFFFE, 1, 1),
|
||||
@@ -44,14 +45,14 @@ pk1 key1 key2
|
||||
4294967294 1 1
|
||||
4294967295 1 1
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
create table t1 (
|
||||
pk1 char(4) not NULL,
|
||||
key1 int(11),
|
||||
key2 int(11),
|
||||
PRIMARY KEY (pk1),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=innodb collate latin2_general_ci;
|
||||
) collate latin2_general_ci;
|
||||
insert into t1 values ('a1', 1, 1),
|
||||
('b2', 1, 1),
|
||||
('A3', 1, 1),
|
||||
@@ -72,8 +73,8 @@ key2 int(11),
|
||||
PRIMARY KEY (pk1,pk2,pk3),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=innodb;
|
||||
insert into t1 values
|
||||
);
|
||||
insert into t1 values
|
||||
(1, 'u', 'u', 1, 1),
|
||||
(1, 'u', char(0xEC), 1, 1),
|
||||
(1, 'u', 'x', 1, 1);
|
||||
@@ -170,7 +171,7 @@ key2 int(11),
|
||||
primary key(pk1, pk2),
|
||||
KEY key1 (key1),
|
||||
KEY key2 (key2)
|
||||
) engine=innodb;
|
||||
);
|
||||
insert into t1 values ('','empt',2,2),
|
||||
('a','a--a',2,2),
|
||||
('bb','b--b',2,2),
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#
|
||||
# Bug#20821: INSERT DELAYED fails to write some rows to binlog
|
||||
#
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@@ -13,4 +16,8 @@ COUNT(*)
|
||||
SELECT COUNT(*) FROM mysqlslap.t1;
|
||||
COUNT(*)
|
||||
5000
|
||||
DROP SCHEMA IF EXISTS mysqlslap;
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
USE test;
|
||||
DROP SCHEMA mysqlslap;
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
#
|
||||
# Setup
|
||||
#
|
||||
use test;
|
||||
drop table if exists t1, t2, t3;
|
||||
#
|
||||
# See if queries that use both auto_increment and LAST_INSERT_ID()
|
||||
# are replicated well
|
||||
#
|
||||
# We also check how the foreign_key_check variable is replicated
|
||||
#
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@@ -38,6 +49,9 @@ select * from t2;
|
||||
b c
|
||||
5 0
|
||||
6 11
|
||||
#
|
||||
# check if INSERT SELECT in auto_increment is well replicated (bug #490)
|
||||
#
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
create table t1(a int auto_increment, key(a));
|
||||
@@ -68,12 +82,19 @@ b c
|
||||
9 13
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
#
|
||||
# Bug#8412: Error codes reported in binary log for CHARACTER SET,
|
||||
# FOREIGN_KEY_CHECKS
|
||||
#
|
||||
SET TIMESTAMP=1000000000;
|
||||
CREATE TABLE t1 ( a INT UNIQUE );
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
INSERT INTO t1 VALUES (1),(1);
|
||||
Got one of the listed errors
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#14553: NULL in WHERE resets LAST_INSERT_ID
|
||||
#
|
||||
create table t1(a int auto_increment, key(a));
|
||||
create table t2(a int);
|
||||
insert into t1 (a) values (null);
|
||||
@@ -87,6 +108,14 @@ a
|
||||
1
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
#
|
||||
# BUG#15728: LAST_INSERT_ID function inside a stored function returns 0
|
||||
#
|
||||
# The solution is not to reset last_insert_id on enter to sub-statement.
|
||||
#
|
||||
drop function if exists bug15728;
|
||||
drop function if exists bug15728_insert;
|
||||
drop table if exists t1, t2;
|
||||
@@ -234,6 +263,161 @@ n b
|
||||
2 100
|
||||
3 350
|
||||
drop table t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
SELECT LAST_INSERT_ID(0);
|
||||
LAST_INSERT_ID(0)
|
||||
0
|
||||
CREATE TABLE t1 (
|
||||
id INT NOT NULL DEFAULT 0,
|
||||
last_id INT,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE TABLE t2 (
|
||||
id INT NOT NULL AUTO_INCREMENT,
|
||||
last_id INT,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
INSERT INTO t2 (last_id) VALUES (LAST_INSERT_ID());
|
||||
INSERT INTO t1 (last_id) VALUES (LAST_INSERT_ID());
|
||||
END|
|
||||
CALL p1();
|
||||
SELECT * FROM t1;
|
||||
id last_id
|
||||
0 1
|
||||
SELECT * FROM t2;
|
||||
id last_id
|
||||
1 0
|
||||
SELECT * FROM t1;
|
||||
id last_id
|
||||
0 1
|
||||
SELECT * FROM t2;
|
||||
id last_id
|
||||
1 0
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1, t2;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
DROP FUNCTION IF EXISTS f2;
|
||||
DROP FUNCTION IF EXISTS f3;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (
|
||||
i INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
j INT DEFAULT 0
|
||||
);
|
||||
CREATE TABLE t2 (i INT);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
INSERT INTO t1 (i) VALUES (NULL);
|
||||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID());
|
||||
INSERT INTO t1 (i) VALUES (NULL), (NULL);
|
||||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID());
|
||||
END |
|
||||
CREATE FUNCTION f1() RETURNS INT MODIFIES SQL DATA
|
||||
BEGIN
|
||||
INSERT INTO t1 (i) VALUES (NULL);
|
||||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID());
|
||||
INSERT INTO t1 (i) VALUES (NULL), (NULL);
|
||||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID());
|
||||
RETURN 0;
|
||||
END |
|
||||
CREATE FUNCTION f2() RETURNS INT NOT DETERMINISTIC
|
||||
RETURN LAST_INSERT_ID() |
|
||||
CREATE FUNCTION f3() RETURNS INT MODIFIES SQL DATA
|
||||
BEGIN
|
||||
INSERT INTO t2 (i) VALUES (LAST_INSERT_ID());
|
||||
RETURN 0;
|
||||
END |
|
||||
INSERT INTO t1 VALUES (NULL, -1);
|
||||
CALL p1();
|
||||
SELECT f1();
|
||||
f1()
|
||||
0
|
||||
INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()),
|
||||
(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2());
|
||||
INSERT INTO t1 VALUES (NULL, f2());
|
||||
INSERT INTO t1 VALUES (NULL, LAST_INSERT_ID()), (NULL, LAST_INSERT_ID(5)),
|
||||
(NULL, @@LAST_INSERT_ID);
|
||||
INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID());
|
||||
UPDATE t1 SET j= -1 WHERE i IS NULL;
|
||||
INSERT INTO t1 (i) VALUES (NULL);
|
||||
INSERT INTO t1 (i) VALUES (NULL);
|
||||
SELECT f3();
|
||||
f3()
|
||||
0
|
||||
SELECT * FROM t1;
|
||||
i j
|
||||
1 -1
|
||||
2 0
|
||||
3 0
|
||||
4 0
|
||||
5 0
|
||||
6 0
|
||||
7 0
|
||||
8 3
|
||||
9 3
|
||||
10 3
|
||||
11 3
|
||||
12 3
|
||||
13 8
|
||||
14 13
|
||||
15 5
|
||||
16 13
|
||||
17 -1
|
||||
18 14
|
||||
19 0
|
||||
20 0
|
||||
SELECT * FROM t2;
|
||||
i
|
||||
2
|
||||
3
|
||||
5
|
||||
6
|
||||
19
|
||||
SELECT * FROM t1;
|
||||
i j
|
||||
1 -1
|
||||
2 0
|
||||
3 0
|
||||
4 0
|
||||
5 0
|
||||
6 0
|
||||
7 0
|
||||
8 3
|
||||
9 3
|
||||
10 3
|
||||
11 3
|
||||
12 3
|
||||
13 8
|
||||
14 13
|
||||
15 5
|
||||
16 13
|
||||
17 -1
|
||||
18 14
|
||||
19 0
|
||||
20 0
|
||||
SELECT * FROM t2;
|
||||
i
|
||||
2
|
||||
3
|
||||
5
|
||||
6
|
||||
19
|
||||
DROP PROCEDURE p1;
|
||||
DROP FUNCTION f1;
|
||||
DROP FUNCTION f2;
|
||||
DROP FUNCTION f3;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
create table t2 (
|
||||
id int not null auto_increment,
|
||||
last_id int,
|
||||
primary key (id)
|
||||
);
|
||||
truncate table t2;
|
||||
create table t1 (id tinyint primary key);
|
||||
create function insid() returns int
|
||||
@@ -267,5 +451,30 @@ select * from t2;
|
||||
id last_id
|
||||
4 0
|
||||
8 0
|
||||
drop table t1, t2;
|
||||
drop table t1;
|
||||
drop function insid;
|
||||
truncate table t2;
|
||||
create table t1 (n int primary key auto_increment not null,
|
||||
b int, unique(b));
|
||||
create procedure foo()
|
||||
begin
|
||||
insert into t1 values(null,10);
|
||||
insert ignore into t1 values(null,10);
|
||||
insert ignore into t1 values(null,10);
|
||||
insert into t2 values(null,3);
|
||||
end|
|
||||
call foo();
|
||||
select * from t1;
|
||||
n b
|
||||
1 10
|
||||
select * from t2;
|
||||
id last_id
|
||||
1 3
|
||||
select * from t1;
|
||||
n b
|
||||
1 10
|
||||
select * from t2;
|
||||
id last_id
|
||||
1 3
|
||||
drop table t1, t2;
|
||||
drop procedure foo;
|
||||
|
||||
@@ -28,7 +28,7 @@ day id category name
|
||||
2003-03-22 2416 a bbbbb
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
slave-bin.000001 1248
|
||||
slave-bin.000001 1276
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
@@ -39,7 +39,7 @@ set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1765 # # master-bin.000001 Yes Yes # 0 0 1765 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No #
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
@@ -49,7 +49,7 @@ change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1800 # # master-bin.000001 No No # 0 0 1800 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No #
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
set sql_log_bin=0;
|
||||
|
||||
@@ -30,16 +30,16 @@ a b
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
7 5
|
||||
10 6
|
||||
5 5
|
||||
6 6
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
7 5
|
||||
10 6
|
||||
5 5
|
||||
6 6
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int unsigned not null auto_increment primary key,
|
||||
|
||||
@@ -5,9 +5,6 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET BINLOG_FORMAT=MIXED;
|
||||
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
||||
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
||||
STATEMENT MIXED
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
||||
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
||||
|
||||
@@ -67,9 +67,9 @@ drop table t1;
|
||||
create table t1 (a int, b char(10));
|
||||
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 3
|
||||
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
|
||||
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
|
||||
Warning 1264 Out of range value for column 'a' at row 5
|
||||
Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 5
|
||||
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
|
||||
select * from rewrite.t1;
|
||||
a b
|
||||
@@ -81,7 +81,8 @@ a b
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 4
|
||||
Warning 1366 Incorrect integer value: '
|
||||
' for column 'a' at row 4
|
||||
Warning 1261 Row 4 doesn't contain data for all columns
|
||||
select * from rewrite.t1;
|
||||
a b
|
||||
|
||||
@@ -60,3 +60,63 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
|
||||
master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
|
||||
master-bin.000001 227 Write_rows 1 266 table_id: # flags: STMT_END_F
|
||||
DROP TABLE t1;
|
||||
================ Test for BUG#17620 ================
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
**** On Slave ****
|
||||
SET GLOBAL QUERY_CACHE_SIZE=0;
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
**** On Slave ****
|
||||
SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024;
|
||||
**** On Master ****
|
||||
INSERT INTO t1 VALUES (4),(5),(6);
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
**** On Master ****
|
||||
INSERT INTO t1 VALUES (7),(8),(9);
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
================ Test for BUG#22550 ================
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a BIT(1), b INT) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES(1,2);
|
||||
SELECT HEX(a),b FROM t1;
|
||||
HEX(a) b
|
||||
1 2
|
||||
SELECT HEX(a),b FROM t1;
|
||||
HEX(a) b
|
||||
1 2
|
||||
UPDATE t1 SET a=0 WHERE b=2;
|
||||
SELECT HEX(a),b FROM t1;
|
||||
HEX(a) b
|
||||
0 2
|
||||
SELECT HEX(a),b FROM t1;
|
||||
HEX(a) b
|
||||
0 2
|
||||
|
||||
@@ -5,7 +5,10 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET BINLOG_FORMAT=ROW;
|
||||
SET @@BINLOG_FORMAT = ROW;
|
||||
SELECT @@BINLOG_FORMAT;
|
||||
@@BINLOG_FORMAT
|
||||
ROW
|
||||
**** Partition RANGE testing ****
|
||||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
|
||||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
@@ -5,9 +7,15 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
#
|
||||
# Generate a big enough master's binlog to cause relay log rotations
|
||||
#
|
||||
create table t1 (a int);
|
||||
drop table t1;
|
||||
reset slave;
|
||||
#
|
||||
# Test 1
|
||||
#
|
||||
set global max_binlog_size=8192;
|
||||
set global max_relay_log_size=8192-1;
|
||||
select @@global.max_relay_log_size;
|
||||
@@ -15,47 +23,251 @@ select @@global.max_relay_log_size;
|
||||
4096
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 2
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
20480
|
||||
@@global.max_relay_log_size 20480
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 3: max_relay_log_size = 0
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
0
|
||||
@@global.max_relay_log_size 0
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58664 # # master-bin.000001 Yes Yes # 0 0 58664 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58664
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58664
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 5
|
||||
#
|
||||
reset slave;
|
||||
start slave;
|
||||
flush logs;
|
||||
create table t1 (a int);
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58750 # # master-bin.000001 Yes Yes # 0 0 58750 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58750
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||
#
|
||||
flush logs;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 58826 # # master-bin.000001 Yes Yes # 0 0 58826 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58826
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58826
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 102 <Binlog_Ignore_DB>
|
||||
File master-bin.000002
|
||||
Position 102
|
||||
Binlog_Do_DB <Binlog_Ignore_DB>
|
||||
Binlog_Ignore_DB
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
||||
381
mysql-test/r/rpl_row_tabledefs_2myisam.result
Normal file
381
mysql-test/r/rpl_row_tabledefs_2myisam.result
Normal file
@@ -0,0 +1,381 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t4 (a INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM';
|
||||
CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM';
|
||||
CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM';
|
||||
CREATE TABLE t9 (a INT) ENGINE='MyISAM';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT,
|
||||
ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT;
|
||||
ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
|
||||
ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0,
|
||||
ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0,
|
||||
ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0;
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 5 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 5 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 5 Foo is a bar
|
||||
1 2 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 10 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 10 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 10 Foo is a bar
|
||||
1 2 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
381
mysql-test/r/rpl_row_tabledefs_3innodb.result
Normal file
381
mysql-test/r/rpl_row_tabledefs_3innodb.result
Normal file
@@ -0,0 +1,381 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t4 (a INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='InnoDB';
|
||||
CREATE TABLE t7 (a INT NOT NULL) ENGINE='InnoDB';
|
||||
CREATE TABLE t8 (a INT NOT NULL) ENGINE='InnoDB';
|
||||
CREATE TABLE t9 (a INT) ENGINE='InnoDB';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT,
|
||||
ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT;
|
||||
ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
|
||||
ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0,
|
||||
ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0,
|
||||
ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0;
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 5 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 5 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 5 Foo is a bar
|
||||
1 2 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
2 10 4711
|
||||
1 2 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
2 10 5 1C 1
|
||||
1 2 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
2 10 Foo is a bar
|
||||
1 2 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1522
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
@@ -4,21 +4,96 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE=myisam;
|
||||
CREATE TABLE t4 (a INT) ENGINE=myisam;
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE=myisam;
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE=myisam;
|
||||
CREATE TABLE t9 (a INT PRIMARY KEY) ENGINE=myisam;
|
||||
ALTER TABLE t1 ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t2 ADD x INT DEFAULT 42 AFTER a;
|
||||
ALTER TABLE t3 ADD x INT DEFAULT 42 FIRST;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
|
||||
START SLAVE;
|
||||
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
|
||||
CREATE TABLE t4 (a INT) ENGINE='NDB';
|
||||
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB';
|
||||
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB';
|
||||
CREATE TABLE t9 (a INT) ENGINE='NDB';
|
||||
ALTER TABLE t1_int ADD x INT DEFAULT 42;
|
||||
ALTER TABLE t1_bit
|
||||
ADD x BIT(3) DEFAULT b'011',
|
||||
ADD y BIT(5) DEFAULT b'10101',
|
||||
ADD z BIT(2) DEFAULT b'10';
|
||||
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
|
||||
ALTER TABLE t1_nodef ADD x INT NOT NULL;
|
||||
ALTER TABLE t2 DROP b;
|
||||
ALTER TABLE t4 MODIFY a FLOAT;
|
||||
ALTER TABLE t5 MODIFY b FLOAT;
|
||||
ALTER TABLE t6 MODIFY c FLOAT;
|
||||
INSERT INTO t9 VALUES (1);
|
||||
INSERT INTO t1 VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2, 4, 4711);
|
||||
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
|
||||
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
|
||||
**** On Master ****
|
||||
INSERT INTO t1_int VALUES (1,2);
|
||||
INSERT INTO t1_int VALUES (2,5);
|
||||
INSERT INTO t1_bit VALUES (1,2);
|
||||
INSERT INTO t1_bit VALUES (2,5);
|
||||
INSERT INTO t1_char VALUES (1,2);
|
||||
INSERT INTO t1_char VALUES (2,5);
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 5
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
1 2 42
|
||||
2 5 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
1 2 3 15 2
|
||||
2 5 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
1 2 Just a test
|
||||
2 5 Just a test
|
||||
**** On Master ****
|
||||
UPDATE t1_int SET b=2*b WHERE a=2;
|
||||
UPDATE t1_char SET b=2*b WHERE a=2;
|
||||
UPDATE t1_bit SET b=2*b WHERE a=2;
|
||||
SELECT * FROM t1_int;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_bit;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
SELECT * FROM t1_char;
|
||||
a b
|
||||
1 2
|
||||
2 10
|
||||
**** On Slave ****
|
||||
SELECT a,b,x FROM t1_int;
|
||||
a b x
|
||||
1 2 42
|
||||
2 10 42
|
||||
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
|
||||
a b HEX(x) HEX(y) HEX(z)
|
||||
1 2 3 15 2
|
||||
2 10 3 15 2
|
||||
SELECT a,b,x FROM t1_char;
|
||||
a b x
|
||||
1 2 Just a test
|
||||
2 10 Just a test
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
@@ -26,7 +101,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1042
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@@ -38,10 +113,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t1 has 3 columns
|
||||
Last_Errno 1364
|
||||
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 968
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@@ -64,7 +139,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1185
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@@ -76,48 +151,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 3 columns
|
||||
Last_Errno 1514
|
||||
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1111
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (3);
|
||||
INSERT INTO t3 VALUES (3,6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1328
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Error Table width mismatch - received 2 columns, test.t3 has 3 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1254
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@@ -140,7 +177,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1466
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@@ -152,10 +189,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1397
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@@ -178,7 +215,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1614
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@@ -190,10 +227,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1535
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@@ -216,7 +253,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1762
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@@ -228,10 +265,10 @@ Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1454
|
||||
Last_Errno 1514
|
||||
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 1683
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@@ -245,4 +282,5 @@ Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t9;
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
|
||||
@@ -5,9 +5,15 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
#
|
||||
# Generate a big enough master's binlog to cause relay log rotations
|
||||
#
|
||||
create table t1 (a int);
|
||||
drop table t1;
|
||||
reset slave;
|
||||
#
|
||||
# Test 1
|
||||
#
|
||||
set global max_binlog_size=8192;
|
||||
set global max_relay_log_size=8192-1;
|
||||
select @@global.max_relay_log_size;
|
||||
@@ -15,47 +21,251 @@ select @@global.max_relay_log_size;
|
||||
4096
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 2
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
20480
|
||||
@@global.max_relay_log_size 20480
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 3: max_relay_log_size = 0
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
select @@global.max_relay_log_size;
|
||||
@@global.max_relay_log_size
|
||||
0
|
||||
@@global.max_relay_log_size 0
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 72956 # # master-bin.000001 Yes Yes # 0 0 72956 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 72956
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 72956
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
|
||||
#
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File
|
||||
Read_Master_Log_Pos 4
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File
|
||||
Slave_IO_Running No
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 0
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 5
|
||||
#
|
||||
reset slave;
|
||||
start slave;
|
||||
flush logs;
|
||||
create table t1 (a int);
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73042 # # master-bin.000001 Yes Yes # 0 0 73042 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 73042
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 73042
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
#
|
||||
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
|
||||
#
|
||||
flush logs;
|
||||
drop table t1;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73118 # # master-bin.000001 Yes Yes # 0 0 73118 # None 0 No #
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 73118
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table #
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 73118
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 102 <Binlog_Ignore_DB>
|
||||
File master-bin.000002
|
||||
Position 102
|
||||
Binlog_Do_DB <Binlog_Ignore_DB>
|
||||
Binlog_Ignore_DB
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
||||
@@ -7,6 +7,8 @@ start slave;
|
||||
drop database if exists mysqltest1;
|
||||
create database mysqltest1;
|
||||
use mysqltest1;
|
||||
set session binlog_format=row;
|
||||
set global binlog_format=row;
|
||||
show global variables like "binlog_format%";
|
||||
Variable_name Value
|
||||
binlog_format ROW
|
||||
@@ -358,6 +360,28 @@ count(*)
|
||||
select count(*) from t16;
|
||||
count(*)
|
||||
3
|
||||
DROP TABLE IF EXISTS t11;
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
CREATE TABLE t11 (song VARCHAR(255));
|
||||
LOCK TABLES t11 WRITE;
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict');
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
INSERT INTO t11 VALUES('Careful With That Axe, Eugene');
|
||||
UNLOCK TABLES;
|
||||
SELECT * FROM t11;
|
||||
song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict
|
||||
song Careful With That Axe, Eugene
|
||||
USE mysqltest1;
|
||||
SELECT * FROM t11;
|
||||
song Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict
|
||||
song Careful With That Axe, Eugene
|
||||
DROP TABLE IF EXISTS t12;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
CREATE TABLE t12 (data LONG);
|
||||
LOCK TABLES t12 WRITE;
|
||||
INSERT INTO t12 VALUES(UUID());
|
||||
UNLOCK TABLES;
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest1
|
||||
@@ -659,4 +683,323 @@ master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest1
|
||||
master-bin.000001 # Query 1 # create database mysqltest1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t1 (a varchar(100))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_8_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_9_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_10_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_11_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_13_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_14_")
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31325F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("for_15_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_16_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values("work_18_")
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_21_"
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # User var 1 # @`string`=_latin1 0x656D657267656E63795F31375F COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select @'string'
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_24_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t2` (
|
||||
`rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t3` (
|
||||
`1` varbinary(36) NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t4` (
|
||||
`a` varchar(100) DEFAULT NULL
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t4)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t5)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
|
||||
begin
|
||||
insert into t1 values("work_25_");
|
||||
insert into t1 values(concat("for_26_",UUID()));
|
||||
insert into t1 select "yesterday_27_";
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2()
|
||||
begin
|
||||
insert into t1 values(concat("emergency_28_",UUID()));
|
||||
insert into t1 values("work_29_");
|
||||
insert into t1 values(concat("for_30_",UUID()));
|
||||
set session binlog_format=row; # accepted for stored procs
|
||||
insert into t1 values("more work_31_");
|
||||
set session binlog_format=mixed;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
|
||||
begin
|
||||
set session binlog_format=row; # rejected for stored funcs
|
||||
insert into t1 values("alarm");
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100))
|
||||
begin
|
||||
insert into t1 values(concat("work_250_",x));
|
||||
insert into t1 select "yesterday_270_";
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello')))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world')))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 select "yesterday_270_"
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function foo3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned
|
||||
begin
|
||||
insert into t1 values("foo3_32_");
|
||||
call foo();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select foo3();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select UUID();
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned
|
||||
begin
|
||||
insert into t2 select x;
|
||||
return 100;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `foo6`(_latin1'foo6_1_')
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid()
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t11 (data varchar(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row
|
||||
begin
|
||||
set NEW.data = concat(NEW.data,UUID());
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t20 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t21 select * from t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t22 select * from t3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1,t2,t3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t3 (b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t1 values(null,x);
|
||||
insert into t2 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=3
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_44_")
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f`(_latin1'try_45_')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; create table t14 (unique (a)) select * from t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; truncate table t2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t1 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
insert into t2 values(null,x);
|
||||
return 1;
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t3)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic
|
||||
begin
|
||||
declare y int;
|
||||
insert into t1 values(null,x);
|
||||
set y = (select count(*) from t2);
|
||||
return y;
|
||||
end
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=4
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f1`(_latin1'try_53_')
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f2`(_latin1'try_54_')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
|
||||
begin
|
||||
insert into t2 values(null,"try_55_");
|
||||
end
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t1)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
|
||||
master-bin.000001 # Write_rows 1 # table_id: #
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; alter table t1 modify a int, drop primary key
|
||||
master-bin.000001 # Intvar 1 # INSERT_ID=5
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(null,"try_57_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE `t16` (
|
||||
`UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t16)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t16 values("try_66_")
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t11
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255))
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t11)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene')
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; DROP TABLE IF EXISTS t12
|
||||
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
|
||||
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
|
||||
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
drop database mysqltest1;
|
||||
|
||||
@@ -80,4 +80,19 @@ c
|
||||
---> Cleaning up...
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
create table t1(a int, b int);
|
||||
insert into t1 values (1, 1), (1, 2), (1, 3);
|
||||
create view v1(a, b) as select a, sum(b) from t1 group by a;
|
||||
explain v1;
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES NULL
|
||||
b decimal(32,0) YES NULL
|
||||
show create table v1;
|
||||
View Create View
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,sum(`t1`.`b`) AS `b` from `t1` group by `t1`.`a`
|
||||
select * from v1;
|
||||
a b
|
||||
1 6
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
End of 5.0 tests
|
||||
|
||||
@@ -2809,7 +2809,7 @@ CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL);
|
||||
INSERT INTO t1 VALUES (10);
|
||||
SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
|
||||
i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01')
|
||||
0 1 1 1
|
||||
1 1 1 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
|
||||
@@ -896,7 +896,7 @@ sp_var
|
||||
@user_var
|
||||
0
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'sp_var' at row 1
|
||||
Warning 1366 Incorrect integer value: 'Hello, world!' for column 'sp_var' at row 1
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
@@ -5359,6 +5359,21 @@ a
|
||||
2
|
||||
DROP TABLE t11, t12|
|
||||
DROP FUNCTION bug19862|
|
||||
drop table if exists t3|
|
||||
drop database if exists mysqltest1|
|
||||
create table t3 (a int)|
|
||||
insert into t3 (a) values (1), (2)|
|
||||
create database mysqltest1|
|
||||
use mysqltest1|
|
||||
drop database mysqltest1|
|
||||
select database()|
|
||||
database()
|
||||
NULL
|
||||
select * from (select 1 as a) as t1 natural join (select * from test.t3) as t2|
|
||||
a
|
||||
1
|
||||
use test|
|
||||
drop table t3|
|
||||
DROP PROCEDURE IF EXISTS bug16899_p1|
|
||||
DROP FUNCTION IF EXISTS bug16899_f1|
|
||||
CREATE DEFINER=1234567890abcdefGHIKL@localhost PROCEDURE bug16899_p1()
|
||||
@@ -5379,5 +5394,81 @@ Procedure sql_mode Create Procedure
|
||||
bug21416 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
|
||||
show create procedure bug21416
|
||||
drop procedure bug21416|
|
||||
DROP PROCEDURE IF EXISTS bug21414|
|
||||
CREATE PROCEDURE bug21414() SELECT 1|
|
||||
FLUSH TABLES WITH READ LOCK|
|
||||
DROP PROCEDURE bug21414|
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
UNLOCK TABLES|
|
||||
The following should succeed.
|
||||
DROP PROCEDURE bug21414|
|
||||
set names utf8|
|
||||
drop database if exists това_е_дълго_име_за_база_данни_нали|
|
||||
create database това_е_дълго_име_за_база_данни_нали|
|
||||
INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')|
|
||||
call това_е_дълго_име_за_база_данни_нали.това_е_процедура_с_доста_дълго_име_нали_и_още_по_дълго()|
|
||||
ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
|
||||
drop database това_е_дълго_име_за_база_данни_нали|
|
||||
CREATE TABLE t3 (
|
||||
Member_ID varchar(15) NOT NULL,
|
||||
PRIMARY KEY (Member_ID)
|
||||
)|
|
||||
CREATE TABLE t4 (
|
||||
ID int(10) unsigned NOT NULL auto_increment,
|
||||
Member_ID varchar(15) NOT NULL default '',
|
||||
Action varchar(12) NOT NULL,
|
||||
Action_Date datetime NOT NULL,
|
||||
Track varchar(15) default NULL,
|
||||
User varchar(12) default NULL,
|
||||
Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
|
||||
CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (ID),
|
||||
KEY Action (Action),
|
||||
KEY Action_Date (Action_Date)
|
||||
)|
|
||||
INSERT INTO t3(Member_ID) VALUES
|
||||
('111111'), ('222222'), ('333333'), ('444444'), ('555555'), ('666666')|
|
||||
INSERT INTO t4(Member_ID, Action, Action_Date, Track) VALUES
|
||||
('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('111111', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
|
||||
('222222', 'Enrolled', '2006-03-07', 'CAD' ),
|
||||
('222222', 'Enrolled', '2006-03-07', 'CHF' ),
|
||||
('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
|
||||
('333333', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('444444', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||
('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||
('555555', 'Enrolled', '2006-07-21', 'CAD' ),
|
||||
('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
|
||||
('666666', 'Enrolled', '2006-02-09', 'CAD' ),
|
||||
('666666', 'Enrolled', '2006-05-12', 'CHF' ),
|
||||
('666666', 'Disenrolled', '2006-06-01', 'CAD' )|
|
||||
DROP FUNCTION IF EXISTS bug21493|
|
||||
CREATE FUNCTION bug21493(paramMember VARCHAR(15)) RETURNS varchar(45)
|
||||
BEGIN
|
||||
DECLARE tracks VARCHAR(45);
|
||||
SELECT GROUP_CONCAT(Track SEPARATOR ', ') INTO tracks FROM t4
|
||||
WHERE Member_ID=paramMember AND Action='Enrolled' AND
|
||||
(Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t4
|
||||
WHERE Member_ID=paramMember GROUP BY Track);
|
||||
RETURN tracks;
|
||||
END|
|
||||
SELECT bug21493('111111')|
|
||||
bug21493('111111')
|
||||
NULL
|
||||
SELECT bug21493('222222')|
|
||||
bug21493('222222')
|
||||
CAD
|
||||
SELECT bug21493(Member_ID) FROM t3|
|
||||
bug21493(Member_ID)
|
||||
NULL
|
||||
CAD
|
||||
CAD
|
||||
CAD
|
||||
CAD
|
||||
CHF
|
||||
DROP FUNCTION bug21493|
|
||||
DROP TABLE t3,t4|
|
||||
End of 5.0 tests
|
||||
drop table t1,t2;
|
||||
|
||||
@@ -3,6 +3,10 @@ show status like 'Table_lock%';
|
||||
Variable_name Value
|
||||
Table_locks_immediate 0
|
||||
Table_locks_waited 0
|
||||
select * from information_schema.session_status where variable_name like 'Table_lock%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_LOCKS_IMMEDIATE 0.0000000
|
||||
TABLE_LOCKS_WAITED 0.0000000
|
||||
SET SQL_LOG_BIN=0;
|
||||
drop table if exists t1;
|
||||
create table t1(n int) engine=myisam;
|
||||
@@ -16,6 +20,10 @@ show status like 'Table_lock%';
|
||||
Variable_name Value
|
||||
Table_locks_immediate 3
|
||||
Table_locks_waited 1
|
||||
select * from information_schema.session_status where variable_name like 'Table_lock%';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
TABLE_LOCKS_IMMEDIATE 3.0000000
|
||||
TABLE_LOCKS_WAITED 1.0000000
|
||||
drop table t1;
|
||||
select 1;
|
||||
1
|
||||
@@ -53,21 +61,36 @@ FLUSH STATUS;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 1
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 1.0000000
|
||||
SET @save_thread_cache_size=@@thread_cache_size;
|
||||
SET GLOBAL thread_cache_size=3;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 3
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 3.0000000
|
||||
FLUSH STATUS;
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 2
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 2.0000000
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 3
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 3.0000000
|
||||
SHOW STATUS LIKE 'max_used_connections';
|
||||
Variable_name Value
|
||||
Max_used_connections 4
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_USED_CONNECTIONS 4.0000000
|
||||
SET GLOBAL thread_cache_size=@save_thread_cache_size;
|
||||
show status like 'com_show_status';
|
||||
Variable_name Value
|
||||
|
||||
@@ -619,9 +619,9 @@ ERROR 22012: Division by 0
|
||||
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
|
||||
ERROR 22012: Division by 0
|
||||
INSERT INTO t1 (col1) VALUES ('');
|
||||
ERROR 22003: Out of range value for column 'col1' at row 1
|
||||
ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES ('a59b');
|
||||
ERROR 22003: Out of range value for column 'col1' at row 1
|
||||
ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES ('1a');
|
||||
ERROR 01000: Data truncated for column 'col1' at row 1
|
||||
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
|
||||
@@ -701,9 +701,9 @@ ERROR 22012: Division by 0
|
||||
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
|
||||
ERROR 22012: Division by 0
|
||||
INSERT INTO t1 (col1) VALUES ('');
|
||||
ERROR 22003: Out of range value for column 'col1' at row 1
|
||||
ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES ('a59b');
|
||||
ERROR 22003: Out of range value for column 'col1' at row 1
|
||||
ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES ('1a');
|
||||
ERROR 01000: Data truncated for column 'col1' at row 1
|
||||
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
|
||||
@@ -925,10 +925,10 @@ Warning 1264 Out of range value for column 'col2' at row 1
|
||||
Warning 1264 Out of range value for column 'col2' at row 1
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
0 0
|
||||
-2.2e-307 0
|
||||
1e-303 0
|
||||
1.7e+308 1.7e+308
|
||||
0 0
|
||||
-2.2e-307 0
|
||||
-2e-307 0
|
||||
1.7e+308 1.7e+308
|
||||
0 NULL
|
||||
|
||||
27
mysql-test/r/strict_autoinc_1myisam.result
Normal file
27
mysql-test/r/strict_autoinc_1myisam.result
Normal file
@@ -0,0 +1,27 @@
|
||||
set @org_mode=@@sql_mode;
|
||||
create table t1
|
||||
(
|
||||
`a` tinyint(4) NOT NULL auto_increment,
|
||||
primary key (`a`)
|
||||
) engine = 'MYISAM' ;
|
||||
set @@sql_mode='strict_all_tables';
|
||||
insert into t1 values(1000);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set auto_increment_increment=1000;
|
||||
set auto_increment_offset=700;
|
||||
insert into t1 values(null);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set @@sql_mode=@org_mode;
|
||||
insert into t1 values(null);
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
select * from t1;
|
||||
a
|
||||
127
|
||||
drop table t1;
|
||||
27
mysql-test/r/strict_autoinc_2innodb.result
Normal file
27
mysql-test/r/strict_autoinc_2innodb.result
Normal file
@@ -0,0 +1,27 @@
|
||||
set @org_mode=@@sql_mode;
|
||||
create table t1
|
||||
(
|
||||
`a` tinyint(4) NOT NULL auto_increment,
|
||||
primary key (`a`)
|
||||
) engine = 'InnoDB' ;
|
||||
set @@sql_mode='strict_all_tables';
|
||||
insert into t1 values(1000);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set auto_increment_increment=1000;
|
||||
set auto_increment_offset=700;
|
||||
insert into t1 values(null);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set @@sql_mode=@org_mode;
|
||||
insert into t1 values(null);
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
select * from t1;
|
||||
a
|
||||
127
|
||||
drop table t1;
|
||||
27
mysql-test/r/strict_autoinc_3heap.result
Normal file
27
mysql-test/r/strict_autoinc_3heap.result
Normal file
@@ -0,0 +1,27 @@
|
||||
set @org_mode=@@sql_mode;
|
||||
create table t1
|
||||
(
|
||||
`a` tinyint(4) NOT NULL auto_increment,
|
||||
primary key (`a`)
|
||||
) engine = 'MEMORY' ;
|
||||
set @@sql_mode='strict_all_tables';
|
||||
insert into t1 values(1000);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set auto_increment_increment=1000;
|
||||
set auto_increment_offset=700;
|
||||
insert into t1 values(null);
|
||||
ERROR 22003: Out of range value for column 'a' at row 1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
0
|
||||
set @@sql_mode=@org_mode;
|
||||
insert into t1 values(null);
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
select * from t1;
|
||||
a
|
||||
127
|
||||
drop table t1;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user