summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-12-16 18:44:17 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-12-16 18:44:17 +0200
commitc6b904abf8a139a3b95c9825cc7c53fd8f1a6fd0 (patch)
treea0d8f4957cf9d256a3cc3445c7db25384f97e249 /mysql-test/t
parent28a5059a92707e009aada358bf103fa386ea7c2c (diff)
parent3d799bdffd04beba3dad4f1ece915104b0284157 (diff)
downloadmariadb-git-c6b904abf8a139a3b95c9825cc7c53fd8f1a6fd0.tar.gz
merge mysql-5.5->mysql-5.5-bugteam
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/ctype_latin1.test8
-rw-r--r--mysql-test/t/ctype_ujis.test7
-rw-r--r--mysql-test/t/ctype_utf8.test13
-rw-r--r--mysql-test/t/date_formats.test16
-rw-r--r--mysql-test/t/fulltext.test3
-rw-r--r--mysql-test/t/func_misc.test22
-rw-r--r--mysql-test/t/lock_sync.test59
-rw-r--r--mysql-test/t/mysqltest.test2
-rw-r--r--mysql-test/t/partition_innodb.test2
-rw-r--r--mysql-test/t/partition_innodb_plugin.test67
-rw-r--r--mysql-test/t/sp-destruct.test27
-rw-r--r--mysql-test/t/truncate_coverage.test54
-rw-r--r--mysql-test/t/type_date.test8
-rw-r--r--mysql-test/t/xml.test14
14 files changed, 300 insertions, 2 deletions
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 1733ee299d1..b8aae2eae40 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -128,6 +128,14 @@ select hex(cast(_ascii 0x7f as char(1) character set latin1));
--echo End of 5.0 tests
+
+--echo #
+--echo # Bug#58022 ... like ... escape export_set ( ... ) crashes when export_set returns warnings
+--echo #
+SELECT '' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '');
+
+--echo End of 5.1 tests
+
--echo #
--echo # Start of 5.5 tests
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index 78701127ec3..4e1ee55e019 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1209,6 +1209,13 @@ DROP PROCEDURE sp1;
DROP TABLE t1;
DROP TABLE t2;
+--echo #
+--echo # Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
+--echo #
+SET NAMES utf8;
+SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
+
+
set names default;
set character_set_database=default;
set character_set_server=default;
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 4cd9a635e24..2aea21afe68 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1458,6 +1458,7 @@ SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
--echo End of 5.1 tests
+
--echo Start of 5.4 tests
#
@@ -1537,6 +1538,18 @@ DROP TABLE t1, t2;
SET NAMES utf8;
--source include/ctype_numconv.inc
+--echo #
+--echo # Bug#57687 crash when reporting duplicate group_key error and utf8
+--echo # Make sure to modify this when Bug#58081 is fixed.
+--echo #
+SET NAMES utf8;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
+--error ER_DUP_ENTRY
+SELECT COUNT(*) FROM t1, t1 t2
+GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
+DROP TABLE t1;
+
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index a83e18c44d9..669a66bc6c5 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -354,3 +354,19 @@ SELECT DATE_FORMAT("0000-02-28",'%W %d %M %Y') as valid_date;
SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date;
--echo "End of 5.0 tests"
+
+
+--echo #
+--echo # Start of 5.1 tests
+--echo #
+
+--echo #
+--echo # Bug#58005 utf8 + get_format causes failed assertion: !str || str != Ptr'
+--echo #
+SET NAMES utf8;
+SELECT LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)));
+SET NAMES latin1;
+
+--echo #
+--echo # End of 5.1 tests
+--echo #
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 8631932d5c0..db7d9fd2d08 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -600,7 +600,7 @@ DROP TABLE t1;
CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1));
INSERT INTO t1 VALUES ('test');
-
+--disable_warnings
SELECT 1 FROM t1 WHERE 1 >
ALL((SELECT 1 FROM t1 JOIN t1 a
ON (MATCH(t1.f1) against (""))
@@ -627,6 +627,7 @@ EXECUTE stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
+--enable_warnings
DROP TABLE t1;
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 31462d83c41..9257314013d 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -511,6 +511,19 @@ SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
DROP TABLE t1;
+
+#
+# Bug #57283: inet_ntoa() crashes
+#
+SELECT INET_NTOA(0);
+SELECT '1' IN ('1', INET_NTOA(0));
+
+
+--echo #
+--echo # End of 5.1 tests
+--echo #
+
+
--echo #
--echo # Bug #58199: name_const in the having clause crashes
--echo #
@@ -523,4 +536,11 @@ SELECT 1 from t1 HAVING NAME_CONST('', a);
DROP TABLE t1;
---echo End of tests
+
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+--echo #
+--echo # End of tests
+--echo #
diff --git a/mysql-test/t/lock_sync.test b/mysql-test/t/lock_sync.test
index 7131e2cde31..d5ad7becd7d 100644
--- a/mysql-test/t/lock_sync.test
+++ b/mysql-test/t/lock_sync.test
@@ -1078,6 +1078,65 @@ DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
+--echo #
+--echo # Bug#57130 crash in Item_field::print during SHOW CREATE TABLE or VIEW
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP VIEW IF EXISTS v1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+CREATE FUNCTION f1() RETURNS INTEGER RETURN 1;
+CREATE VIEW v1 AS SELECT * FROM t1 WHERE f1() = 1;
+DROP FUNCTION f1;
+connect(con2, localhost, root);
+
+--echo # Connection con1
+connect (con1, localhost, root);
+# Need to trigger this sync point at least twice in order to
+# get valgrind test failures without the patch
+SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR dropped EXECUTE 2';
+--echo # Sending:
+--send SHOW CREATE VIEW v1
+
+--echo # Connection con2
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+SET DEBUG_SYNC= 'now SIGNAL dropped';
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # Sending:
+--send FLUSH TABLES
+
+--echo # Connection default
+connection default;
+--echo # Waiting for FLUSH TABLES to be blocked.
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+--source include/wait_condition.inc
+SET DEBUG_SYNC= 'now SIGNAL dropped';
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: SHOW CREATE VIEW v1
+--reap
+
+--echo # Connection con2
+connection con2;
+--echo # Reaping: FLUSH TABLES
+--reap
+
+--echo # Connection default
+connection default;
+SET DEBUG_SYNC= 'RESET';
+DROP VIEW v1;
+DROP TABLE t1;
+disconnect con1;
+disconnect con2;
+
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 6bb028681ac..7108b9f9878 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -2707,6 +2707,8 @@ write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
hello
EOF
+# Verify that --replace_result also work on list_files
+--replace_result file REPLACED_FILE
list_files $MYSQLTEST_VARDIR/tmp/testdir;
# list_files gets the directory list before creating the new file
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *;
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index 84dd516d153..cd371a8f79a 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -11,6 +11,7 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo #
--echo # Bug#56287: crash when using Partition datetime in sub in query
--echo #
+
CREATE TABLE t1
(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT,
c2 varchar(40) not null default '',
@@ -591,6 +592,7 @@ INSERT INTO t1 VALUES (1,1), (2,2);
SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 );
DROP TABLE t1;
+
--enable_parsing
--echo #
diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test
index 04c72127394..e8b73687177 100644
--- a/mysql-test/t/partition_innodb_plugin.test
+++ b/mysql-test/t/partition_innodb_plugin.test
@@ -1,6 +1,73 @@
--source include/have_partition.inc
--source include/have_innodb.inc
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
+--echo #
+--echo # Bug#55091: Server crashes on ADD PARTITION after a failed attempt
+--echo #
+SET @old_innodb_file_format_max = @@global.innodb_file_format_max;
+SET @old_innodb_file_format = @@global.innodb_file_format;
+SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
+SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
+SET @@global.innodb_file_format = Barracuda,
+@@global.innodb_file_per_table = ON,
+@@global.innodb_strict_mode = ON;
+
+--echo # Connection con1
+--connect(con1,localhost,root,,)
+
+CREATE TABLE t1 (id INT NOT NULL
+PRIMARY KEY,
+user_num CHAR(10)
+) ENGINE = InnoDB
+KEY_BLOCK_SIZE=4
+PARTITION BY HASH(id) PARTITIONS 1;
+
+--replace_result #p# #P#
+--list_files $MYSQLD_DATADIR/test
+SHOW CREATE TABLE t1;
+
+SET GLOBAL innodb_file_per_table = OFF;
+
+--disconnect con1
+--connect(con2,localhost,root,,)
+--echo # Connection con2
+
+LOCK TABLE t1 WRITE;
+
+--echo # ALTER fails because COMPRESSED/KEY_BLOCK_SIZE
+--echo # are incompatible with innodb_file_per_table = OFF;
+
+--error ER_GET_ERRNO
+ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
+
+--replace_result #p# #P#
+--list_files $MYSQLD_DATADIR/test
+--echo # This SET is not needed to reproduce the bug,
+--echo # it is here just to make the test case more realistic
+SET innodb_strict_mode = OFF;
+
+ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+--replace_result #p# #P#
+--list_files $MYSQLD_DATADIR/test
+
+# really bug#56172
+ALTER TABLE t1 REBUILD PARTITION p0;
+
+UNLOCK TABLES;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--disconnect con2
+--connection default
+--echo # Connection default
+SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
+SET @@global.innodb_file_format = @old_innodb_file_format;
+SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
+SET @@global.innodb_file_format_max = @old_innodb_file_format_max;
+
#
# Bug#32430 - show engine innodb status causes errors
#
diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test
index a5c287e44a8..b4aa9ea1959 100644
--- a/mysql-test/t/sp-destruct.test
+++ b/mysql-test/t/sp-destruct.test
@@ -252,3 +252,30 @@ drop table mysql.proc;
--remove_file $MYSQLTEST_VARDIR/tmp/proc.frm
--remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD
--remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI
+
+
+--echo #
+--echo # Bug#58414 mysql_upgrade fails on dump upgrade between 5.1.53 -> 5.5.8
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS proc_backup;
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+--echo # Backup the proc table
+RENAME TABLE mysql.proc TO proc_backup;
+CREATE TABLE mysql.proc LIKE proc_backup;
+
+CREATE DATABASE db1;
+CREATE PROCEDURE db1.p1() SET @foo = 10;
+
+--echo # Modify a field of the table.
+ALTER TABLE mysql.proc MODIFY comment CHAR (32);
+
+# This should not fail even if mysql.proc is invalid.
+DROP DATABASE db1;
+
+--echo # Restore mysql.proc
+DROP TABLE mysql.proc;
+RENAME TABLE proc_backup TO mysql.proc;
diff --git a/mysql-test/t/truncate_coverage.test b/mysql-test/t/truncate_coverage.test
index c9c4bd90ca4..135935b53b3 100644
--- a/mysql-test/t/truncate_coverage.test
+++ b/mysql-test/t/truncate_coverage.test
@@ -172,3 +172,57 @@ UNLOCK TABLES;
DROP TABLE t1;
SET DEBUG_SYNC='RESET';
+--echo #
+--echo # Bug#57659 Segfault in Query_cache::invalidate_data for TRUNCATE TABLE
+--echo #
+
+--echo # Note that this test case only reproduces the problem
+--echo # when it is run with valgrind.
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, m1;
+--enable_warnings
+
+CREATE TABLE t1(a INT) engine=memory;
+CREATE TABLE m1(a INT) engine=merge UNION(t1);
+connect(con2, localhost, root);
+
+--echo # Connection con1
+connect(con1, localhost, root);
+SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR dropped';
+--echo # Sending:
+--send TRUNCATE TABLE m1
+
+--echo # Connection con2
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # Sending:
+--send FLUSH TABLES
+
+--echo # Connection default
+connection default;
+--echo # Waiting for FLUSH TABLES to be blocked.
+let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.processlist
+ WHERE state= 'Waiting for table flush' AND info= 'FLUSH TABLES';
+--source include/wait_condition.inc
+SET DEBUG_SYNC= 'now SIGNAL dropped';
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: TRUNCATE TABLE m1
+--error ER_WRONG_MRG_TABLE
+--reap
+disconnect con1;
+--source include/wait_until_disconnected.inc
+
+--echo # Connection con2
+connection con2;
+--echo # Reaping: FLUSH TABLES
+--reap
+disconnect con2;
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+connection default;
+SET DEBUG_SYNC= 'RESET';
+DROP TABLE m1, t1;
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 11f2b68804a..6dec86dacab 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -284,4 +284,12 @@ DROP TABLE t1;
--echo #
+--echo #
+--echo # Bug#57278: Crash on min/max + with date out of range.
+--echo #
+set @a=(select min(makedate('111','1'))) ;
+select @a;
+--echo #
+
+
--echo End of 6.0 tests
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index 4d5c5e1a91e..1dc5eadbccc 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -617,6 +617,20 @@ FROM t1 ORDER BY t1.id;
DROP TABLE t1;
+
+--echo #
+--echo # Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
+--echo #
+SET NAMES utf8;
+SELECT REPLACE(EXTRACTVALUE('1', '/a'),'ds','');
+
+
+--echo #
+--echo # Bug #57820 extractvalue crashes
+--echo #
+SELECT AVG(DISTINCT EXTRACTVALUE((''),('$@k')));
+
+
--echo #
--echo # Bug#57279 updatexml dies with: Assertion failed: str_arg[length] == 0
--echo #