mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
auto-merge
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
# Some special cases with empty tables
|
||||
#
|
||||
|
||||
call mtr.add_suppression("The table 't1' is full");
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
@ -1000,4 +1000,50 @@ ALTER TABLE t1 MODIFY b ENUM('a', 'z', 'b', 'c') NOT NULL;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45567: Fast ALTER TABLE broken for enum and set
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a ENUM('a1','a2'));
|
||||
INSERT INTO t1 VALUES ('a1'),('a2');
|
||||
--enable_info
|
||||
--echo # No copy: No modification
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2');
|
||||
--echo # No copy: Add new enumeration to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a3');
|
||||
--echo # Copy: Modify and add new to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','xx','a5');
|
||||
--echo # Copy: Remove from the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','xx');
|
||||
--echo # Copy: Add new enumeration
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a0','xx');
|
||||
--echo # No copy: Add new enumerations to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a ENUM('a1','a2','a0','xx','a5','a6');
|
||||
--disable_info
|
||||
DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (a SET('a1','a2'));
|
||||
INSERT INTO t1 VALUES ('a1'),('a2');
|
||||
--enable_info
|
||||
--echo # No copy: No modification
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2');
|
||||
--echo # No copy: Add new to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a3');
|
||||
--echo # Copy: Modify and add new to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','xx','a5');
|
||||
--echo # Copy: Remove from the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','xx');
|
||||
--echo # Copy: Add new member
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx');
|
||||
--echo # No copy: Add new to the end
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx','a5','a6');
|
||||
--echo # Copy: Numerical incrase (pack lenght)
|
||||
ALTER TABLE t1 MODIFY COLUMN a SET('a1','a2','a0','xx','a5','a6','a7','a8','a9','a10');
|
||||
--disable_info
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -3,6 +3,9 @@
|
||||
--echo # sort_buffer_size cannot allocate
|
||||
--echo #
|
||||
|
||||
call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
|
||||
call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");
|
||||
|
||||
CREATE TABLE t1(a CHAR(255));
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
|
||||
|
2
mysql-test/t/bug46760-master.opt
Normal file
2
mysql-test/t/bug46760-master.opt
Normal file
@ -0,0 +1,2 @@
|
||||
--innodb-lock-wait-timeout=2
|
||||
--innodb-file-per-table
|
38
mysql-test/t/bug46760.test
Normal file
38
mysql-test/t/bug46760.test
Normal file
@ -0,0 +1,38 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46760: Fast ALTER TABLE no longer works for InnoDB
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--echo # By using --enable_info and verifying that number of affected
|
||||
--echo # rows is 0 we check that this ALTER TABLE is really carried
|
||||
--echo # out as "fast/online" operation, i.e. without full-blown data
|
||||
--echo # copying.
|
||||
--echo #
|
||||
--echo # I.e. info for the below statement should normally look like:
|
||||
--echo #
|
||||
--echo # affected rows: 0
|
||||
--echo # info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
||||
--enable_info
|
||||
ALTER TABLE t1 ALTER COLUMN a SET DEFAULT 10;
|
||||
--disable_info
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MySQL Bug#39200: optimize table does not recognize
|
||||
--echo # ROW_FORMAT=COMPRESSED
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) ROW_FORMAT=compressed;
|
||||
SHOW CREATE TABLE t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
@ -292,3 +292,47 @@ DROP TABLE t1;
|
||||
DROP FUNCTION f1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug#46958: Assertion in Diagnostics_area::set_ok_status, trigger,
|
||||
--echo # merge table
|
||||
--echo #
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
CREATE TABLE t3 ( a INT );
|
||||
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
INSERT INTO t3 VALUES (1), (2);
|
||||
|
||||
CREATE TRIGGER tr1 BEFORE DELETE ON t2
|
||||
FOR EACH ROW INSERT INTO no_such_table VALUES (1);
|
||||
|
||||
--error ER_NO_SUCH_TABLE
|
||||
DELETE t1, t2, t3 FROM t1, t2, t3;
|
||||
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
CREATE TABLE t1 ( a INT );
|
||||
CREATE TABLE t2 ( a INT );
|
||||
CREATE TABLE t3 ( a INT );
|
||||
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
INSERT INTO t3 VALUES (1), (2);
|
||||
|
||||
CREATE TRIGGER tr1 AFTER DELETE ON t2
|
||||
FOR EACH ROW INSERT INTO no_such_table VALUES (1);
|
||||
|
||||
--error ER_NO_SUCH_TABLE
|
||||
DELETE t1, t2, t3 FROM t1, t2, t3;
|
||||
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
@ -12,5 +12,5 @@
|
||||
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
|
||||
innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
|
||||
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
|
||||
init_connect : Bug#44920 2009-07-06 pcrews MTR not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug*
|
||||
|
||||
partition_innodb_builtin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes
|
||||
partition_innodb_plugin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes
|
||||
|
@ -1 +1 @@
|
||||
--log-slow-queries
|
||||
--log-output=table,file --log-slow-queries
|
||||
|
@ -478,3 +478,23 @@ INSERT INTO t2 SELECT c1 FROM t1;
|
||||
INSERT INTO t2 SELECT NULL FROM t1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
|
||||
# the index (PRIMARY)
|
||||
# This test requires a restart of the server
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
INSERT INTO t1 VALUES (null);
|
||||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
|
||||
SELECT * FROM t1;
|
||||
# Restart the server
|
||||
-- source include/restart_mysqld.inc
|
||||
# The MySQL and InnoDB data dictionaries should now be out of sync.
|
||||
# The select should print message to the error log
|
||||
SELECT * FROM t1;
|
||||
-- error ER_AUTOINC_READ_FAILED,1467
|
||||
INSERT INTO t1 VALUES(null);
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 3;
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
@ -407,6 +407,7 @@ SET GLOBAL myisam_data_pointer_size = 2;
|
||||
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
|
||||
call mtr.add_suppression("mysqld: The table '.*#sql.*' is full");
|
||||
--error ER_RECORD_FILE_FULL,ER_RECORD_FILE_FULL
|
||||
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||
|
||||
|
@ -729,4 +729,24 @@ SELECT * FROM t1 JOIN t2 ON b=c ORDER BY a;
|
||||
SELECT * FROM t1 JOIN t2 ON a=c ORDER BY a;
|
||||
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
|
||||
#
|
||||
# Bug#47150 Assertion in Field_long::val_int() on MERGE + TRIGGER + multi-table UPDATE
|
||||
#
|
||||
CREATE TABLE t1 (f1 int);
|
||||
|
||||
CREATE TABLE t2 (f1 int);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
CREATE VIEW v1 AS SELECT * FROM t2;
|
||||
|
||||
PREPARE stmt FROM 'UPDATE t2 AS A NATURAL JOIN v1 B SET B.f1 = 1';
|
||||
EXECUTE stmt;
|
||||
EXECUTE stmt;
|
||||
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -1 +1 @@
|
||||
--log-slow-queries
|
||||
--log-output=table,file --log-slow-queries
|
||||
|
@ -9,7 +9,7 @@
|
||||
--source include/have_case_insensitive_file_system.inc
|
||||
--source include/not_windows.inc
|
||||
|
||||
call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*");
|
||||
call mtr.add_suppression("Cannot find or open table test/BUG29839 from");
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,T1;
|
||||
|
@ -12,11 +12,11 @@ let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
drop table if exists t1;
|
||||
create table t1 (a int) engine=myisam;
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.MYI
|
||||
--error 1051,6
|
||||
--error ER_BAD_TABLE_ERROR,6
|
||||
drop table t1;
|
||||
create table t1 (a int) engine=myisam;
|
||||
--remove_file $MYSQLD_DATADIR/test/t1.MYD
|
||||
--error 1105,6,29
|
||||
--error ER_BAD_TABLE_ERROR,6,29
|
||||
drop table t1;
|
||||
--error 1051
|
||||
--error ER_BAD_TABLE_ERROR
|
||||
drop table t1;
|
||||
|
@ -1503,5 +1503,20 @@ SELECT h+0, d + 0, e, g + 0 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Test of BUG#35570 CHECKSUM TABLE unreliable if LINESTRING field
|
||||
--echo # (same content / differen checksum)
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (line LINESTRING NOT NULL) engine=myisam;
|
||||
INSERT INTO t1 VALUES (GeomFromText("POINT(0 0)"));
|
||||
checksum table t1;
|
||||
CREATE TABLE t2 (line LINESTRING NOT NULL) engine=myisam;
|
||||
INSERT INTO t2 VALUES (GeomFromText("POINT(0 0)"));
|
||||
checksum table t2;
|
||||
CREATE TABLE t3 select * from t1;
|
||||
checksum table t3;
|
||||
drop table t1,t2,t3;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
@ -853,16 +853,18 @@ while ($outer)
|
||||
eval SELECT '$outer = outer loop variable after dec' AS "";
|
||||
}
|
||||
|
||||
# Test source in an if in a while which is false on 1st iteration
|
||||
let $outer= 2; # Number of outer loops
|
||||
let $ifval= 0; # false 1st time
|
||||
while ($outer)
|
||||
{
|
||||
eval SELECT '$outer = outer loop variable after while' AS "";
|
||||
echo outer=$outer ifval=$ifval;
|
||||
|
||||
echo here is the sourced script;
|
||||
|
||||
eval SELECT '$outer = outer loop variable before dec' AS "";
|
||||
if ($ifval) {
|
||||
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||
}
|
||||
dec $outer;
|
||||
eval SELECT '$outer = outer loop variable after dec' AS "";
|
||||
inc $ifval;
|
||||
}
|
||||
|
||||
|
||||
@ -1663,6 +1665,20 @@ EOF
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||
|
||||
# Test append_file within while
|
||||
let $outer= 2; # Number of outer loops
|
||||
while ($outer)
|
||||
{
|
||||
append_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
|
||||
These lines should be repeated,
|
||||
if things work as expected
|
||||
EOF
|
||||
dec $outer;
|
||||
}
|
||||
|
||||
cat_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# test for cat_file
|
||||
# ----------------------------------------------------------------------------
|
||||
@ -1710,10 +1726,6 @@ EOF
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
|
||||
|
||||
# Write the below commands to a intermediary file and execute them with
|
||||
# mysqltest in --exec, since the output will vary depending on what "diff"
|
||||
# is available it is sent to /dev/null
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/diff.test
|
||||
# Compare files that differ in size
|
||||
--error 2
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp
|
||||
@ -1725,13 +1737,6 @@ EOF
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp
|
||||
--error 1
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
|
||||
exit;
|
||||
EOF
|
||||
|
||||
# Execute the above diffs, and send their output to /dev/null - only
|
||||
# interesting to see that it returns correct error codes
|
||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/diff.test > /dev/null 2>&1
|
||||
|
||||
|
||||
# Compare equal files, again...
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
|
||||
@ -1740,7 +1745,6 @@ EOF
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff.test
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
@ -15,7 +15,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
# Bug#39893: Crash if select on a partitioned table,
|
||||
# when partitioning is disabled
|
||||
FLUSH TABLES;
|
||||
--copy_file $MYSQLTEST_VARDIR/std_data_ln/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
|
||||
--copy_file $MYSQLTEST_VARDIR/std_data/parts/t1.frm $MYSQLD_DATADIR/test/t1.frm
|
||||
SELECT * FROM t1;
|
||||
TRUNCATE TABLE t1;
|
||||
ANALYZE TABLE t1;
|
||||
|
@ -10,6 +10,8 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_csv.inc
|
||||
|
||||
call mtr.add_suppression("Failed to write to mysql.general_log");
|
||||
|
||||
#
|
||||
# Bug#19307: Partitions: csv delete failure
|
||||
# = CSV engine crashes
|
||||
|
67
mysql-test/t/partition_innodb_builtin.test
Normal file
67
mysql-test/t/partition_innodb_builtin.test
Normal file
@ -0,0 +1,67 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_not_innodb_plugin.inc
|
||||
|
||||
#
|
||||
# Bug#32430 - show engine innodb status causes errors
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
PARTITION BY RANGE (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
(PARTITION `p0``\""e` VALUES LESS THAN (100)
|
||||
(SUBPARTITION `sp0``\""e`,
|
||||
SUBPARTITION `sp1``\""e`),
|
||||
PARTITION `p1``\""e` VALUES LESS THAN (MAXVALUE)
|
||||
(SUBPARTITION `sp2``\""e`,
|
||||
SUBPARTITION `sp3``\""e`));
|
||||
INSERT INTO `t``\""e` VALUES (0), (2), (6), (10), (14), (18), (22);
|
||||
START TRANSACTION;
|
||||
--echo # con1
|
||||
connect(con1,localhost,root,,);
|
||||
SET NAMES utf8;
|
||||
START TRANSACTION;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
UPDATE `t``\""e` SET a = 16 WHERE a = 0;
|
||||
--echo # con1
|
||||
connection con1;
|
||||
UPDATE `t``\""e` SET a = 8 WHERE a = 22;
|
||||
let $id_1= `SELECT CONNECTION_ID()`;
|
||||
SEND;
|
||||
UPDATE `t``\""e` SET a = 12 WHERE a = 0;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
let $wait_timeout= 2;
|
||||
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE ID = $id_1 AND STATE = 'Searching rows for update';
|
||||
--source include/wait_condition.inc
|
||||
#--echo # tested wait condition $wait_condition_reps times
|
||||
--error ER_LOCK_DEADLOCK
|
||||
UPDATE `t``\""e` SET a = 4 WHERE a = 22;
|
||||
--echo # First table reported in 'SHOW ENGINE InnoDB STATUS'
|
||||
# RECORD LOCKS space id 0 page no 50 n bits 80 index `PRIMARY` in \
|
||||
# Database `test`, Table `t1`, Partition `p0`, Subpartition `sp0` \
|
||||
# trx id 0 775
|
||||
# NOTE: replace_regex is very slow on match copy/past '(.*)' regex's
|
||||
# on big texts, removing a lot of text before + after makes it much faster.
|
||||
#/.*in (.*) trx.*/\1/
|
||||
--replace_regex /.*RECORD LOCKS space id [0-9]* page no [0-9]* n bits [0-9]* // / trx id .*// /.*index .* in //
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
set @old_sql_mode = @@sql_mode;
|
||||
set sql_mode = 'ANSI_QUOTES';
|
||||
# INNODB_LOCKS only exists in innodb_plugin
|
||||
#SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
|
||||
--replace_regex /.*RECORD LOCKS space id [0-9]* page no [0-9]* n bits [0-9]* // / trx id .*// /.*index .* in //
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
set @@sql_mode = @old_sql_mode;
|
||||
--echo # con1
|
||||
connection con1;
|
||||
REAP;
|
||||
ROLLBACK;
|
||||
disconnect con1;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
DROP TABLE `t``\""e`;
|
||||
SET NAMES DEFAULT;
|
75
mysql-test/t/partition_innodb_plugin.test
Normal file
75
mysql-test/t/partition_innodb_plugin.test
Normal file
@ -0,0 +1,75 @@
|
||||
--source include/have_partition.inc
|
||||
--source include/have_innodb.inc
|
||||
--source suite/innodb/include/have_innodb_plugin.inc
|
||||
|
||||
#
|
||||
# Bug#32430 - show engine innodb status causes errors
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
PARTITION BY RANGE (a)
|
||||
SUBPARTITION BY HASH (a)
|
||||
(PARTITION `p0``\""e` VALUES LESS THAN (100)
|
||||
(SUBPARTITION `sp0``\""e`,
|
||||
SUBPARTITION `sp1``\""e`),
|
||||
PARTITION `p1``\""e` VALUES LESS THAN (MAXVALUE)
|
||||
(SUBPARTITION `sp2``\""e`,
|
||||
SUBPARTITION `sp3``\""e`));
|
||||
INSERT INTO `t``\""e` VALUES (0), (2), (6), (10), (14), (18), (22);
|
||||
START TRANSACTION;
|
||||
--echo # con1
|
||||
connect(con1,localhost,root,,);
|
||||
SET NAMES utf8;
|
||||
START TRANSACTION;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
UPDATE `t``\""e` SET a = 16 WHERE a = 0;
|
||||
--echo # con1
|
||||
connection con1;
|
||||
UPDATE `t``\""e` SET a = 8 WHERE a = 22;
|
||||
let $id_1= `SELECT CONNECTION_ID()`;
|
||||
SEND;
|
||||
UPDATE `t``\""e` SET a = 12 WHERE a = 0;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
let $wait_timeout= 2;
|
||||
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE ID = $id_1 AND STATE = 'Searching rows for update';
|
||||
--source include/wait_condition.inc
|
||||
#--echo # tested wait condition $wait_condition_reps times
|
||||
# INNODB_LOCKS only exists in innodb_plugin
|
||||
--sorted_result
|
||||
SELECT lock_table, COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS
|
||||
GROUP BY lock_table;
|
||||
set @old_sql_mode = @@sql_mode;
|
||||
set sql_mode = 'ANSI_QUOTES';
|
||||
--sorted_result
|
||||
SELECT lock_table, COUNT(*) FROM INFORMATION_SCHEMA.INNODB_LOCKS
|
||||
GROUP BY lock_table;
|
||||
set @@sql_mode = @old_sql_mode;
|
||||
--error ER_LOCK_DEADLOCK
|
||||
UPDATE `t``\""e` SET a = 4 WHERE a = 22;
|
||||
--echo # First table reported in 'SHOW ENGINE InnoDB STATUS'
|
||||
# RECORD LOCKS space id 0 page no 50 n bits 80 index `PRIMARY` in \
|
||||
# Database `test`, Table `t1`, Partition `p0`, Subpartition `sp0` \
|
||||
# trx id 0 775
|
||||
# NOTE: replace_regex is very slow on match copy/past '(.*)' regex's
|
||||
# on big texts, removing a lot of text before + after makes it much faster.
|
||||
#/.*in (.*) trx.*/\1/
|
||||
--replace_regex /.*RECORD LOCKS space id [0-9]* page no [0-9]* n bits [0-9]* // / trx id .*// /.*index .* in //
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
set @old_sql_mode = @@sql_mode;
|
||||
set sql_mode = 'ANSI_QUOTES';
|
||||
--replace_regex /.*RECORD LOCKS space id [0-9]* page no [0-9]* n bits [0-9]* // / trx id .*// /.*index .* in //
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
set @@sql_mode = @old_sql_mode;
|
||||
--echo # con1
|
||||
connection con1;
|
||||
REAP;
|
||||
ROLLBACK;
|
||||
disconnect con1;
|
||||
--echo # default connection
|
||||
connection default;
|
||||
DROP TABLE `t``\""e`;
|
||||
SET NAMES DEFAULT;
|
@ -1 +1 @@
|
||||
--log-slow-queries --log-long-format --log-queries-not-using-indexes
|
||||
--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes
|
||||
|
@ -1 +1 @@
|
||||
--log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover=""
|
||||
--log-output=table,file --log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover=""
|
||||
|
1
mysql-test/t/status-master.opt
Normal file
1
mysql-test/t/status-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--log-output=table,file
|
@ -28,5 +28,37 @@ SELECT 1;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #47106: Crash / segfault on adding EXPLAIN to a non-crashing
|
||||
--echo # query
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b INT,
|
||||
PRIMARY KEY (a),
|
||||
KEY b (b)
|
||||
);
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 1);
|
||||
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
|
||||
CREATE TABLE t3 LIKE t1;
|
||||
INSERT INTO t3 SELECT * FROM t1;
|
||||
|
||||
--echo # Should not crash.
|
||||
--echo # Should have 1 impossible where and 2 dependent subqs.
|
||||
EXPLAIN
|
||||
SELECT
|
||||
(SELECT 1 FROM t1,t2 WHERE t2.b > t3.b)
|
||||
FROM t3 WHERE 1 = 0 GROUP BY 1;
|
||||
|
||||
--echo # should return 0 rows
|
||||
SELECT
|
||||
(SELECT 1 FROM t1,t2 WHERE t2.b > t3.b)
|
||||
FROM t3 WHERE 1 = 0 GROUP BY 1;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
@ -124,6 +124,8 @@ with_check_option=0
|
||||
timestamp=2009-04-10 11:53:37
|
||||
create-version=1
|
||||
source=select f1 from `a-b-c`.t1 a, information_schema.tables b\nwhere a.f1 = b.table_name
|
||||
client_cs_name=utf8
|
||||
connection_cl_name=utf8_general_ci
|
||||
EOF
|
||||
|
||||
show databases like '%a-b-c%';
|
||||
|
@ -92,3 +92,9 @@ execute abc;
|
||||
execute abc;
|
||||
deallocate prepare abc;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45498: Socket variable not available on Windows
|
||||
--echo #
|
||||
|
||||
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME = 'socket';
|
||||
|
Reference in New Issue
Block a user