summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorMats Kindahl <mats@sun.com>2008-10-23 21:27:09 +0200
committerMats Kindahl <mats@sun.com>2008-10-23 21:27:09 +0200
commit32c161f3ea7314051090fb02eca03ef347394010 (patch)
tree09212d65be943c6c5dfd6d6a834841683d81f9f8 /mysql-test/t
parent3be6d967c5d04fa6dbeab1c25f28673d3abf8433 (diff)
parente291aab7da9587f742291e7cc5e10e568846066e (diff)
downloadmariadb-git-32c161f3ea7314051090fb02eca03ef347394010.tar.gz
Merging 5.1 main into 5.1-rpl
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/auto_increment.test10
-rw-r--r--mysql-test/t/compare.test9
-rw-r--r--mysql-test/t/create.test5
-rw-r--r--mysql-test/t/ctype_ucs.test11
-rw-r--r--mysql-test/t/disabled.def3
-rw-r--r--mysql-test/t/distinct.test128
-rw-r--r--mysql-test/t/events_2.test102
-rw-r--r--mysql-test/t/func_group.test40
-rw-r--r--mysql-test/t/information_schema_db.test30
-rw-r--r--mysql-test/t/innodb-semi-consistent.test2
-rw-r--r--mysql-test/t/innodb.test17
-rw-r--r--mysql-test/t/join.test10
-rw-r--r--mysql-test/t/loaddata.test188
-rw-r--r--mysql-test/t/lock_multi.test321
-rw-r--r--mysql-test/t/log_basic.test4
-rw-r--r--mysql-test/t/log_state.test26
-rw-r--r--mysql-test/t/log_tables.test46
-rw-r--r--mysql-test/t/mysqldump-max.test1058
-rw-r--r--mysql-test/t/mysqldump.test13
-rw-r--r--mysql-test/t/outfile.test12
-rw-r--r--mysql-test/t/partition.test76
-rw-r--r--mysql-test/t/partition_range.test40
-rw-r--r--mysql-test/t/slow_launch_time_func.test129
-rw-r--r--mysql-test/t/sp-error.test8
-rw-r--r--mysql-test/t/sp.test18
-rw-r--r--mysql-test/t/status.test41
-rw-r--r--mysql-test/t/symlink.test13
-rw-r--r--mysql-test/t/trigger-trans.test15
-rw-r--r--mysql-test/t/tx_isolation_func.test2
-rw-r--r--mysql-test/t/user_var.test22
30 files changed, 2206 insertions, 193 deletions
diff --git a/mysql-test/t/auto_increment.test b/mysql-test/t/auto_increment.test
index ff92c743960..47458c1f054 100644
--- a/mysql-test/t/auto_increment.test
+++ b/mysql-test/t/auto_increment.test
@@ -314,5 +314,15 @@ insert into t1 values(null,0,0,null);
# this will delete two rows
replace into t1 values(null,1,0,null);
select last_insert_id();
+drop table t1;
+# Test of REPLACE when it does a INSERT+DELETE for all the conflicting rows
+# (i.e.) when there are three rows conflicting in unique key columns with
+# a row that is being inserted, all the three rows will be deleted and then
+# the new rows will be inserted.
+create table t1 (a int primary key auto_increment, b int, c int, e int, d timestamp default current_timestamp, unique(b),unique(c),unique(e));
+insert into t1 values(null,1,1,1,now());
+insert into t1 values(null,0,0,0,null);
+replace into t1 values(null,1,0,2,null);
+select last_insert_id();
drop table t1;
diff --git a/mysql-test/t/compare.test b/mysql-test/t/compare.test
index 8863ed825c2..103244eb2f7 100644
--- a/mysql-test/t/compare.test
+++ b/mysql-test/t/compare.test
@@ -76,4 +76,13 @@ FROM t2 ORDER BY a;
DROP TABLE t1,t2;
+#
+# Bug #39353: Multiple conditions on timestamp column crashes server
+#
+
+CREATE TABLE t1 (a TIMESTAMP);
+INSERT INTO t1 VALUES (NOW()),(NOW()),(NOW());
+SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00';
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 33a75147093..6dbed2e0b60 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -1175,6 +1175,11 @@ CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
SHOW INDEX FROM t1;
DROP TABLE t1;
+#
+# Bug#35924 DEFINER should be stored 'quoted' in I_S
+#
+--error ER_UNKNOWN_ERROR
+create user mysqltest_1@'test@test';
#
# Bug#38821: Assert table->auto_increment_field_not_null failed in open_table()
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index db609777c8d..cb371bc0ca6 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -678,6 +678,17 @@ select * from t1 where a=if(b<10,_ucs2 0x00C0,_ucs2 0x0062);
select * from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0);
drop table t1;
+#
+# Bug#35720 ucs2 + pad_char_to_full_length = failure
+#
+CREATE TABLE t1 (s1 CHAR(5) CHARACTER SET UCS2);
+INSERT INTO t1 VALUES ('a');
+SET @@sql_mode=pad_char_to_full_length;
+SELECT HEX(s1) FROM t1;
+SET @@sql_mode=default;
+SELECT HEX(s1) FROM t1;
+DROP TABLE t1;
+
set collation_connection=ucs2_general_ci;
--source include/ctype_regex.inc
set names latin1;
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 0e72351fcd6..67e768cb6b2 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -24,4 +24,5 @@ slow_query_log_func : BUG#37962 2008-07-08 sven *_func tests c
sql_low_priority_updates_func : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
timestamp_func : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
log_output_func : BUG#37766 2008-07-10 sven main.log_output_func randomly fails in pushbuild
-
+slow_query_log_func.test : Bug #37962: *_func tests containing sleeps/race conditions
+events-bugs.test : Bug #39848, Bug #39863, Bug #39569, Bug #37774
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 21c872ed8ea..59bc13b3b80 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -438,72 +438,70 @@ EXPLAIN SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a;
SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a;
DROP TABLE t1;
-# The test case for bug#20836 should be re-enabled when bug#16861 is resolved
-# The results for the test should be the same as in 4.1.
-#
+
#Bug #20836: Selecting into variables results in wrong results being returned
-#
-#--disable_warnings
-#DROP TABLE IF EXISTS t1;
-#--enable_warnings
-#
-#CREATE TABLE t1 (id INT NOT NULL, fruit_id INT NOT NULL, fruit_name varchar(20)
-#default NULL);
-#
-#INSERT INTO t1 VALUES (1,1,'ORANGE');
-#INSERT INTO t1 VALUES (2,2,'APPLE');
-#INSERT INTO t1 VALUES (3,2,'APPLE');
-#INSERT INTO t1 VALUES (4,3,'PEAR');
-#
-#SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name =
-#'APPLE';
-#SELECT @v1, @v2;
-#
-#SELECT DISTINCT fruit_id, fruit_name INTO @v3, @v4 FROM t1 GROUP BY fruit_id,
-#fruit_name HAVING fruit_name = 'APPLE';
-#SELECT @v3, @v4;
-#
-#SELECT DISTINCT @v5:= fruit_id, @v6:= fruit_name INTO @v7, @v8 FROM t1 WHERE
-#fruit_name = 'APPLE';
-#SELECT @v5, @v6, @v7, @v8;
-#
-#SELECT DISTINCT @v5 + fruit_id, CONCAT(@v6, fruit_name) INTO @v9, @v10 FROM t1
-#WHERE fruit_name = 'APPLE';
-#SELECT @v5, @v6, @v7, @v8, @v9, @v10;
-#
-#SELECT DISTINCT @v11:= @v5 + fruit_id, @v12:= CONCAT(@v6, fruit_name) INTO
-#@v13, @v14 FROM t1 WHERE fruit_name = 'APPLE';
-#SELECT @v11, @v12, @v13, @v14;
-#
-#SELECT DISTINCT @v13, @v14 INTO @v15, @v16 FROM t1 WHERE fruit_name = 'APPLE';
-#SELECT @v15, @v16;
-#
-#SELECT DISTINCT 2 + 2, 'Bob' INTO @v17, @v18 FROM t1 WHERE fruit_name =
-#'APPLE';
-#SELECT @v17, @v18;
-#
-#--disable_warnings
-#DROP TABLE IF EXISTS t2;
-#--enable_warnings
-#
-#CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20)
-#default NULL);
-#
-#SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE
-#'../../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
-#LOAD DATA INFILE '../../tmp/data1.tmp' INTO TABLE t2;
-#--exec rm $MYSQL_TEST_DIR/var/tmp/data1.tmp
-#
-#SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
-#'../../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
-#LOAD DATA INFILE '../../tmp/data2.tmp' INTO TABLE t2;
-#--exec rm $MYSQL_TEST_DIR/var/tmp/data2.tmp
-#
-#SELECT @v19, @v20;
-#SELECT * FROM t2;
-#
-#DROP TABLE t1;
-#DROP TABLE t2;
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (id INT NOT NULL, fruit_id INT NOT NULL, fruit_name varchar(20)
+default NULL);
+
+INSERT INTO t1 VALUES (1,1,'ORANGE');
+INSERT INTO t1 VALUES (2,2,'APPLE');
+INSERT INTO t1 VALUES (3,2,'APPLE');
+INSERT INTO t1 VALUES (4,3,'PEAR');
+
+SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name =
+'APPLE';
+SELECT @v1, @v2;
+
+SELECT DISTINCT fruit_id, fruit_name INTO @v3, @v4 FROM t1 GROUP BY fruit_id,
+fruit_name HAVING fruit_name = 'APPLE';
+SELECT @v3, @v4;
+
+SELECT DISTINCT @v5:= fruit_id, @v6:= fruit_name INTO @v7, @v8 FROM t1 WHERE
+fruit_name = 'APPLE';
+SELECT @v5, @v6, @v7, @v8;
+
+SELECT DISTINCT @v5 + fruit_id, CONCAT(@v6, fruit_name) INTO @v9, @v10 FROM t1
+WHERE fruit_name = 'APPLE';
+SELECT @v5, @v6, @v7, @v8, @v9, @v10;
+
+SELECT DISTINCT @v11:= @v5 + fruit_id, @v12:= CONCAT(@v6, fruit_name) INTO
+@v13, @v14 FROM t1 WHERE fruit_name = 'APPLE';
+SELECT @v11, @v12, @v13, @v14;
+
+SELECT DISTINCT @v13, @v14 INTO @v15, @v16 FROM t1 WHERE fruit_name = 'APPLE';
+SELECT @v15, @v16;
+
+SELECT DISTINCT 2 + 2, 'Bob' INTO @v17, @v18 FROM t1 WHERE fruit_name =
+'APPLE';
+SELECT @v17, @v18;
+
+--disable_warnings
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20)
+default NULL);
+
+SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE
+'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
+LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2;
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp
+
+SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
+'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
+LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2;
+--remove_file $MYSQLTEST_VARDIR/tmp/data2.tmp
+
+SELECT @v19, @v20;
+SELECT * FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
#
# Bug #15881: cast problems
diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test
index 58a6fffe6f5..a50255e9f8b 100644
--- a/mysql-test/t/events_2.test
+++ b/mysql-test/t/events_2.test
@@ -411,6 +411,108 @@ create event
очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66
on schedule every 2 year do select 1;
+#
+# Bug#35981: ALTER EVENT causes the server to change the PRESERVE option.
+#
+
+create event event_35981 on schedule every 6 month on completion preserve
+disable
+do
+ select 1;
+
+echo The following SELECTs should all give 1;
+
+# show current ON_COMPLETION
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'PRESERVE';
+
+# show ON_COMPLETION remains "PRESERVE" when not given in ALTER EVENT
+alter event event_35981 enable;
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'PRESERVE';
+
+# show we can change ON_COMPLETION
+alter event event_35981 on completion not preserve;
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'NOT PRESERVE';
+
+# show ON_COMPLETION remains "NOT PRESERVE" when not given in ALTER EVENT
+alter event event_35981 disable;
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'NOT PRESERVE';
+
+# show we can change ON_COMPLETION
+alter event event_35981 on completion preserve;
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'PRESERVE';
+
+
+drop event event_35981;
+
+create event event_35981 on schedule every 6 month disable
+do
+ select 1;
+
+# show that the defaults for CREATE EVENT are still correct (NOT PRESERVE)
+select count(*) from information_schema.events
+where event_schema = database() and event_name = 'event_35981' and
+ on_completion = 'NOT PRESERVE';
+
+drop event event_35981;
+
+
+# show that backdating doesn't break
+
+create event event_35981 on schedule every 1 hour starts current_timestamp
+ on completion not preserve
+do
+ select 1;
+
+# should fail thanks to above's NOT PRESERVE
+--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST
+alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
+ ends '1999-01-02 00:00:00';
+
+drop event event_35981;
+
+create event event_35981 on schedule every 1 hour starts current_timestamp
+ on completion not preserve
+do
+ select 1;
+
+# succeed with warning
+alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
+ ends '1999-01-02 00:00:00' on completion preserve;
+
+drop event event_35981;
+
+
+
+create event event_35981 on schedule every 1 hour starts current_timestamp
+ on completion preserve
+do
+ select 1;
+
+# this should succeed thanks to above PRESERVE! give a warning though.
+alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
+ ends '1999-01-02 00:00:00';
+
+# this should fail, as the event would have passed already
+--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST
+alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
+ ends '1999-01-02 00:00:00' on completion not preserve;
+
+# should succeed giving a warning
+alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
+ ends '1999-01-02 00:00:00' on completion preserve;
+
+drop event event_35981;
+
#
# End of tests
#
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index b6143bc0c78..4eedd433d34 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -933,5 +933,45 @@ SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1;
DROP TABLE t1;
+#
+# Bug #37348: Crash in or immediately after JOIN::make_sum_func_list
+#
+
+CREATE TABLE derived1 (a bigint(21));
+INSERT INTO derived1 VALUES (2);
+
+
+CREATE TABLE D (
+ pk int(11) NOT NULL AUTO_INCREMENT,
+ int_nokey int(11) DEFAULT NULL,
+ int_key int(11) DEFAULT NULL,
+ filler blob,
+ PRIMARY KEY (pk),
+ KEY int_key (int_key)
+);
+
+INSERT INTO D VALUES
+ (39,40,4,repeat(' X', 42)),
+ (43,56,4,repeat(' X', 42)),
+ (47,12,4,repeat(' X', 42)),
+ (71,28,4,repeat(' X', 42)),
+ (76,54,4,repeat(' X', 42)),
+ (83,45,4,repeat(' X', 42)),
+ (105,53,12,NULL);
+
+SELECT
+ (SELECT COUNT( int_nokey )
+ FROM derived1 AS X
+ WHERE
+ X.int_nokey < 61
+ GROUP BY pk
+ LIMIT 1)
+FROM D AS X
+WHERE X.int_key < 13
+GROUP BY int_nokey LIMIT 1;
+
+DROP TABLE derived1;
+DROP TABLE D;
+
###
--echo End of 5.0 tests
diff --git a/mysql-test/t/information_schema_db.test b/mysql-test/t/information_schema_db.test
index 666f331c7b9..6353e94fd51 100644
--- a/mysql-test/t/information_schema_db.test
+++ b/mysql-test/t/information_schema_db.test
@@ -82,6 +82,7 @@ drop function func2;
drop database `inf%`;
drop procedure mbase.p1;
drop database mbase;
+disconnect user1;
#
# Bug#18282 INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views
@@ -210,3 +211,32 @@ drop view testdb_1.v1, v2, testdb_1.v3, v4;
drop database testdb_1;
drop user testdb_1@localhost;
drop user testdb_2@localhost;
+
+#
+# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
+#
+create database testdb_1;
+create table testdb_1.t1 (a int);
+create view testdb_1.v1 as select * from testdb_1.t1;
+
+grant show view on testdb_1.* to mysqltest_1@localhost;
+grant select on testdb_1.v1 to mysqltest_1@localhost;
+
+connect (user1,localhost,mysqltest_1,,test);
+connection user1;
+select table_schema, table_name, view_definition from information_schema.views
+where table_name='v1';
+show create view testdb_1.v1;
+
+connection default;
+revoke select on testdb_1.v1 from mysqltest_1@localhost;
+connection user1;
+select table_schema, table_name, view_definition from information_schema.views
+where table_name='v1';
+--error ER_TABLEACCESS_DENIED_ERROR
+show create view testdb_1.v1;
+
+connection default;
+drop user mysqltest_1@localhost;
+drop database testdb_1;
+disconnect user1;
diff --git a/mysql-test/t/innodb-semi-consistent.test b/mysql-test/t/innodb-semi-consistent.test
index c33126b93ff..a3496625e95 100644
--- a/mysql-test/t/innodb-semi-consistent.test
+++ b/mysql-test/t/innodb-semi-consistent.test
@@ -10,6 +10,7 @@ drop table if exists t1;
connect (a,localhost,root,,);
connect (b,localhost,root,,);
connection a;
+set binlog_format=mixed;
set session transaction isolation level read committed;
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
@@ -17,6 +18,7 @@ set autocommit=0;
# this should lock the entire table
select * from t1 where a=3 lock in share mode;
connection b;
+set binlog_format=mixed;
set session transaction isolation level read committed;
set autocommit=0;
-- error ER_LOCK_WAIT_TIMEOUT
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index e78daa5511f..3c2aae3cfb0 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -701,6 +701,7 @@ insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
select id, code, name from t1 order by id;
COMMIT;
+SET binlog_format='MIXED';
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
@@ -2000,10 +2001,12 @@ connection a;
create table t1(a int not null, b int, primary key(a)) engine=innodb;
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
commit;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
update t1 set b = 5 where b = 1;
connection b;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
#
@@ -2071,6 +2074,7 @@ commit;
set autocommit = 0;
select * from t2 for update;
connection b;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
insert into t1 select * from t2;
@@ -2127,46 +2131,55 @@ commit;
set autocommit = 0;
select * from t2 for update;
connection b;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
--send
insert into t1 select * from t2;
connection c;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
--send
update t3 set b = (select b from t2 where a = d);
connection d;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
--send
create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
connection e;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
insert into t5 (select * from t2 lock in share mode);
connection f;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
update t6 set e = (select b from t2 where a = d lock in share mode);
connection g;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
connection h;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
insert into t8 (select * from t2 for update);
connection i;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
update t9 set e = (select b from t2 where a = d for update);
connection j;
+SET binlog_format='MIXED';
set autocommit = 0;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
--send
@@ -2380,6 +2393,7 @@ DROP TABLE t1;
CONNECT (c1,localhost,root,,);
CONNECT (c2,localhost,root,,);
CONNECTION c1;
+SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
@@ -2387,6 +2401,7 @@ CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
CREATE TABLE t2 LIKE t1;
SELECT * FROM t2;
CONNECTION c2;
+SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (1);
@@ -2398,10 +2413,12 @@ DISCONNECT c2;
CONNECT (c1,localhost,root,,);
CONNECT (c2,localhost,root,,);
CONNECTION c1;
+SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
SELECT * FROM t2;
CONNECTION c2;
+SET binlog_format='MIXED';
SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
INSERT INTO t1 VALUES (2);
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 09082cbd7a7..b5e30e63f54 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -546,10 +546,12 @@ select * from v1a join v1b on t1.b = t2.b;
#
# Bug #17523 natural join and information_schema
#
-# We mask out the Privileges column because it differs with embedded server
---replace_column 31 # 10 #
-select * from information_schema.statistics join information_schema.columns
- using(table_name,column_name) where table_name='user';
+# Omit columns.PRIVILIGES as it may vary with embedded server.
+# Omit columns.ORDINAL_POSITION and statistics.CARDINALITY as it may vary with hostname='localhost'.
+select
+ statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
+ columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
+ from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
drop table t1;
drop table t2;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index bc35b652f57..7bfe2491c7c 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -320,9 +320,191 @@ DROP VIEW v3;
--echo
--echo # -- End of Bug#35469.
+
+
###########################################################################
-# End of 5.0 tests
+#
+# Bug#37114: sql_mode NO_BACKSLASH_ESCAPES does not work properly with
+# LOAD DATA INFILE
+#
+
+# - For each plain "SELECT id,...", the 1st pair ("before" SELECT...OUTFILE,
+# LOAD...INFILE) and the 2nd pair of lines ("after") in the result should
+# look the same, otherwise we broke the dumpe/restore cycle!
+#
+# - the \r is always { '\\', 'r' } in memory, but on-disk format changes
+#
+# - the \t is { '\t' } or { '\\', 't' } in memory depending on whether \
+# is magic (that is, NO_BACKSLASH_ESCAPES is not set) at INSERT-time.
+# on-disk format varies.
+#
+# - while INFILE/OUTFILE behaviour changes according to NO_BACKSLASH_ESCAPES,
+# we can override these defaults using ESCAPED BY '...'
+# 1: NO_BACKSLASH_ESCAPES default, \ on-disk: \,t,x,\r
+# 2: NO_BACKSLASH_ESCAPES override, \\ on-disk: \,\,t,x,\,\,r
+# 3: !NO_BACKSLASH_ESCAPES default, \\ on-disk: tab,\,\,r
+# 3: !NO_BACKSLASH_ESCAPES override, \ on-disk: tab,\,r
+
+--echo Bug#37114
+
+SET SESSION character_set_client=latin1;
+SET SESSION character_set_server=latin1;
+SET SESSION character_set_connection=latin1;
+SET @OLD_SQL_MODE=@@SESSION.SQL_MODE;
+
+# 0. test LOAD DATA INFILE first; if that works, all issues in
+# SELECT INTO OUTFILE / LOAD DATA INFILE cycles below are
+# arguably in the saving.
+
+--echo test LOAD DATA INFILE
+
+--let $file=$MYSQLTEST_VARDIR/tmp/bug37114.txt
+--let $file2=$MYSQLTEST_VARDIR/tmp/bug37114_out.txt
+
+SET sql_mode = '';
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT '1 \\\\aa\n' INTO DUMPFILE '$file'
+
+CREATE TABLE t1 (id INT, val1 CHAR(3)) ENGINE=MyISAM;
+
+SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' REPLACE INTO TABLE t1 FIELDS TERMINATED BY ' '
+SELECT * FROM t1;
+
+# show we can write this with OUTFILE, forcing the parameters for now
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file2' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1
+--diff_files $file $file2
+--remove_file $file2
+
+# now show the OUTFILE defaults are correct with NO_BACKSLASH_ESCAPES
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file2' FIELDS TERMINATED BY ' ' FROM t1
+--diff_files $file $file2
+--remove_file $file2
+
+INSERT INTO t1 (id, val1) VALUES (1, '\aa');
+SELECT * FROM t1;
+
+SET sql_mode='';
+INSERT INTO t1 (id, val1) VALUES (1, '\aa');
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--remove_file $file
+
+
+
+--echo test SELECT INTO OUTFILE
+
+CREATE TABLE t1 (id INT PRIMARY KEY, val1 CHAR(4));
+CREATE TABLE t2 LIKE t1;
+
+# 1. with NO_BACKSLASH_ESCAPES on
+
+SET sql_mode = '';
+INSERT INTO t1 (id, val1) VALUES (5, '\ttab');
+INSERT INTO t1 (id, val1) VALUES (4, '\\r');
+SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+INSERT INTO t1 (id, val1) VALUES (3, '\tx');
+
+--echo 1.1 NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
+
+SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
+ SELECT 'after' AS t, id, val1, hex(val1) FROM t2 ORDER BY id,t DESC;
+
+TRUNCATE t2;
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval SELECT LOAD_FILE("$file");
+--remove_file $file
+
+
+
+--echo 1.2 NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '\' TERMINATED BY ' ' FROM t1 ORDER BY id
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '\' TERMINATED BY ' '
+
+SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
+ SELECT 'after' AS t, id, val1, hex(val1) FROM t2 ORDER BY id,t DESC;
+
+TRUNCATE t2;
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval SELECT LOAD_FILE("$file");
+--remove_file $file
+
+
+
+# 2. with NO_BACKSLASH_ESCAPES off
+
+SET sql_mode = '';
+
+--echo 2.1 !NO_BACKSLASH_ESCAPES, use defaults for ESCAPED BY
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file' FIELDS TERMINATED BY ' ' FROM t1 ORDER BY id
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS TERMINATED BY ' '
+
+SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
+ SELECT 'after' AS t, id, val1, hex(val1) FROM t2 ORDER BY id,t DESC;
+
+TRUNCATE t2;
+
+SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval SELECT LOAD_FILE("$file");
+--remove_file $file
+
+SET sql_mode = '';
+
+
+
+--echo 2.2 !NO_BACKSLASH_ESCAPES, override defaults for ESCAPED BY
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE '$file' FIELDS ESCAPED BY '' TERMINATED BY ' ' FROM t1 ORDER BY id
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 FIELDS ESCAPED BY '' TERMINATED BY ' '
+
+SELECT 'before' AS t, id, val1, hex(val1) FROM t1 UNION
+ SELECT 'after' AS t, id, val1, hex(val1) FROM t2 ORDER BY id,t DESC;
+
+TRUNCATE t2;
+
+SET sql_mode = 'NO_BACKSLASH_ESCAPES';
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval SELECT LOAD_FILE("$file");
+--remove_file $file
+
+# clean up
+set session sql_mode=@OLD_SQL_MODE;
+DROP TABLE t1,t2;
+
+
+
+--echo End of 5.0 tests
+
#
@@ -348,3 +530,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/test/t@002d1;
SET character_set_filesystem=default;
select @@character_set_filesystem;
+
+
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index 54c2e4e76ee..08747b0f92e 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -291,7 +291,328 @@ connection reader;
reap;
connection locker;
drop table t1;
+
+#
+# Bug #38691: segfault/abort in ``UPDATE ...JOIN'' while
+# ``FLUSH TABLES WITH READ LOCK''
+#
+
+--connection default
+CREATE TABLE t1 (
+ a int(11) unsigned default NULL,
+ b varchar(255) default NULL,
+ UNIQUE KEY a (a),
+ KEY b (b)
+);
+
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3);
+CREATE TABLE t2 SELECT * FROM t1;
+CREATE TABLE t3 SELECT * FROM t1;
+
+--echo # test altering of columns that multiupdate doesn't use
+
+--echo # normal mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+ send UPDATE t2 INNER JOIN (t1 JOIN t3 USING(a)) USING(a)
+ SET a = NULL WHERE t1.b <> t2.b;
+
+--connection locker
+ ALTER TABLE t2 ADD COLUMN (c INT);
+ ALTER TABLE t2 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+
+--echo # PS mode
+
+--connection writer
+PREPARE stmt FROM 'UPDATE t2 INNER JOIN (t1 JOIN t3 USING(a)) USING(a)
+ SET a = NULL WHERE t1.b <> t2.b';
+
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+--send EXECUTE stmt
+
+--connection locker
+ ALTER TABLE t2 ADD COLUMN (c INT);
+ ALTER TABLE t2 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+--enable_query_log
+
+
+--echo # test altering of columns that multiupdate uses
+
+--echo # normal mode
+
+--connection default
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t2 ADD COLUMN a int(11) unsigned default NULL;
+ UPDATE t2 SET a=b;
+
+--connection writer
+--send UPDATE t2 INNER JOIN (t1 JOIN t3 USING(a)) USING(a) SET a = NULL WHERE t1.b <> t2.b
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t2 DROP COLUMN a;
+
+--connection writer
+--error 0,1054
+--reap
+}
+--enable_query_log
+
+--echo # PS mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t2 ADD COLUMN a int(11) unsigned default NULL;
+ UPDATE t2 SET a=b;
+
+--connection writer
+ PREPARE stmt FROM 'UPDATE t2 INNER JOIN (t1 JOIN t3 USING(a)) USING(a) SET a = NULL WHERE t1.b <> t2.b';
+--send EXECUTE stmt
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t2 DROP COLUMN a;
+
+--connection writer
+--error 0,1054
+--reap
+
+}
+--enable_query_log
+--connection default
+DROP TABLE t1, t2, t3;
+
#
+# Bug#38499: flush tables and multitable table update with derived table cause
+# crash
+#
+
+CREATE TABLE t1( a INT, b INT );
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4);
+
+--echo # 1. test regular tables
+--echo # 1.1. test altering of columns that multiupdate doesn't use
+--echo # 1.1.1. normal mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+ send UPDATE t1, (SELECT 1 FROM t1 t1i) d SET a = 0 WHERE 1=0;
+
+--connection locker
+ ALTER TABLE t1 ADD COLUMN (c INT);
+ ALTER TABLE t1 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+
+--echo # 1.1.2. PS mode
+
+--connection writer
+PREPARE stmt FROM 'UPDATE t1, (SELECT 1 FROM t1 t1i) d SET a = 0 WHERE 1=0';
+
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+--send EXECUTE stmt
+
+--connection locker
+ ALTER TABLE t1 ADD COLUMN (c INT);
+ ALTER TABLE t1 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+--enable_query_log
+
+--echo # 1.2. test altering of columns that multiupdate uses
+--echo # 1.2.1. normal mode
+
+--connection default
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t1 ADD COLUMN a int(11) unsigned default NULL;
+ UPDATE t1 SET a=b;
+
+--connection writer
+--send UPDATE t1, (SELECT 1 FROM t1 t1i) d SET a = 0 WHERE 1=0;
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t1 DROP COLUMN a;
+
+--connection writer
+--error 0,1054 # unknown column error
+--reap
+}
+--enable_query_log
+
+--echo # 1.2.2. PS mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t1 ADD COLUMN a INT;
+ UPDATE t1 SET a=b;
+
+--connection writer
+ PREPARE stmt FROM 'UPDATE t1, (SELECT 1 FROM t1 t1i) d SET a = 0 WHERE 1=0';
+--send EXECUTE stmt
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t1 DROP COLUMN a;
+
+--connection writer
+--error 0,1054 # Unknown column 'a' in 'field list'
+--reap
+}
+--enable_query_log
+--connection default
+ALTER TABLE t1 ADD COLUMN a INT;
+
+--echo # 2. test UNIONs
+--echo # 2.1. test altering of columns that multiupdate doesn't use
+--echo # 2.1.1. normal mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+ send UPDATE t1, ((SELECT 1 FROM t1 t1i) UNION (SELECT 2 FROM t1 t1ii)) e SET a = 0 WHERE 1=0;
+
+--connection locker
+ ALTER TABLE t1 ADD COLUMN (c INT);
+ ALTER TABLE t1 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+
+--echo # 2.1.2. PS mode
+
+--connection writer
+PREPARE stmt FROM 'UPDATE t1, ((SELECT 1 FROM t1 t1i) UNION (SELECT 2 FROM t1 t1ii)) e SET a = 0 WHERE 1=0';
+
+let $i = 100;
+while ($i) {
+--dec $i
+
+--connection writer
+--send EXECUTE stmt
+
+--connection locker
+ ALTER TABLE t1 ADD COLUMN (c INT);
+ ALTER TABLE t1 DROP COLUMN c;
+
+--connection writer
+--reap
+}
+--enable_query_log
+
+--echo # 2.2. test altering of columns that multiupdate uses
+--echo # 2.2.1. normal mode
+
+--connection default
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t1 ADD COLUMN a int(11) unsigned default NULL;
+ UPDATE t1 SET a=b;
+
+--connection writer
+--send UPDATE t1, ((SELECT 1 FROM t1 t1i) UNION (SELECT 2 FROM t1 t1ii)) e SET a = 0 WHERE 1=0;
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t1 DROP COLUMN a;
+
+--connection writer
+--error 0,1054 # Unknown column 'a' in 'field list'
+--reap
+}
+--enable_query_log
+
+--echo # 2.2.2. PS mode
+
+--disable_query_log
+let $i = 100;
+while ($i) {
+ dec $i;
+
+--connection locker
+--error 0,1060
+ ALTER TABLE t1 ADD COLUMN a INT;
+ UPDATE t1 SET a=b;
+
+--connection writer
+ PREPARE stmt FROM 'UPDATE t1, ((SELECT 1 FROM t1 t1i) UNION (SELECT 2 FROM t1 t1ii)) e SET a = 0 WHERE 1=0';
+--send EXECUTE stmt
+
+--connection locker
+--error 0,1091
+ ALTER TABLE t1 DROP COLUMN a;
+
+--connection writer
+--error 0,1054 # Unknown column 'a' in 'field list'
+--reap
+}
+--enable_query_log
+--connection default
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/log_basic.test b/mysql-test/t/log_basic.test
index f195eae4153..98e99fa4e4f 100644
--- a/mysql-test/t/log_basic.test
+++ b/mysql-test/t/log_basic.test
@@ -41,9 +41,9 @@ SELECT @@global.log AS INIT_VALUE;
SELECT @@log AS INIT_VALUE;
-SET @@global.log = ON;
+SET @@global.general_log = ON;
-SET global log = 0;
+SET global general_log = 0;
--echo 'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
--echo 'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index 8b638e21000..c1249985eba 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -267,6 +267,32 @@ SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
###########################################################################
+
+
+## WL#4403 - deprecate @log and @slow_log_queries variables
+
+## these are all deprecated -- show for command-line as well!
+--echo deprecated:
+SET GLOBAL log = 0;
+SET GLOBAL log_slow_queries = 0;
+SET GLOBAL log = DEFAULT;
+SET GLOBAL log_slow_queries = DEFAULT;
+
+## these are NOT deprecated
+--echo not deprecated:
+SELECT @@global.general_log_file INTO @my_glf;
+SELECT @@global.slow_query_log_file INTO @my_sqlf;
+SET GLOBAL general_log = 0;
+SET GLOBAL slow_query_log = 0;
+SET GLOBAL general_log_file = 'WL4403_G.log';
+SET GLOBAL slow_query_log_file = 'WL4403_SQ.log';
+SET GLOBAL general_log_file = @my_glf;
+SET GLOBAL slow_query_log_file = @my_sqlf;
+SET GLOBAL general_log = DEFAULT;
+SET GLOBAL slow_query_log = DEFAULT;
+
+
+
--echo End of 5.1 tests
--enable_ps_protocol
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index 22cd219534f..952121c8bb6 100644
--- a/mysql-test/t/log_tables.test
+++ b/mysql-test/t/log_tables.test
@@ -944,6 +944,52 @@ deallocate prepare long_query;
set global general_log = @old_general_log_state;
#
+# Bug#34306: Can't make copy of log tables when server binary log is enabled
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS log_count;
+DROP TABLE IF EXISTS slow_log_copy;
+DROP TABLE IF EXISTS general_log_copy;
+--enable_warnings
+
+CREATE TABLE log_count (count BIGINT(21));
+
+SET @old_general_log_state = @@global.general_log;
+SET @old_slow_log_state = @@global.slow_query_log;
+
+SET GLOBAL general_log = ON;
+SET GLOBAL slow_query_log = ON;
+
+CREATE TABLE slow_log_copy SELECT * FROM mysql.slow_log;
+INSERT INTO slow_log_copy SELECT * FROM mysql.slow_log;
+INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.slow_log));
+DROP TABLE slow_log_copy;
+
+CREATE TABLE general_log_copy SELECT * FROM mysql.general_log;
+INSERT INTO general_log_copy SELECT * FROM mysql.general_log;
+INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.general_log));
+DROP TABLE general_log_copy;
+
+SET GLOBAL general_log = OFF;
+SET GLOBAL slow_query_log = OFF;
+
+CREATE TABLE slow_log_copy SELECT * FROM mysql.slow_log;
+INSERT INTO slow_log_copy SELECT * FROM mysql.slow_log;
+INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.slow_log));
+DROP TABLE slow_log_copy;
+
+CREATE TABLE general_log_copy SELECT * FROM mysql.general_log;
+INSERT INTO general_log_copy SELECT * FROM mysql.general_log;
+INSERT INTO log_count (count) VALUES ((SELECT count(*) FROM mysql.general_log));
+DROP TABLE general_log_copy;
+
+SET GLOBAL general_log = @old_general_log_state;
+SET GLOBAL slow_query_log = @old_slow_log_state;
+
+DROP TABLE log_count;
+
+#
# Bug #31700: thd->examined_row_count not incremented for 'const' type queries
#
SET @old_slow_log_state = @@global.slow_query_log;
diff --git a/mysql-test/t/mysqldump-max.test b/mysql-test/t/mysqldump-max.test
index 359c4ea5793..1e8b9647503 100644
--- a/mysql-test/t/mysqldump-max.test
+++ b/mysql-test/t/mysqldump-max.test
@@ -66,3 +66,1061 @@ drop table t3;
drop table t4;
drop table t5;
drop table t6;
+
+
+#
+# Bug#31434 - mysqldump dumps view as table
+#
+
+# Show that mysqldump's stand-in tables for views are always of MyISAM
+# type to avoid Inno's column-number limits (~1000 columns) etc.
+# Here because it needs Inno-engine.
+
+SELECT @@global.storage_engine INTO @old_engine;
+SET GLOBAL storage_engine=InnoDB;
+
+--disable_query_log
+CREATE TABLE `t1` (
+ `col_0` tinyint(1) default NULL,
+ `col_1` tinyint(1) default NULL,
+ `col_2` tinyint(1) default NULL,
+ `col_3` tinyint(1) default NULL,
+ `col_4` tinyint(1) default NULL,
+ `col_5` tinyint(1) default NULL,
+ `col_6` tinyint(1) default NULL,
+ `col_7` tinyint(1) default NULL,
+ `col_8` tinyint(1) default NULL,
+ `col_9` tinyint(1) default NULL,
+ `col_10` tinyint(1) default NULL,
+ `col_11` tinyint(1) default NULL,
+ `col_12` tinyint(1) default NULL,
+ `col_13` tinyint(1) default NULL,
+ `col_14` tinyint(1) default NULL,
+ `col_15` tinyint(1) default NULL,
+ `col_16` tinyint(1) default NULL,
+ `col_17` tinyint(1) default NULL,
+ `col_18` tinyint(1) default NULL,
+ `col_19` tinyint(1) default NULL,
+ `col_20` tinyint(1) default NULL,
+ `col_21` tinyint(1) default NULL,
+ `col_22` tinyint(1) default NULL,
+ `col_23` tinyint(1) default NULL,
+ `col_24` tinyint(1) default NULL,
+ `col_25` tinyint(1) default NULL,
+ `col_26` tinyint(1) default NULL,
+ `col_27` tinyint(1) default NULL,
+ `col_28` tinyint(1) default NULL,
+ `col_29` tinyint(1) default NULL,
+ `col_30` tinyint(1) default NULL,
+ `col_31` tinyint(1) default NULL,
+ `col_32` tinyint(1) default NULL,
+ `col_33` tinyint(1) default NULL,
+ `col_34` tinyint(1) default NULL,
+ `col_35` tinyint(1) default NULL,
+ `col_36` tinyint(1) default NULL,
+ `col_37` tinyint(1) default NULL,
+ `col_38` tinyint(1) default NULL,
+ `col_39` tinyint(1) default NULL,
+ `col_40` tinyint(1) default NULL,
+ `col_41` tinyint(1) default NULL,
+ `col_42` tinyint(1) default NULL,
+ `col_43` tinyint(1) default NULL,
+ `col_44` tinyint(1) default NULL,
+ `col_45` tinyint(1) default NULL,
+ `col_46` tinyint(1) default NULL,
+ `col_47` tinyint(1) default NULL,
+ `col_48` tinyint(1) default NULL,
+ `col_49` tinyint(1) default NULL,
+ `col_50` tinyint(1) default NULL,
+ `col_51` tinyint(1) default NULL,
+ `col_52` tinyint(1) default NULL,
+ `col_53` tinyint(1) default NULL,
+ `col_54` tinyint(1) default NULL,
+ `col_55` tinyint(1) default NULL,
+ `col_56` tinyint(1) default NULL,
+ `col_57` tinyint(1) default NULL,
+ `col_58` tinyint(1) default NULL,
+ `col_59` tinyint(1) default NULL,
+ `col_60` tinyint(1) default NULL,
+ `col_61` tinyint(1) default NULL,
+ `col_62` tinyint(1) default NULL,
+ `col_63` tinyint(1) default NULL,
+ `col_64` tinyint(1) default NULL,
+ `col_65` tinyint(1) default NULL,
+ `col_66` tinyint(1) default NULL,
+ `col_67` tinyint(1) default NULL,
+ `col_68` tinyint(1) default NULL,
+ `col_69` tinyint(1) default NULL,
+ `col_70` tinyint(1) default NULL,
+ `col_71` tinyint(1) default NULL,
+ `col_72` tinyint(1) default NULL,
+ `col_73` tinyint(1) default NULL,
+ `col_74` tinyint(1) default NULL,
+ `col_75` tinyint(1) default NULL,
+ `col_76` tinyint(1) default NULL,
+ `col_77` tinyint(1) default NULL,
+ `col_78` tinyint(1) default NULL,
+ `col_79` tinyint(1) default NULL,
+ `col_80` tinyint(1) default NULL,
+ `col_81` tinyint(1) default NULL,
+ `col_82` tinyint(1) default NULL,
+ `col_83` tinyint(1) default NULL,
+ `col_84` tinyint(1) default NULL,
+ `col_85` tinyint(1) default NULL,
+ `col_86` tinyint(1) default NULL,
+ `col_87` tinyint(1) default NULL,
+ `col_88` tinyint(1) default NULL,
+ `col_89` tinyint(1) default NULL,
+ `col_90` tinyint(1) default NULL,
+ `col_91` tinyint(1) default NULL,
+ `col_92` tinyint(1) default NULL,
+ `col_93` tinyint(1) default NULL,
+ `col_94` tinyint(1) default NULL,
+ `col_95` tinyint(1) default NULL,
+ `col_96` tinyint(1) default NULL,
+ `col_97` tinyint(1) default NULL,
+ `col_98` tinyint(1) default NULL,
+ `col_99` tinyint(1) default NULL,
+ `col_100` tinyint(1) default NULL,
+ `col_101` tinyint(1) default NULL,
+ `col_102` tinyint(1) default NULL,
+ `col_103` tinyint(1) default NULL,
+ `col_104` tinyint(1) default NULL,
+ `col_105` tinyint(1) default NULL,
+ `col_106` tinyint(1) default NULL,
+ `col_107` tinyint(1) default NULL,
+ `col_108` tinyint(1) default NULL,
+ `col_109` tinyint(1) default NULL,
+ `col_110` tinyint(1) default NULL,
+ `col_111` tinyint(1) default NULL,
+ `col_112` tinyint(1) default NULL,
+ `col_113` tinyint(1) default NULL,
+ `col_114` tinyint(1) default NULL,
+ `col_115` tinyint(1) default NULL,
+ `col_116` tinyint(1) default NULL,
+ `col_117` tinyint(1) default NULL,
+ `col_118` tinyint(1) default NULL,
+ `col_119` tinyint(1) default NULL,
+ `col_120` tinyint(1) default NULL,
+ `col_121` tinyint(1) default NULL,
+ `col_122` tinyint(1) default NULL,
+ `col_123` tinyint(1) default NULL,
+ `col_124` tinyint(1) default NULL,
+ `col_125` tinyint(1) default NULL,
+ `col_126` tinyint(1) default NULL,
+ `col_127` tinyint(1) default NULL,
+ `col_128` tinyint(1) default NULL,
+ `col_129` tinyint(1) default NULL,
+ `col_130` tinyint(1) default NULL,
+ `col_131` tinyint(1) default NULL,
+ `col_132` tinyint(1) default NULL,
+ `col_133` tinyint(1) default NULL,
+ `col_134` tinyint(1) default NULL,
+ `col_135` tinyint(1) default NULL,
+ `col_136` tinyint(1) default NULL,
+ `col_137` tinyint(1) default NULL,
+ `col_138` tinyint(1) default NULL,
+ `col_139` tinyint(1) default NULL,
+ `col_140` tinyint(1) default NULL,
+ `col_141` tinyint(1) default NULL,
+ `col_142` tinyint(1) default NULL,
+ `col_143` tinyint(1) default NULL,
+ `col_144` tinyint(1) default NULL,
+ `col_145` tinyint(1) default NULL,
+ `col_146` tinyint(1) default NULL,
+ `col_147` tinyint(1) default NULL,
+ `col_148` tinyint(1) default NULL,
+ `col_149` tinyint(1) default NULL,
+ `col_150` tinyint(1) default NULL,
+ `col_151` tinyint(1) default NULL,
+ `col_152` tinyint(1) default NULL,
+ `col_153` tinyint(1) default NULL,
+ `col_154` tinyint(1) default NULL,
+ `col_155` tinyint(1) default NULL,
+ `col_156` tinyint(1) default NULL,
+ `col_157` tinyint(1) default NULL,
+ `col_158` tinyint(1) default NULL,
+ `col_159` tinyint(1) default NULL,
+ `col_160` tinyint(1) default NULL,
+ `col_161` tinyint(1) default NULL,
+ `col_162` tinyint(1) default NULL,
+ `col_163` tinyint(1) default NULL,
+ `col_164` tinyint(1) default NULL,
+ `col_165` tinyint(1) default NULL,
+ `col_166` tinyint(1) default NULL,
+ `col_167` tinyint(1) default NULL,
+ `col_168` tinyint(1) default NULL,
+ `col_169` tinyint(1) default NULL,
+ `col_170` tinyint(1) default NULL,
+ `col_171` tinyint(1) default NULL,
+ `col_172` tinyint(1) default NULL,
+ `col_173` tinyint(1) default NULL,
+ `col_174` tinyint(1) default NULL,
+ `col_175` tinyint(1) default NULL,
+ `col_176` tinyint(1) default NULL,
+ `col_177` tinyint(1) default NULL,
+ `col_178` tinyint(1) default NULL,
+ `col_179` tinyint(1) default NULL,
+ `col_180` tinyint(1) default NULL,
+ `col_181` tinyint(1) default NULL,
+ `col_182` tinyint(1) default NULL,
+ `col_183` tinyint(1) default NULL,
+ `col_184` tinyint(1) default NULL,
+ `col_185` tinyint(1) default NULL,
+ `col_186` tinyint(1) default NULL,
+ `col_187` tinyint(1) default NULL,
+ `col_188` tinyint(1) default NULL,
+ `col_189` tinyint(1) default NULL,
+ `col_190` tinyint(1) default NULL,
+ `col_191` tinyint(1) default NULL,
+ `col_192` tinyint(1) default NULL,
+ `col_193` tinyint(1) default NULL,
+ `col_194` tinyint(1) default NULL,
+ `col_195` tinyint(1) default NULL,
+ `col_196` tinyint(1) default NULL,
+ `col_197` tinyint(1) default NULL,
+ `col_198` tinyint(1) default NULL,
+ `col_199` tinyint(1) default NULL,
+ `col_200` tinyint(1) default NULL,
+ `col_201` tinyint(1) default NULL,
+ `col_202` tinyint(1) default NULL,
+ `col_203` tinyint(1) default NULL,
+ `col_204` tinyint(1) default NULL,
+ `col_205` tinyint(1) default NULL,
+ `col_206` tinyint(1) default NULL,
+ `col_207` tinyint(1) default NULL,
+ `col_208` tinyint(1) default NULL,
+ `col_209` tinyint(1) default NULL,
+ `col_210` tinyint(1) default NULL,
+ `col_211` tinyint(1) default NULL,
+ `col_212` tinyint(1) default NULL,
+ `col_213` tinyint(1) default NULL,
+ `col_214` tinyint(1) default NULL,
+ `col_215` tinyint(1) default NULL,
+ `col_216` tinyint(1) default NULL,
+ `col_217` tinyint(1) default NULL,
+ `col_218` tinyint(1) default NULL,
+ `col_219` tinyint(1) default NULL,
+ `col_220` tinyint(1) default NULL,
+ `col_221` tinyint(1) default NULL,
+ `col_222` tinyint(1) default NULL,
+ `col_223` tinyint(1) default NULL,
+ `col_224` tinyint(1) default NULL,
+ `col_225` tinyint(1) default NULL,
+ `col_226` tinyint(1) default NULL,
+ `col_227` tinyint(1) default NULL,
+ `col_228` tinyint(1) default NULL,
+ `col_229` tinyint(1) default NULL,
+ `col_230` tinyint(1) default NULL,
+ `col_231` tinyint(1) default NULL,
+ `col_232` tinyint(1) default NULL,
+ `col_233` tinyint(1) default NULL,
+ `col_234` tinyint(1) default NULL,
+ `col_235` tinyint(1) default NULL,
+ `col_236` tinyint(1) default NULL,
+ `col_237` tinyint(1) default NULL,
+ `col_238` tinyint(1) default NULL,
+ `col_239` tinyint(1) default NULL,
+ `col_240` tinyint(1) default NULL,
+ `col_241` tinyint(1) default NULL,
+ `col_242` tinyint(1) default NULL,
+ `col_243` tinyint(1) default NULL,
+ `col_244` tinyint(1) default NULL,
+ `col_245` tinyint(1) default NULL,
+ `col_246` tinyint(1) default NULL,
+ `col_247` tinyint(1) default NULL,
+ `col_248` tinyint(1) default NULL,
+ `col_249` tinyint(1) default NULL,
+ `col_250` tinyint(1) default NULL,
+ `col_251` tinyint(1) default NULL,
+ `col_252` tinyint(1) default NULL,
+ `col_253` tinyint(1) default NULL,
+ `col_254` tinyint(1) default NULL,
+ `col_255` tinyint(1) default NULL,
+ `col_256` tinyint(1) default NULL,
+ `col_257` tinyint(1) default NULL,
+ `col_258` tinyint(1) default NULL,
+ `col_259` tinyint(1) default NULL,
+ `col_260` tinyint(1) default NULL,
+ `col_261` tinyint(1) default NULL,
+ `col_262` tinyint(1) default NULL,
+ `col_263` tinyint(1) default NULL,
+ `col_264` tinyint(1) default NULL,
+ `col_265` tinyint(1) default NULL,
+ `col_266` tinyint(1) default NULL,
+ `col_267` tinyint(1) default NULL,
+ `col_268` tinyint(1) default NULL,
+ `col_269` tinyint(1) default NULL,
+ `col_270` tinyint(1) default NULL,
+ `col_271` tinyint(1) default NULL,
+ `col_272` tinyint(1) default NULL,
+ `col_273` tinyint(1) default NULL,
+ `col_274` tinyint(1) default NULL,
+ `col_275` tinyint(1) default NULL,
+ `col_276` tinyint(1) default NULL,
+ `col_277` tinyint(1) default NULL,
+ `col_278` tinyint(1) default NULL,
+ `col_279` tinyint(1) default NULL,
+ `col_280` tinyint(1) default NULL,
+ `col_281` tinyint(1) default NULL,
+ `col_282` tinyint(1) default NULL,
+ `col_283` tinyint(1) default NULL,
+ `col_284` tinyint(1) default NULL,
+ `col_285` tinyint(1) default NULL,
+ `col_286` tinyint(1) default NULL,
+ `col_287` tinyint(1) default NULL,
+ `col_288` tinyint(1) default NULL,
+ `col_289` tinyint(1) default NULL,
+ `col_290` tinyint(1) default NULL,
+ `col_291` tinyint(1) default NULL,
+ `col_292` tinyint(1) default NULL,
+ `col_293` tinyint(1) default NULL,
+ `col_294` tinyint(1) default NULL,
+ `col_295` tinyint(1) default NULL,
+ `col_296` tinyint(1) default NULL,
+ `col_297` tinyint(1) default NULL,
+ `col_298` tinyint(1) default NULL,
+ `col_299` tinyint(1) default NULL,
+ `col_300` tinyint(1) default NULL,
+ `col_301` tinyint(1) default NULL,
+ `col_302` tinyint(1) default NULL,
+ `col_303` tinyint(1) default NULL,
+ `col_304` tinyint(1) default NULL,
+ `col_305` tinyint(1) default NULL,
+ `col_306` tinyint(1) default NULL,
+ `col_307` tinyint(1) default NULL,
+ `col_308` tinyint(1) default NULL,
+ `col_309` tinyint(1) default NULL,
+ `col_310` tinyint(1) default NULL,
+ `col_311` tinyint(1) default NULL,
+ `col_312` tinyint(1) default NULL,
+ `col_313` tinyint(1) default NULL,
+ `col_314` tinyint(1) default NULL,
+ `col_315` tinyint(1) default NULL,
+ `col_316` tinyint(1) default NULL,
+ `col_317` tinyint(1) default NULL,
+ `col_318` tinyint(1) default NULL,
+ `col_319` tinyint(1) default NULL,
+ `col_320` tinyint(1) default NULL,
+ `col_321` tinyint(1) default NULL,
+ `col_322` tinyint(1) default NULL,
+ `col_323` tinyint(1) default NULL,
+ `col_324` tinyint(1) default NULL,
+ `col_325` tinyint(1) default NULL,
+ `col_326` tinyint(1) default NULL,
+ `col_327` tinyint(1) default NULL,
+ `col_328` tinyint(1) default NULL,
+ `col_329` tinyint(1) default NULL,
+ `col_330` tinyint(1) default NULL,
+ `col_331` tinyint(1) default NULL,
+ `col_332` tinyint(1) default NULL,
+ `col_333` tinyint(1) default NULL,
+ `col_334` tinyint(1) default NULL,
+ `col_335` tinyint(1) default NULL,
+ `col_336` tinyint(1) default NULL,
+ `col_337` tinyint(1) default NULL,
+ `col_338` tinyint(1) default NULL,
+ `col_339` tinyint(1) default NULL,
+ `col_340` tinyint(1) default NULL,
+ `col_341` tinyint(1) default NULL,
+ `col_342` tinyint(1) default NULL,
+ `col_343` tinyint(1) default NULL,
+ `col_344` tinyint(1) default NULL,
+ `col_345` tinyint(1) default NULL,
+ `col_346` tinyint(1) default NULL,
+ `col_347` tinyint(1) default NULL,
+ `col_348` tinyint(1) default NULL,
+ `col_349` tinyint(1) default NULL,
+ `col_350` tinyint(1) default NULL,
+ `col_351` tinyint(1) default NULL,
+ `col_352` tinyint(1) default NULL,
+ `col_353` tinyint(1) default NULL,
+ `col_354` tinyint(1) default NULL,
+ `col_355` tinyint(1) default NULL,
+ `col_356` tinyint(1) default NULL,
+ `col_357` tinyint(1) default NULL,
+ `col_358` tinyint(1) default NULL,
+ `col_359` tinyint(1) default NULL,
+ `col_360` tinyint(1) default NULL,
+ `col_361` tinyint(1) default NULL,
+ `col_362` tinyint(1) default NULL,
+ `col_363` tinyint(1) default NULL,
+ `col_364` tinyint(1) default NULL,
+ `col_365` tinyint(1) default NULL,
+ `col_366` tinyint(1) default NULL,
+ `col_367` tinyint(1) default NULL,
+ `col_368` tinyint(1) default NULL,
+ `col_369` tinyint(1) default NULL,
+ `col_370` tinyint(1) default NULL,
+ `col_371` tinyint(1) default NULL,
+ `col_372` tinyint(1) default NULL,
+ `col_373` tinyint(1) default NULL,
+ `col_374` tinyint(1) default NULL,
+ `col_375` tinyint(1) default NULL,
+ `col_376` tinyint(1) default NULL,
+ `col_377` tinyint(1) default NULL,
+ `col_378` tinyint(1) default NULL,
+ `col_379` tinyint(1) default NULL,
+ `col_380` tinyint(1) default NULL,
+ `col_381` tinyint(1) default NULL,
+ `col_382` tinyint(1) default NULL,
+ `col_383` tinyint(1) default NULL,
+ `col_384` tinyint(1) default NULL,
+ `col_385` tinyint(1) default NULL,
+ `col_386` tinyint(1) default NULL,
+ `col_387` tinyint(1) default NULL,
+ `col_388` tinyint(1) default NULL,
+ `col_389` tinyint(1) default NULL,
+ `col_390` tinyint(1) default NULL,
+ `col_391` tinyint(1) default NULL,
+ `col_392` tinyint(1) default NULL,
+ `col_393` tinyint(1) default NULL,
+ `col_394` tinyint(1) default NULL,
+ `col_395` tinyint(1) default NULL,
+ `col_396` tinyint(1) default NULL,
+ `col_397` tinyint(1) default NULL,
+ `col_398` tinyint(1) default NULL,
+ `col_399` tinyint(1) default NULL,
+ `col_400` tinyint(1) default NULL,
+ `col_401` tinyint(1) default NULL,
+ `col_402` tinyint(1) default NULL,
+ `col_403` tinyint(1) default NULL,
+ `col_404` tinyint(1) default NULL,
+ `col_405` tinyint(1) default NULL,
+ `col_406` tinyint(1) default NULL,
+ `col_407` tinyint(1) default NULL,
+ `col_408` tinyint(1) default NULL,
+ `col_409` tinyint(1) default NULL,
+ `col_410` tinyint(1) default NULL,
+ `col_411` tinyint(1) default NULL,
+ `col_412` tinyint(1) default NULL,
+ `col_413` tinyint(1) default NULL,
+ `col_414` tinyint(1) default NULL,
+ `col_415` tinyint(1) default NULL,
+ `col_416` tinyint(1) default NULL,
+ `col_417` tinyint(1) default NULL,
+ `col_418` tinyint(1) default NULL,
+ `col_419` tinyint(1) default NULL,
+ `col_420` tinyint(1) default NULL,
+ `col_421` tinyint(1) default NULL,
+ `col_422` tinyint(1) default NULL,
+ `col_423` tinyint(1) default NULL,
+ `col_424` tinyint(1) default NULL,
+ `col_425` tinyint(1) default NULL,
+ `col_426` tinyint(1) default NULL,
+ `col_427` tinyint(1) default NULL,
+ `col_428` tinyint(1) default NULL,
+ `col_429` tinyint(1) default NULL,
+ `col_430` tinyint(1) default NULL,
+ `col_431` tinyint(1) default NULL,
+ `col_432` tinyint(1) default NULL,
+ `col_433` tinyint(1) default NULL,
+ `col_434` tinyint(1) default NULL,
+ `col_435` tinyint(1) default NULL,
+ `col_436` tinyint(1) default NULL,
+ `col_437` tinyint(1) default NULL,
+ `col_438` tinyint(1) default NULL,
+ `col_439` tinyint(1) default NULL,
+ `col_440` tinyint(1) default NULL,
+ `col_441` tinyint(1) default NULL,
+ `col_442` tinyint(1) default NULL,
+ `col_443` tinyint(1) default NULL,
+ `col_444` tinyint(1) default NULL,
+ `col_445` tinyint(1) default NULL,
+ `col_446` tinyint(1) default NULL,
+ `col_447` tinyint(1) default NULL,
+ `col_448` tinyint(1) default NULL,
+ `col_449` tinyint(1) default NULL,
+ `col_450` tinyint(1) default NULL,
+ `col_451` tinyint(1) default NULL,
+ `col_452` tinyint(1) default NULL,
+ `col_453` tinyint(1) default NULL,
+ `col_454` tinyint(1) default NULL,
+ `col_455` tinyint(1) default NULL,
+ `col_456` tinyint(1) default NULL,
+ `col_457` tinyint(1) default NULL,
+ `col_458` tinyint(1) default NULL,
+ `col_459` tinyint(1) default NULL,
+ `col_460` tinyint(1) default NULL,
+ `col_461` tinyint(1) default NULL,
+ `col_462` tinyint(1) default NULL,
+ `col_463` tinyint(1) default NULL,
+ `col_464` tinyint(1) default NULL,
+ `col_465` tinyint(1) default NULL,
+ `col_466` tinyint(1) default NULL,
+ `col_467` tinyint(1) default NULL,
+ `col_468` tinyint(1) default NULL,
+ `col_469` tinyint(1) default NULL,
+ `col_470` tinyint(1) default NULL,
+ `col_471` tinyint(1) default NULL,
+ `col_472` tinyint(1) default NULL,
+ `col_473` tinyint(1) default NULL,
+ `col_474` tinyint(1) default NULL,
+ `col_475` tinyint(1) default NULL,
+ `col_476` tinyint(1) default NULL,
+ `col_477` tinyint(1) default NULL,
+ `col_478` tinyint(1) default NULL,
+ `col_479` tinyint(1) default NULL,
+ `col_480` tinyint(1) default NULL,
+ `col_481` tinyint(1) default NULL,
+ `col_482` tinyint(1) default NULL,
+ `col_483` tinyint(1) default NULL,
+ `col_484` tinyint(1) default NULL,
+ `col_485` tinyint(1) default NULL,
+ `col_486` tinyint(1) default NULL,
+ `col_487` tinyint(1) default NULL,
+ `col_488` tinyint(1) default NULL,
+ `col_489` tinyint(1) default NULL,
+ `col_490` tinyint(1) default NULL,
+ `col_491` tinyint(1) default NULL,
+ `col_492` tinyint(1) default NULL,
+ `col_493` tinyint(1) default NULL,
+ `col_494` tinyint(1) default NULL,
+ `col_495` tinyint(1) default NULL,
+ `col_496` tinyint(1) default NULL,
+ `col_497` tinyint(1) default NULL,
+ `col_498` tinyint(1) default NULL,
+ `col_499` tinyint(1) default NULL,
+ `col_500` tinyint(1) default NULL,
+ `col_501` tinyint(1) default NULL,
+ `col_502` tinyint(1) default NULL,
+ `col_503` tinyint(1) default NULL,
+ `col_504` tinyint(1) default NULL,
+ `col_505` tinyint(1) default NULL,
+ `col_506` tinyint(1) default NULL,
+ `col_507` tinyint(1) default NULL,
+ `col_508` tinyint(1) default NULL,
+ `col_509` tinyint(1) default NULL,
+ `col_510` tinyint(1) default NULL,
+ `col_511` tinyint(1) default NULL,
+ `col_512` tinyint(1) default NULL,
+ `col_513` tinyint(1) default NULL,
+ `col_514` tinyint(1) default NULL,
+ `col_515` tinyint(1) default NULL,
+ `col_516` tinyint(1) default NULL,
+ `col_517` tinyint(1) default NULL,
+ `col_518` tinyint(1) default NULL,
+ `col_519` tinyint(1) default NULL,
+ `col_520` tinyint(1) default NULL,
+ `col_521` tinyint(1) default NULL,
+ `col_522` tinyint(1) default NULL,
+ `col_523` tinyint(1) default NULL,
+ `col_524` tinyint(1) default NULL,
+ `col_525` tinyint(1) default NULL,
+ `col_526` tinyint(1) default NULL,
+ `col_527` tinyint(1) default NULL,
+ `col_528` tinyint(1) default NULL,
+ `col_529` tinyint(1) default NULL,
+ `col_530` tinyint(1) default NULL,
+ `col_531` tinyint(1) default NULL,
+ `col_532` tinyint(1) default NULL,
+ `col_533` tinyint(1) default NULL,
+ `col_534` tinyint(1) default NULL,
+ `col_535` tinyint(1) default NULL,
+ `col_536` tinyint(1) default NULL,
+ `col_537` tinyint(1) default NULL,
+ `col_538` tinyint(1) default NULL,
+ `col_539` tinyint(1) default NULL,
+ `col_540` tinyint(1) default NULL,
+ `col_541` tinyint(1) default NULL,
+ `col_542` tinyint(1) default NULL,
+ `col_543` tinyint(1) default NULL,
+ `col_544` tinyint(1) default NULL,
+ `col_545` tinyint(1) default NULL,
+ `col_546` tinyint(1) default NULL,
+ `col_547` tinyint(1) default NULL,
+ `col_548` tinyint(1) default NULL,
+ `col_549` tinyint(1) default NULL,
+ `col_550` tinyint(1) default NULL,
+ `col_551` tinyint(1) default NULL,
+ `col_552` tinyint(1) default NULL,
+ `col_553` tinyint(1) default NULL,
+ `col_554` tinyint(1) default NULL,
+ `col_555` tinyint(1) default NULL,
+ `col_556` tinyint(1) default NULL,
+ `col_557` tinyint(1) default NULL,
+ `col_558` tinyint(1) default NULL,
+ `col_559` tinyint(1) default NULL,
+ `col_560` tinyint(1) default NULL,
+ `col_561` tinyint(1) default NULL,
+ `col_562` tinyint(1) default NULL,
+ `col_563` tinyint(1) default NULL,
+ `col_564` tinyint(1) default NULL,
+ `col_565` tinyint(1) default NULL,
+ `col_566` tinyint(1) default NULL,
+ `col_567` tinyint(1) default NULL,
+ `col_568` tinyint(1) default NULL,
+ `col_569` tinyint(1) default NULL,
+ `col_570` tinyint(1) default NULL,
+ `col_571` tinyint(1) default NULL,
+ `col_572` tinyint(1) default NULL,
+ `col_573` tinyint(1) default NULL,
+ `col_574` tinyint(1) default NULL,
+ `col_575` tinyint(1) default NULL,
+ `col_576` tinyint(1) default NULL,
+ `col_577` tinyint(1) default NULL,
+ `col_578` tinyint(1) default NULL,
+ `col_579` tinyint(1) default NULL,
+ `col_580` tinyint(1) default NULL,
+ `col_581` tinyint(1) default NULL,
+ `col_582` tinyint(1) default NULL,
+ `col_583` tinyint(1) default NULL,
+ `col_584` tinyint(1) default NULL,
+ `col_585` tinyint(1) default NULL,
+ `col_586` tinyint(1) default NULL,
+ `col_587` tinyint(1) default NULL,
+ `col_588` tinyint(1) default NULL,
+ `col_589` tinyint(1) default NULL,
+ `col_590` tinyint(1) default NULL,
+ `col_591` tinyint(1) default NULL,
+ `col_592` tinyint(1) default NULL,
+ `col_593` tinyint(1) default NULL,
+ `col_594` tinyint(1) default NULL,
+ `col_595` tinyint(1) default NULL,
+ `col_596` tinyint(1) default NULL,
+ `col_597` tinyint(1) default NULL,
+ `col_598` tinyint(1) default NULL,
+ `col_599` tinyint(1) default NULL,
+ `col_600` tinyint(1) default NULL,
+ `col_601` tinyint(1) default NULL,
+ `col_602` tinyint(1) default NULL,
+ `col_603` tinyint(1) default NULL,
+ `col_604` tinyint(1) default NULL,
+ `col_605` tinyint(1) default NULL,
+ `col_606` tinyint(1) default NULL,
+ `col_607` tinyint(1) default NULL,
+ `col_608` tinyint(1) default NULL,
+ `col_609` tinyint(1) default NULL,
+ `col_610` tinyint(1) default NULL,
+ `col_611` tinyint(1) default NULL,
+ `col_612` tinyint(1) default NULL,
+ `col_613` tinyint(1) default NULL,
+ `col_614` tinyint(1) default NULL,
+ `col_615` tinyint(1) default NULL,
+ `col_616` tinyint(1) default NULL,
+ `col_617` tinyint(1) default NULL,
+ `col_618` tinyint(1) default NULL,
+ `col_619` tinyint(1) default NULL,
+ `col_620` tinyint(1) default NULL,
+ `col_621` tinyint(1) default NULL,
+ `col_622` tinyint(1) default NULL,
+ `col_623` tinyint(1) default NULL,
+ `col_624` tinyint(1) default NULL,
+ `col_625` tinyint(1) default NULL,
+ `col_626` tinyint(1) default NULL,
+ `col_627` tinyint(1) default NULL,
+ `col_628` tinyint(1) default NULL,
+ `col_629` tinyint(1) default NULL,
+ `col_630` tinyint(1) default NULL,
+ `col_631` tinyint(1) default NULL,
+ `col_632` tinyint(1) default NULL,
+ `col_633` tinyint(1) default NULL,
+ `col_634` tinyint(1) default NULL,
+ `col_635` tinyint(1) default NULL,
+ `col_636` tinyint(1) default NULL,
+ `col_637` tinyint(1) default NULL,
+ `col_638` tinyint(1) default NULL,
+ `col_639` tinyint(1) default NULL,
+ `col_640` tinyint(1) default NULL,
+ `col_641` tinyint(1) default NULL,
+ `col_642` tinyint(1) default NULL,
+ `col_643` tinyint(1) default NULL,
+ `col_644` tinyint(1) default NULL,
+ `col_645` tinyint(1) default NULL,
+ `col_646` tinyint(1) default NULL,
+ `col_647` tinyint(1) default NULL,
+ `col_648` tinyint(1) default NULL,
+ `col_649` tinyint(1) default NULL,
+ `col_650` tinyint(1) default NULL,
+ `col_651` tinyint(1) default NULL,
+ `col_652` tinyint(1) default NULL,
+ `col_653` tinyint(1) default NULL,
+ `col_654` tinyint(1) default NULL,
+ `col_655` tinyint(1) default NULL,
+ `col_656` tinyint(1) default NULL,
+ `col_657` tinyint(1) default NULL,
+ `col_658` tinyint(1) default NULL,
+ `col_659` tinyint(1) default NULL,
+ `col_660` tinyint(1) default NULL,
+ `col_661` tinyint(1) default NULL,
+ `col_662` tinyint(1) default NULL,
+ `col_663` tinyint(1) default NULL,
+ `col_664` tinyint(1) default NULL,
+ `col_665` tinyint(1) default NULL,
+ `col_666` tinyint(1) default NULL,
+ `col_667` tinyint(1) default NULL,
+ `col_668` tinyint(1) default NULL,
+ `col_669` tinyint(1) default NULL,
+ `col_670` tinyint(1) default NULL,
+ `col_671` tinyint(1) default NULL,
+ `col_672` tinyint(1) default NULL,
+ `col_673` tinyint(1) default NULL,
+ `col_674` tinyint(1) default NULL,
+ `col_675` tinyint(1) default NULL,
+ `col_676` tinyint(1) default NULL,
+ `col_677` tinyint(1) default NULL,
+ `col_678` tinyint(1) default NULL,
+ `col_679` tinyint(1) default NULL,
+ `col_680` tinyint(1) default NULL,
+ `col_681` tinyint(1) default NULL,
+ `col_682` tinyint(1) default NULL,
+ `col_683` tinyint(1) default NULL,
+ `col_684` tinyint(1) default NULL,
+ `col_685` tinyint(1) default NULL,
+ `col_686` tinyint(1) default NULL,
+ `col_687` tinyint(1) default NULL,
+ `col_688` tinyint(1) default NULL,
+ `col_689` tinyint(1) default NULL,
+ `col_690` tinyint(1) default NULL,
+ `col_691` tinyint(1) default NULL,
+ `col_692` tinyint(1) default NULL,
+ `col_693` tinyint(1) default NULL,
+ `col_694` tinyint(1) default NULL,
+ `col_695` tinyint(1) default NULL,
+ `col_696` tinyint(1) default NULL,
+ `col_697` tinyint(1) default NULL,
+ `col_698` tinyint(1) default NULL,
+ `col_699` tinyint(1) default NULL,
+ `col_700` tinyint(1) default NULL,
+ `col_701` tinyint(1) default NULL,
+ `col_702` tinyint(1) default NULL,
+ `col_703` tinyint(1) default NULL,
+ `col_704` tinyint(1) default NULL,
+ `col_705` tinyint(1) default NULL,
+ `col_706` tinyint(1) default NULL,
+ `col_707` tinyint(1) default NULL,
+ `col_708` tinyint(1) default NULL,
+ `col_709` tinyint(1) default NULL,
+ `col_710` tinyint(1) default NULL,
+ `col_711` tinyint(1) default NULL,
+ `col_712` tinyint(1) default NULL,
+ `col_713` tinyint(1) default NULL,
+ `col_714` tinyint(1) default NULL,
+ `col_715` tinyint(1) default NULL,
+ `col_716` tinyint(1) default NULL,
+ `col_717` tinyint(1) default NULL,
+ `col_718` tinyint(1) default NULL,
+ `col_719` tinyint(1) default NULL,
+ `col_720` tinyint(1) default NULL,
+ `col_721` tinyint(1) default NULL,
+ `col_722` tinyint(1) default NULL,
+ `col_723` tinyint(1) default NULL,
+ `col_724` tinyint(1) default NULL,
+ `col_725` tinyint(1) default NULL,
+ `col_726` tinyint(1) default NULL,
+ `col_727` tinyint(1) default NULL,
+ `col_728` tinyint(1) default NULL,
+ `col_729` tinyint(1) default NULL,
+ `col_730` tinyint(1) default NULL,
+ `col_731` tinyint(1) default NULL,
+ `col_732` tinyint(1) default NULL,
+ `col_733` tinyint(1) default NULL,
+ `col_734` tinyint(1) default NULL,
+ `col_735` tinyint(1) default NULL,
+ `col_736` tinyint(1) default NULL,
+ `col_737` tinyint(1) default NULL,
+ `col_738` tinyint(1) default NULL,
+ `col_739` tinyint(1) default NULL,
+ `col_740` tinyint(1) default NULL,
+ `col_741` tinyint(1) default NULL,
+ `col_742` tinyint(1) default NULL,
+ `col_743` tinyint(1) default NULL,
+ `col_744` tinyint(1) default NULL,
+ `col_745` tinyint(1) default NULL,
+ `col_746` tinyint(1) default NULL,
+ `col_747` tinyint(1) default NULL,
+ `col_748` tinyint(1) default NULL,
+ `col_749` tinyint(1) default NULL,
+ `col_750` tinyint(1) default NULL,
+ `col_751` tinyint(1) default NULL,
+ `col_752` tinyint(1) default NULL,
+ `col_753` tinyint(1) default NULL,
+ `col_754` tinyint(1) default NULL,
+ `col_755` tinyint(1) default NULL,
+ `col_756` tinyint(1) default NULL,
+ `col_757` tinyint(1) default NULL,
+ `col_758` tinyint(1) default NULL,
+ `col_759` tinyint(1) default NULL,
+ `col_760` tinyint(1) default NULL,
+ `col_761` tinyint(1) default NULL,
+ `col_762` tinyint(1) default NULL,
+ `col_763` tinyint(1) default NULL,
+ `col_764` tinyint(1) default NULL,
+ `col_765` tinyint(1) default NULL,
+ `col_766` tinyint(1) default NULL,
+ `col_767` tinyint(1) default NULL,
+ `col_768` tinyint(1) default NULL,
+ `col_769` tinyint(1) default NULL,
+ `col_770` tinyint(1) default NULL,
+ `col_771` tinyint(1) default NULL,
+ `col_772` tinyint(1) default NULL,
+ `col_773` tinyint(1) default NULL,
+ `col_774` tinyint(1) default NULL,
+ `col_775` tinyint(1) default NULL,
+ `col_776` tinyint(1) default NULL,
+ `col_777` tinyint(1) default NULL,
+ `col_778` tinyint(1) default NULL,
+ `col_779` tinyint(1) default NULL,
+ `col_780` tinyint(1) default NULL,
+ `col_781` tinyint(1) default NULL,
+ `col_782` tinyint(1) default NULL,
+ `col_783` tinyint(1) default NULL,
+ `col_784` tinyint(1) default NULL,
+ `col_785` tinyint(1) default NULL,
+ `col_786` tinyint(1) default NULL,
+ `col_787` tinyint(1) default NULL,
+ `col_788` tinyint(1) default NULL,
+ `col_789` tinyint(1) default NULL,
+ `col_790` tinyint(1) default NULL,
+ `col_791` tinyint(1) default NULL,
+ `col_792` tinyint(1) default NULL,
+ `col_793` tinyint(1) default NULL,
+ `col_794` tinyint(1) default NULL,
+ `col_795` tinyint(1) default NULL,
+ `col_796` tinyint(1) default NULL,
+ `col_797` tinyint(1) default NULL,
+ `col_798` tinyint(1) default NULL,
+ `col_799` tinyint(1) default NULL,
+ `col_800` tinyint(1) default NULL,
+ `col_801` tinyint(1) default NULL,
+ `col_802` tinyint(1) default NULL,
+ `col_803` tinyint(1) default NULL,
+ `col_804` tinyint(1) default NULL,
+ `col_805` tinyint(1) default NULL,
+ `col_806` tinyint(1) default NULL,
+ `col_807` tinyint(1) default NULL,
+ `col_808` tinyint(1) default NULL,
+ `col_809` tinyint(1) default NULL,
+ `col_810` tinyint(1) default NULL,
+ `col_811` tinyint(1) default NULL,
+ `col_812` tinyint(1) default NULL,
+ `col_813` tinyint(1) default NULL,
+ `col_814` tinyint(1) default NULL,
+ `col_815` tinyint(1) default NULL,
+ `col_816` tinyint(1) default NULL,
+ `col_817` tinyint(1) default NULL,
+ `col_818` tinyint(1) default NULL,
+ `col_819` tinyint(1) default NULL,
+ `col_820` tinyint(1) default NULL,
+ `col_821` tinyint(1) default NULL,
+ `col_822` tinyint(1) default NULL,
+ `col_823` tinyint(1) default NULL,
+ `col_824` tinyint(1) default NULL,
+ `col_825` tinyint(1) default NULL,
+ `col_826` tinyint(1) default NULL,
+ `col_827` tinyint(1) default NULL,
+ `col_828` tinyint(1) default NULL,
+ `col_829` tinyint(1) default NULL,
+ `col_830` tinyint(1) default NULL,
+ `col_831` tinyint(1) default NULL,
+ `col_832` tinyint(1) default NULL,
+ `col_833` tinyint(1) default NULL,
+ `col_834` tinyint(1) default NULL,
+ `col_835` tinyint(1) default NULL,
+ `col_836` tinyint(1) default NULL,
+ `col_837` tinyint(1) default NULL,
+ `col_838` tinyint(1) default NULL,
+ `col_839` tinyint(1) default NULL,
+ `col_840` tinyint(1) default NULL,
+ `col_841` tinyint(1) default NULL,
+ `col_842` tinyint(1) default NULL,
+ `col_843` tinyint(1) default NULL,
+ `col_844` tinyint(1) default NULL,
+ `col_845` tinyint(1) default NULL,
+ `col_846` tinyint(1) default NULL,
+ `col_847` tinyint(1) default NULL,
+ `col_848` tinyint(1) default NULL,
+ `col_849` tinyint(1) default NULL,
+ `col_850` tinyint(1) default NULL,
+ `col_851` tinyint(1) default NULL,
+ `col_852` tinyint(1) default NULL,
+ `col_853` tinyint(1) default NULL,
+ `col_854` tinyint(1) default NULL,
+ `col_855` tinyint(1) default NULL,
+ `col_856` tinyint(1) default NULL,
+ `col_857` tinyint(1) default NULL,
+ `col_858` tinyint(1) default NULL,
+ `col_859` tinyint(1) default NULL,
+ `col_860` tinyint(1) default NULL,
+ `col_861` tinyint(1) default NULL,
+ `col_862` tinyint(1) default NULL,
+ `col_863` tinyint(1) default NULL,
+ `col_864` tinyint(1) default NULL,
+ `col_865` tinyint(1) default NULL,
+ `col_866` tinyint(1) default NULL,
+ `col_867` tinyint(1) default NULL,
+ `col_868` tinyint(1) default NULL,
+ `col_869` tinyint(1) default NULL,
+ `col_870` tinyint(1) default NULL,
+ `col_871` tinyint(1) default NULL,
+ `col_872` tinyint(1) default NULL,
+ `col_873` tinyint(1) default NULL,
+ `col_874` tinyint(1) default NULL,
+ `col_875` tinyint(1) default NULL,
+ `col_876` tinyint(1) default NULL,
+ `col_877` tinyint(1) default NULL,
+ `col_878` tinyint(1) default NULL,
+ `col_879` tinyint(1) default NULL,
+ `col_880` tinyint(1) default NULL,
+ `col_881` tinyint(1) default NULL,
+ `col_882` tinyint(1) default NULL,
+ `col_883` tinyint(1) default NULL,
+ `col_884` tinyint(1) default NULL,
+ `col_885` tinyint(1) default NULL,
+ `col_886` tinyint(1) default NULL,
+ `col_887` tinyint(1) default NULL,
+ `col_888` tinyint(1) default NULL,
+ `col_889` tinyint(1) default NULL,
+ `col_890` tinyint(1) default NULL,
+ `col_891` tinyint(1) default NULL,
+ `col_892` tinyint(1) default NULL,
+ `col_893` tinyint(1) default NULL,
+ `col_894` tinyint(1) default NULL,
+ `col_895` tinyint(1) default NULL,
+ `col_896` tinyint(1) default NULL,
+ `col_897` tinyint(1) default NULL,
+ `col_898` tinyint(1) default NULL,
+ `col_899` tinyint(1) default NULL,
+ `col_900` tinyint(1) default NULL,
+ `col_901` tinyint(1) default NULL,
+ `col_902` tinyint(1) default NULL,
+ `col_903` tinyint(1) default NULL,
+ `col_904` tinyint(1) default NULL,
+ `col_905` tinyint(1) default NULL,
+ `col_906` tinyint(1) default NULL,
+ `col_907` tinyint(1) default NULL,
+ `col_908` tinyint(1) default NULL,
+ `col_909` tinyint(1) default NULL,
+ `col_910` tinyint(1) default NULL,
+ `col_911` tinyint(1) default NULL,
+ `col_912` tinyint(1) default NULL,
+ `col_913` tinyint(1) default NULL,
+ `col_914` tinyint(1) default NULL,
+ `col_915` tinyint(1) default NULL,
+ `col_916` tinyint(1) default NULL,
+ `col_917` tinyint(1) default NULL,
+ `col_918` tinyint(1) default NULL,
+ `col_919` tinyint(1) default NULL,
+ `col_920` tinyint(1) default NULL,
+ `col_921` tinyint(1) default NULL,
+ `col_922` tinyint(1) default NULL,
+ `col_923` tinyint(1) default NULL,
+ `col_924` tinyint(1) default NULL,
+ `col_925` tinyint(1) default NULL,
+ `col_926` tinyint(1) default NULL,
+ `col_927` tinyint(1) default NULL,
+ `col_928` tinyint(1) default NULL,
+ `col_929` tinyint(1) default NULL,
+ `col_930` tinyint(1) default NULL,
+ `col_931` tinyint(1) default NULL,
+ `col_932` tinyint(1) default NULL,
+ `col_933` tinyint(1) default NULL,
+ `col_934` tinyint(1) default NULL,
+ `col_935` tinyint(1) default NULL,
+ `col_936` tinyint(1) default NULL,
+ `col_937` tinyint(1) default NULL,
+ `col_938` tinyint(1) default NULL,
+ `col_939` tinyint(1) default NULL,
+ `col_940` tinyint(1) default NULL,
+ `col_941` tinyint(1) default NULL,
+ `col_942` tinyint(1) default NULL,
+ `col_943` tinyint(1) default NULL,
+ `col_944` tinyint(1) default NULL,
+ `col_945` tinyint(1) default NULL,
+ `col_946` tinyint(1) default NULL,
+ `col_947` tinyint(1) default NULL,
+ `col_948` tinyint(1) default NULL,
+ `col_949` tinyint(1) default NULL,
+ `col_950` tinyint(1) default NULL,
+ `col_951` tinyint(1) default NULL,
+ `col_952` tinyint(1) default NULL,
+ `col_953` tinyint(1) default NULL,
+ `col_954` tinyint(1) default NULL,
+ `col_955` tinyint(1) default NULL,
+ `col_956` tinyint(1) default NULL,
+ `col_957` tinyint(1) default NULL,
+ `col_958` tinyint(1) default NULL,
+ `col_959` tinyint(1) default NULL,
+ `col_960` tinyint(1) default NULL,
+ `col_961` tinyint(1) default NULL,
+ `col_962` tinyint(1) default NULL,
+ `col_963` tinyint(1) default NULL,
+ `col_964` tinyint(1) default NULL,
+ `col_965` tinyint(1) default NULL,
+ `col_966` tinyint(1) default NULL,
+ `col_967` tinyint(1) default NULL,
+ `col_968` tinyint(1) default NULL,
+ `col_969` tinyint(1) default NULL,
+ `col_970` tinyint(1) default NULL,
+ `col_971` tinyint(1) default NULL,
+ `col_972` tinyint(1) default NULL,
+ `col_973` tinyint(1) default NULL,
+ `col_974` tinyint(1) default NULL,
+ `col_975` tinyint(1) default NULL,
+ `col_976` tinyint(1) default NULL,
+ `col_977` tinyint(1) default NULL,
+ `col_978` tinyint(1) default NULL,
+ `col_979` tinyint(1) default NULL,
+ `col_980` tinyint(1) default NULL,
+ `col_981` tinyint(1) default NULL,
+ `col_982` tinyint(1) default NULL,
+ `col_983` tinyint(1) default NULL,
+ `col_984` tinyint(1) default NULL,
+ `col_985` tinyint(1) default NULL,
+ `col_986` tinyint(1) default NULL,
+ `col_987` tinyint(1) default NULL,
+ `col_988` tinyint(1) default NULL,
+ `col_989` tinyint(1) default NULL,
+ `col_990` tinyint(1) default NULL,
+ `col_991` tinyint(1) default NULL,
+ `col_992` tinyint(1) default NULL,
+ `col_993` tinyint(1) default NULL,
+ `col_994` tinyint(1) default NULL,
+ `col_995` tinyint(1) default NULL,
+ `col_996` tinyint(1) default NULL,
+ `col_997` tinyint(1) default NULL,
+ `col_998` tinyint(1) default NULL,
+ `col_999` tinyint(1) default NULL,
+ `col_1000` tinyint(1) default NULL,
+ `col_1001` tinyint(1) default NULL,
+ `col_1002` tinyint(1) default NULL,
+ `col_1003` tinyint(1) default NULL,
+ `col_1004` tinyint(1) default NULL,
+ `col_1005` tinyint(1) default NULL,
+ `col_1006` tinyint(1) default NULL,
+ `col_1007` tinyint(1) default NULL,
+ `col_1008` tinyint(1) default NULL,
+ `col_1009` tinyint(1) default NULL,
+ `col_1010` tinyint(1) default NULL,
+ `col_1011` tinyint(1) default NULL,
+ `col_1012` tinyint(1) default NULL,
+ `col_1013` tinyint(1) default NULL,
+ `col_1014` tinyint(1) default NULL,
+ `col_1015` tinyint(1) default NULL,
+ `col_1016` tinyint(1) default NULL,
+ `col_1017` tinyint(1) default NULL,
+ `col_1018` tinyint(1) default NULL,
+ `col_1019` tinyint(1) default NULL,
+ `col_1020` tinyint(1) default NULL,
+ `col_1021` tinyint(1) default NULL,
+ `col_1022` tinyint(1) default NULL,
+ `col_1023` tinyint(1) default NULL,
+ `col_1024` tinyint(1) default NULL,
+ `col_1025` tinyint(1) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+--enable_query_log
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+INSERT INTO t1 VALUES();
+SELECT COUNT(*) FROM v1;
+
+--exec $MYSQL_DUMP --allow-keywords --single-transaction --quick --verbose test --result-file $MYSQLTEST_VARDIR/tmp/bug31434.sql
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug31434.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/bug31434.sql
+
+SELECT COUNT(*) FROM v1;
+
+DROP VIEW v1;
+DROP TABLE t1;
+
+SET GLOBAL storage_engine=@old_engine;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 25cda449abf..de5abdd7c9d 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -5,6 +5,14 @@
# Binlog is required
--source include/have_log_bin.inc
+
+--echo Bug#37938 - Test "mysqldump" lacks various insert statements
+--echo Turn off concurrent inserts to avoid random errors
+--echo NOTE: We reset the variable back to saved value at the end of test
+SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT;
+SET @@GLOBAL.CONCURRENT_INSERT = 0;
+
+
--disable_warnings
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
drop database if exists mysqldump_test_db;
@@ -1593,6 +1601,7 @@ DROP TABLE t1,t2;
--replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/
--exec $MYSQL_DUMP test
+
--echo #
--echo # End of 5.0 tests
--echo #
@@ -1859,6 +1868,10 @@ DROP DATABASE mysqldump_test_db;
--echo # -- End of test case for Bug#32538.
--echo
+# We reset concurrent_inserts value to whatever it was at the start of the test
+SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
+
+
###########################################################################
--echo #
diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test
index 064aaa4612e..57399e16bef 100644
--- a/mysql-test/t/outfile.test
+++ b/mysql-test/t/outfile.test
@@ -31,13 +31,13 @@ select load_file(concat(@tmpdir,"/outfile-test.3"));
# the following should give errors
disable_query_log;
---error 1086
+--error ER_FILE_EXISTS_ERROR
eval select * into outfile "../../tmp/outfile-test.1" from t1;
---error 1086
+--error ER_FILE_EXISTS_ERROR
eval select * into dumpfile "../../tmp/outfile-test.2" from t1;
---error 1086
+--error ER_FILE_EXISTS_ERROR
eval select * into dumpfile "../../tmp/outfile-test.3" from t1;
enable_query_log;
select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
@@ -92,7 +92,7 @@ use test;
# It should not be possible to write to a file outside of vardir
create table t1(a int);
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---error 1290
+--error ER_OPTION_PREVENTS_STATEMENT
eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1;
drop table t1;
@@ -105,7 +105,7 @@ create user user_1@localhost;
grant all on mysqltest.* to user_1@localhost;
connect (con28181_1,localhost,user_1,,mysqltest);
---error 1044
+--error ER_DBACCESS_DENIED_ERROR
eval select schema_name
into outfile "../../tmp/outfile-test.4"
fields terminated by ',' optionally enclosed by '"'
@@ -125,7 +125,7 @@ from information_schema.schemata
where schema_name like 'mysqltest';
connection default;
---exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4
+--remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4
use test;
revoke all privileges on *.* from user_1@localhost;
drop user user_1@localhost;
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 5270eced05f..83e0cde8991 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -1589,13 +1589,15 @@ drop table t;
#
USE mysql;
+TRUNCATE TABLE general_log;
+SET @old_general_log_state = @@global.general_log;
SET GLOBAL general_log = 0;
ALTER TABLE general_log ENGINE = MyISAM;
--error ER_WRONG_USAGE
ALTER TABLE general_log PARTITION BY RANGE (TO_DAYS(event_time))
(PARTITION p0 VALUES LESS THAN (733144), PARTITION p1 VALUES LESS THAN (3000000));
ALTER TABLE general_log ENGINE = CSV;
-SET GLOBAL general_log = default;
+SET GLOBAL general_log = @old_general_log_state;
use test;
#
@@ -1791,4 +1793,76 @@ select count(*) from t1, t2 where t1.createdDate = t2.createdDate;
drop table t1, t2;
+#
+# Bug #38083 Error-causing row inserted into partitioned table despite error
+#
+SET @orig_sql_mode = @@SQL_MODE;
+SET SQL_MODE='STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO';
+CREATE TABLE t1 (c1 INT)
+ PARTITION BY LIST(1 DIV c1) (
+ PARTITION p0 VALUES IN (NULL),
+ PARTITION p1 VALUES IN (1)
+ );
+
+-- error ER_DIVISION_BY_ZERO
+INSERT INTO t1 VALUES (0);
+SELECT * FROM t1;
+TRUNCATE t1;
+-- error ER_DIVISION_BY_ZERO
+INSERT INTO t1 VALUES (NULL), (0), (1), (2);
+SELECT * FROM t1;
+DROP TABLE t1;
+SET SQL_MODE= @orig_sql_mode;
+
+
+
+#
+# Bug #38005 Partitions: error with insert select
+#
+
+create table t1 (s1 int) partition by hash(s1) partitions 2;
+create index i on t1 (s1);
+insert into t1 values (1);
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1 order by s1 desc;
+select * from t1;
+drop table t1;
+
+create table t1 (s1 int) partition by range(s1)
+ (partition pa1 values less than (10),
+ partition pa2 values less than MAXVALUE);
+create index i on t1 (s1);
+insert into t1 values (1);
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1 order by s1 desc;
+select * from t1;
+drop table t1;
+
+create table t1 (s1 int) partition by range(s1)
+ (partition pa1 values less than (10),
+ partition pa2 values less than MAXVALUE);
+create index i on t1 (s1);
+insert into t1 values (20);
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1 order by s1 desc;
+select * from t1;
+drop table t1;
+
+create table t1 (s1 int) partition by range(s1)
+ (partition pa1 values less than (10),
+ partition pa2 values less than MAXVALUE);
+create index i on t1 (s1);
+insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8);
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1;
+insert into t1 select s1 from t1 order by s1 desc;
+insert into t1 select s1 from t1 where s1=3;
+select count(*) from t1;
+drop table t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test
index bc4231d1d71..c02d9049f2e 100644
--- a/mysql-test/t/partition_range.test
+++ b/mysql-test/t/partition_range.test
@@ -807,24 +807,24 @@ DROP TABLE t1;
#
# BUG#30573: get wrong result with "group by" on PARTITIONed table
#
-#create table t1 (a int);
-#insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-#CREATE TABLE t2 (
-# defid int(10) unsigned NOT NULL,
-# day int(10) unsigned NOT NULL,
-# count int(10) unsigned NOT NULL,
-# filler char(200),
-# KEY (defid,day)
-#)
-#PARTITION BY RANGE (day) (
-# PARTITION p7 VALUES LESS THAN (20070401) ,
-# PARTITION p8 VALUES LESS THAN (20070501));
-
-#insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B;
-#insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B;
-#insert into t2 values(52, 20070321, 123, 'filler') ;
-#insert into t2 values(52, 20070322, 456, 'filler') ;
-
-#select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid;
-#drop table t1, t2;
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t2 (
+ defid int(10) unsigned NOT NULL,
+ day int(10) unsigned NOT NULL,
+ count int(10) unsigned NOT NULL,
+ filler char(200),
+ KEY (defid,day)
+)
+PARTITION BY RANGE (day) (
+ PARTITION p7 VALUES LESS THAN (20070401) ,
+ PARTITION p8 VALUES LESS THAN (20070501));
+
+insert into t2 select 20, 20070311, 1, 'filler' from t1 A, t1 B;
+insert into t2 select 20, 20070411, 1, 'filler' from t1 A, t1 B;
+insert into t2 values(52, 20070321, 123, 'filler') ;
+insert into t2 values(52, 20070322, 456, 'filler') ;
+
+select sum(count) from t2 ch where ch.defid in (50,52) and ch.day between 20070320 and 20070401 group by defid;
+drop table t1, t2;
diff --git a/mysql-test/t/slow_launch_time_func.test b/mysql-test/t/slow_launch_time_func.test
index fe8d1ba4c02..c9a7d28bb8a 100644
--- a/mysql-test/t/slow_launch_time_func.test
+++ b/mysql-test/t/slow_launch_time_func.test
@@ -1,6 +1,6 @@
-############# mysql-test\t\SLOW_LAUNCH_time_func.test ##########################
+############# mysql-test\t\slow_launch_time_func.test ##########################
# #
-# Variable Name: slow_launch_time #
+# Variable Name: slow_launch_time #
# Scope: SESSION #
# Access Type: Dynamic #
# Data Type: NUMERIC #
@@ -9,14 +9,20 @@
# #
# #
# Creation Date: 2008-03-02 #
-# Author: Sharique Abdullah #
+# Author: Sharique Abdullah #
+# #
+# Last change: 2008-09-09 mleich Reimplementation of this test #
+# - Fix Bug#36874 : main.slow_launch_time_func test fails #
+# randomly #
+# - Fix other failures and streamline the test #
# #
# Description: Test Cases of Dynamic System Variable "slow_launch_time " #
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
-#Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#
-# option_mysqld_slow_launch_time #
+# Reference: #
+# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
+# option_mysqld_slow_launch_time #
# #
################################################################################
@@ -28,82 +34,71 @@
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
+--echo ** Connection default **
+connection default;
--echo '#--------------------FN_DYNVARS_124_01-------------------------#'
-#####################################
-# Increase number of connection #
-#####################################
-
---echo ** Connection default **
-connection default;
+########################################################################
+# Reveal that a new connect gets counted as "slow launched thread" if #
+# @@GLOBAL.slow_launch_time = 0. #
+# The value of slow_launch_threads must be increased by 1. #
+########################################################################
SET @@GLOBAL.slow_launch_time=0;
SELECT @@GLOBAL.slow_launch_time;
---echo ** Connecting conn5 using username 'root' **
-CONNECT (conn5,localhost,root,,);
---echo ** Connecting conn6 using username 'root' **
-CONNECT (conn6,localhost,root,,);
---echo ** Connecting conn7 using username 'root' **
-CONNECT (conn7,localhost,root,,);
---echo ** Connecting conn8 using username 'root' **
-CONNECT (conn8,localhost,root,,);
---echo ** Connecting conn9 using username 'root' **
-CONNECT (conn9,localhost,root,,);
---echo ** Connecting conn10 using username 'root' **
-CONNECT (conn10,localhost,root,,);
---echo ** Connecting conn11 using username 'root' **
-CONNECT (conn11,localhost,root,,);
---echo ** Connecting conn12 using username 'root' **
-CONNECT (conn12,localhost,root,,);
---echo ** Connecting conn13 using username 'root' **
-CONNECT (conn13,localhost,root,,);
---echo ** Connecting conn14 using username 'root' **
-CONNECT (conn14,localhost,root,,);
---echo ** Connecting conn15 using username 'root' **
-CONNECT (conn15,localhost,root,,);
---echo ** Connecting conn16 using username 'root' **
-CONNECT (conn16,localhost,root,,);
+let $value_before=
+ query_get_value(show status like 'slow_launch_threads', Value, 1);
+--echo ** Connecting conn1 using username 'root' **
+CONNECT (conn1,localhost,root,,);
+let $value_after=
+ query_get_value(show status like 'slow_launch_threads', Value, 1);
+if (!`SELECT $value_after = $value_before + 1`)
+{
+ --echo ERROR: Subtest FN_DYNVARS_124_01 failed
+ --echo A new connect should be counted as 'slow_launch_thread' if
+ --echo @@GLOBAL.slow_launch_time=0
+ SELECT @@GLOBAL.slow_launch_time;
+ echo Number of slow_launch_threads before new connect: $value_before;
+ echo Number of slow_launch_threads after new connect: $value_after;
+}
+--echo ** Switch to connection default and disconnect conn1 **
+connection default;
+disconnect conn1;
+
+--echo '#--------------------FN_DYNVARS_124_02-------------------------#'
+########################################################################
+# Reveal that a new connect gets not counted as "slow launched thread" #
+# if @@GLOBAL.slow_launch_time is sufficient big. #
+# The value of slow_launch_threads must not change. #
+########################################################################
-#
-# Checking status of slow_launch_threads
-#
+SET @@GLOBAL.slow_launch_time= 1000;
+SELECT @@GLOBAL.slow_launch_time;
-show status like 'slow_launch_threads';
---echo 12 Expected
+let $value_before=
+ query_get_value(show status like 'slow_launch_threads', Value, 1);
+--echo ** Connecting conn2 using username 'root' **
+CONNECT (conn2,localhost,root,,);
+let $value_after=
+ query_get_value(show status like 'slow_launch_threads', Value, 1);
+if (!`SELECT $value_after = $value_before`)
+{
+ --echo ERROR: Subtest FN_DYNVARS_124_02 failed
+ --echo A new connect must not be counted as 'slow_launch_thread' if
+ --echo @@GLOBAL.slow_launch_time is sufficient big.
+ SELECT @@GLOBAL.slow_launch_time;
+ echo Number of slow_launch_threads before new connect: $value_before;
+ echo Number of slow_launch_threads after new connect: $value_after;
+}
#
# Cleanup
#
---echo ** Connection default **
+--echo ** Switch to connection default and disconnect conn2 **
connection default;
-
---echo ** Disconnecting conn5 **
-disconnect conn5;
---echo ** Disconnecting conn6 **
-disconnect conn6;
---echo ** Disconnecting conn7 **
-disconnect conn7;
---echo ** Disconnecting conn8 **
-disconnect conn8;
---echo ** Disconnecting conn9 **
-disconnect conn9;
---echo ** Disconnecting conn10 **
-disconnect conn10;
---echo ** Disconnecting conn11 **
-disconnect conn11;
---echo ** Disconnecting conn12 **
-disconnect conn12;
---echo ** Disconnecting conn13 **
-disconnect conn13;
---echo ** Disconnecting conn14 **
-disconnect conn14;
---echo ** Disconnecting conn15 **
-disconnect conn15;
---echo ** Disconnecting conn16 **
-disconnect conn16;
-
+disconnect conn2;
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index f48901bfd5f..8d7c6d75a34 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -2366,6 +2366,14 @@ begin
end loop;
end|
+CREATE TABLE t1 (a INT)|
+INSERT INTO t1 VALUES (1),(2)|
+CREATE PROCEDURE p1(a INT) BEGIN END|
+--error ER_SUBQUERY_NO_1_ROW
+CALL p1((SELECT * FROM t1))|
+DROP PROCEDURE IF EXISTS p1|
+DROP TABLE t1|
+
delimiter ;|
#
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index d7ed5f82b6d..a8727fbb1b7 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -8023,6 +8023,24 @@ drop function f1;
drop view v1;
drop table t1;
+#
+# Bug#38469 invalid memory read and/or crash with utf8 text field, stored procedure, uservar
+#
+delimiter $;
+--disable_warnings
+drop procedure if exists `p2` $
+--enable_warnings
+create procedure `p2`(in `a` text charset utf8)
+begin
+ declare `pos` int default 1;
+ declare `str` text charset utf8;
+ set `str` := `a`;
+ select substr(`str`, `pos`+ 1 ) into `str`;
+end $
+delimiter ;$
+call `p2`('s s s s s s');
+drop procedure `p2`;
+
--echo # ------------------------------------------------------------------
--echo # -- End of 5.0 tests
--echo # ------------------------------------------------------------------
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 8bd9ee26b26..bc241423417 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -4,6 +4,11 @@
# embedded server causes different stat
-- source include/not_embedded.inc
+# Disable concurrent inserts to avoid sporadic test failures as it might
+# affect the the value of variables used throughout the test case.
+set @old_concurrent_insert= @@global.concurrent_insert;
+set @@global.concurrent_insert= 0;
+
# PS causes different statistics
--disable_ps_protocol
@@ -12,54 +17,45 @@ connect (con2,localhost,root,,);
flush status;
-# Logging to the general query log table (--log-output=table --log) increments
-# Table_locks_immediate with each query, so here Immediate becomes 1
show status like 'Table_lock%';
-# ++Immediate = 2
select * from information_schema.session_status where variable_name like 'Table_lock%';
connection con1;
-# ++Immediate = 3
-SET SQL_LOG_BIN=0;
-set @old_general_log = @@global.general_log;
+--echo # Switched to connection: con1
+set sql_log_bin=0;
+set @old_general_log = @@global.general_log;
set global general_log = 'OFF';
--disable_warnings
-# ++Immediate = 4
drop table if exists t1;
--enable_warnings
-# ++Immediate = 5
create table t1(n int) engine=myisam;
-# Immediate + 2 = 7
insert into t1 values(1);
+# Execute dummy select in order to ensure that tables used in the
+# previous statement are unlocked and closed.
+select 1;
connection con2;
-# Immediate + 2 = 9
+--echo # Switched to connection: con2
lock tables t1 read;
-# ++Immediate = 10
unlock tables;
-# Immediate + 2 = 12
lock tables t1 read;
connection con1;
-# ++Immediate = 13
+--echo # Switched to connection: con1
let $ID= `select connection_id()`;
-# ++Immediate = 14 (Not +2, because this increments Table_locks_waited)
---send
-update t1 set n = 3;
+--send update t1 set n = 3
connection con2;
+--echo # Switched to connection: con2
# wait for the other query to start executing
let $wait_condition= select 1 from INFORMATION_SCHEMA.PROCESSLIST where ID = $ID and STATE = "Locked";
-# Immediate = 14 + $wait_condition_reps ($wait_timeout is 0, so no extra select
-# is done inside wait_condition.inc)
--source include/wait_condition.inc
-# ++Immediate = 15 + $wait_condition_reps
unlock tables;
connection con1;
+--echo # Switched to connection: con1
reap;
-# ++Immediate = 16 + $wait_condition_reps
show status like 'Table_locks_waited';
drop table t1;
set global general_log = @old_general_log;
@@ -67,6 +63,7 @@ set global general_log = @old_general_log;
disconnect con2;
disconnect con1;
connection default;
+--echo # Switched to connection: default
# End of 4.1 tests
@@ -295,3 +292,7 @@ drop database db37908;
drop procedure proc37908;
drop function func37908;
# End of 5.1 tests
+
+# Restore global concurrent_insert value. Keep in the end of the test file.
+--connection default
+set @@global.concurrent_insert= @old_concurrent_insert;
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 3001775f204..b1186b7438b 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -74,12 +74,12 @@ create database mysqltest;
create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist";
# temporarily disabled as it returns different result in the embedded server
-# --error 1210, 1210
+# --error ER_WRONG_ARGUMENTS, ER_WRONG_ARGUMENTS
# create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path";
# Should fail becasue the file t9.MYI already exist in 'run'
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---error 1,1,1105
+--error 1,1,ER_UNKNOWN_ERROR
eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run";
# Should fail becasue the file t9.MYD already exist in 'tmp'
@@ -197,22 +197,22 @@ DROP TABLE t1;
#
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
---error 1210
+--error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
INDEX DIRECTORY='$MYSQLD_DATADIR/mysql';
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
---error 1210
+--error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
DATA DIRECTORY='$MYSQLD_DATADIR/test';
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
---error 1210
+--error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
DATA DIRECTORY='$MYSQLD_DATADIR/';
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
---error 1210
+--error ER_WRONG_ARGUMENTS
eval CREATE TABLE t1(a INT)
INDEX DIRECTORY='$MYSQLD_DATADIR';
@@ -220,6 +220,7 @@ INDEX DIRECTORY='$MYSQLD_DATADIR';
--error 1
eval CREATE TABLE t1(a INT)
INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var';
+
# BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is
# silently ignored
#
diff --git a/mysql-test/t/trigger-trans.test b/mysql-test/t/trigger-trans.test
index 5db5b982773..4d6e82dedcb 100644
--- a/mysql-test/t/trigger-trans.test
+++ b/mysql-test/t/trigger-trans.test
@@ -162,3 +162,18 @@ DROP TABLE t2, t1;
--echo End of 5.0 tests
+
+--echo BUG#31612
+--echo Trigger fired multiple times leads to gaps in auto_increment sequence
+create table t1 (a int, val char(1)) engine=InnoDB;
+create table t2 (b int auto_increment primary key,
+ val char(1)) engine=InnoDB;
+create trigger t1_after_insert after
+ insert on t1 for each row insert into t2 set val=NEW.val;
+insert into t1 values ( 123, 'a'), ( 123, 'b'), ( 123, 'c'),
+ (123, 'd'), (123, 'e'), (123, 'f'), (123, 'g');
+insert into t1 values ( 654, 'a'), ( 654, 'b'), ( 654, 'c'),
+ (654, 'd'), (654, 'e'), (654, 'f'), (654, 'g');
+select * from t2 order by b;
+drop trigger t1_after_insert;
+drop table t1,t2;
diff --git a/mysql-test/t/tx_isolation_func.test b/mysql-test/t/tx_isolation_func.test
index 3a4167dc368..1fd2e323db8 100644
--- a/mysql-test/t/tx_isolation_func.test
+++ b/mysql-test/t/tx_isolation_func.test
@@ -75,10 +75,12 @@ INSERT INTO t1 VALUES(24, 24);
--echo ** Connection con0 **
connection con0;
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
+set binlog_format=mixed;
--echo ** Connection con1 **
connection con1;
SET SESSION tx_isolation = 'READ-UNCOMMITTED';
+set binlog_format=mixed;
#
# Testing WHERE on keys using IN clause
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index f2699ab03d3..5d916e410e3 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -263,4 +263,26 @@ from t1 order by score desc;
--enable_result_log
drop table t1;
+#
+# Bug#26020: User-Defined Variables are not consistent with columns data types
+#
+
+create table t1(b bigint);
+insert into t1 (b) values (10), (30), (10);
+set @var := 0;
+select if(b=@var, 999, b) , @var := b from t1 order by b;
+drop table t1;
+
+create temporary table t1 (id int);
+insert into t1 values (2), (3), (3), (4);
+set @lastid=-1;
+select @lastid != id, @lastid, @lastid := id from t1;
+drop table t1;
+
+create temporary table t1 (id bigint);
+insert into t1 values (2), (3), (3), (4);
+set @lastid=-1;
+select @lastid != id, @lastid, @lastid := id from t1;
+drop table t1;
+
--echo End of 5.1 tests