mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Manual merge from mysql-5.5.
This commit is contained in:
@@ -410,6 +410,15 @@ hex(cast(_ascii 0x7f as char(1) character set latin1))
|
||||
7F
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug#58022 ... like ... escape export_set ( ... ) crashes when export_set returns warnings
|
||||
#
|
||||
SELECT '' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '');
|
||||
'' LIKE '' ESCAPE EXPORT_SET(1, 1, 1, 1, '')
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
@@ -2374,6 +2374,16 @@ hex(convert(_latin1 0xA4A2 using ujis)) hex(c2)
|
||||
DROP PROCEDURE sp1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis);
|
||||
CONVERT(REPLACE(EXPORT_SET('a','a','a','','a'),'00','') USING ujis)
|
||||
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'a'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'a'
|
||||
set names default;
|
||||
set character_set_database=default;
|
||||
set character_set_server=default;
|
||||
|
@@ -625,16 +625,16 @@ INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080);
|
||||
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
||||
HEX(a) HEX(CONVERT(a USING utf8mb4))
|
||||
0385 CE85
|
||||
FF9D EFBE9D
|
||||
D800DF84 F0908E84
|
||||
DBC0DC00 F4808080
|
||||
FF9D EFBE9D
|
||||
ALTER TABLE t1 ADD KEY(a);
|
||||
SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
|
||||
HEX(a) HEX(CONVERT(a USING utf8mb4))
|
||||
0385 CE85
|
||||
FF9D EFBE9D
|
||||
D800DF84 F0908E84
|
||||
DBC0DC00 F4808080
|
||||
FF9D EFBE9D
|
||||
DROP TABLE IF EXISTS t1;
|
||||
select @@collation_connection;
|
||||
@@collation_connection
|
||||
|
@@ -4918,5 +4918,16 @@ maketime(`a`,`a`,`a`)
|
||||
DROP TABLE t1;
|
||||
SET sql_mode=default;
|
||||
#
|
||||
# Bug#57687 crash when reporting duplicate group_key error and utf8
|
||||
# Make sure to modify this when Bug#58081 is fixed.
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
|
||||
SELECT COUNT(*) FROM t1, t1 t2
|
||||
GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
|
||||
ERROR 23000: Duplicate entry '107374182410737418241' for key 'group_key'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@@ -544,3 +544,17 @@ SELECT DATE_FORMAT("2009-01-01",'%W %d %M %Y') as valid_date;
|
||||
valid_date
|
||||
Thursday 01 January 2009
|
||||
"End of 5.0 tests"
|
||||
#
|
||||
# Start of 5.1 tests
|
||||
#
|
||||
#
|
||||
# Bug#58005 utf8 + get_format causes failed assertion: !str || str != Ptr'
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)));
|
||||
LEAST('%', GET_FORMAT(datetime, 'eur'), CAST(GET_FORMAT(datetime, 'eur') AS CHAR(65535)))
|
||||
%
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@@ -381,6 +381,15 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1))
|
||||
3
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SELECT INET_NTOA(0);
|
||||
INET_NTOA(0)
|
||||
0.0.0.0
|
||||
SELECT '1' IN ('1', INET_NTOA(0));
|
||||
'1' IN ('1', INET_NTOA(0))
|
||||
1
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
#
|
||||
# Bug #58199: name_const in the having clause crashes
|
||||
#
|
||||
@@ -388,4 +397,9 @@ CREATE TABLE t1 (a INT);
|
||||
SELECT 1 from t1 HAVING NAME_CONST('', a);
|
||||
ERROR HY000: Incorrect arguments to NAME_CONST
|
||||
DROP TABLE t1;
|
||||
End of tests
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
|
@@ -738,3 +738,38 @@ SET DEBUG_SYNC= 'now SIGNAL release_thrlock';
|
||||
# Connection default
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
# Bug#57130 crash in Item_field::print during SHOW CREATE TABLE or VIEW
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
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;
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR dropped EXECUTE 2';
|
||||
# Sending:
|
||||
SHOW CREATE VIEW v1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR opened';
|
||||
SET DEBUG_SYNC= 'now SIGNAL dropped';
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR opened';
|
||||
# Sending:
|
||||
FLUSH TABLES;
|
||||
# Connection default
|
||||
# Waiting for FLUSH TABLES to be blocked.
|
||||
SET DEBUG_SYNC= 'now SIGNAL dropped';
|
||||
# Connection con1
|
||||
# Reaping: SHOW CREATE VIEW v1
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where (`f1`() = 1) latin1 latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
# Connection con2
|
||||
# Reaping: FLUSH TABLES
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
@@ -838,7 +838,7 @@ drop table t1;
|
||||
mysqltest: At line 1: change user failed: Unknown database 'inexistent'
|
||||
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
|
||||
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
|
||||
file1.txt
|
||||
REPLACED_FILE1.txt
|
||||
file1.txt
|
||||
file2.txt
|
||||
file11.txt
|
||||
|
@@ -1,3 +1,76 @@
|
||||
call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB internal");
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
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;
|
||||
# Connection con1
|
||||
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;
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
/*!50100 PARTITION BY HASH (id)
|
||||
PARTITIONS 1 */
|
||||
SET GLOBAL innodb_file_per_table = OFF;
|
||||
# Connection con2
|
||||
LOCK TABLE t1 WRITE;
|
||||
# ALTER fails because COMPRESSED/KEY_BLOCK_SIZE
|
||||
# are incompatible with innodb_file_per_table = OFF;
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
|
||||
ERROR HY000: Got error 1478 from storage engine
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
# This SET is not needed to reproduce the bug,
|
||||
# it is here just to make the test case more realistic
|
||||
SET innodb_strict_mode = OFF;
|
||||
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
t1.frm
|
||||
t1.par
|
||||
ALTER TABLE t1 REBUILD PARTITION p0;
|
||||
Warnings:
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
|
||||
UNLOCK TABLES;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user_num` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
|
||||
/*!50100 PARTITION BY HASH (id)
|
||||
PARTITIONS 3 */
|
||||
DROP TABLE t1;
|
||||
# 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;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
|
@@ -150,3 +150,21 @@ Warnings:
|
||||
Error 1547 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
|
||||
# Restore mysql.proc.
|
||||
drop table mysql.proc;
|
||||
#
|
||||
# Bug#58414 mysql_upgrade fails on dump upgrade between 5.1.53 -> 5.5.8
|
||||
#
|
||||
DROP TABLE IF EXISTS proc_backup;
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
# 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;
|
||||
# Modify a field of the table.
|
||||
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
|
||||
DROP DATABASE db1;
|
||||
Warnings:
|
||||
Error 1548 Cannot load from mysql.proc. The table is probably corrupted
|
||||
# Restore mysql.proc
|
||||
DROP TABLE mysql.proc;
|
||||
RENAME TABLE proc_backup TO mysql.proc;
|
||||
|
@@ -78,3 +78,30 @@ COMMIT;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC='RESET';
|
||||
#
|
||||
# Bug#57659 Segfault in Query_cache::invalidate_data for TRUNCATE TABLE
|
||||
#
|
||||
# Note that this test case only reproduces the problem
|
||||
# when it is run with valgrind.
|
||||
DROP TABLE IF EXISTS t1, m1;
|
||||
CREATE TABLE t1(a INT) engine=memory;
|
||||
CREATE TABLE m1(a INT) engine=merge UNION(t1);
|
||||
# Connection con1
|
||||
SET DEBUG_SYNC= 'open_tables_after_open_and_process_table SIGNAL opened WAIT_FOR dropped';
|
||||
# Sending:
|
||||
TRUNCATE TABLE m1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR opened';
|
||||
# Sending:
|
||||
FLUSH TABLES;
|
||||
# Connection default
|
||||
# Waiting for FLUSH TABLES to be blocked.
|
||||
SET DEBUG_SYNC= 'now SIGNAL dropped';
|
||||
# Connection con1
|
||||
# Reaping: TRUNCATE TABLE m1
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
# Connection con2
|
||||
# Reaping: FLUSH TABLES
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE m1, t1;
|
||||
|
@@ -318,4 +318,12 @@ f1 date YES NULL
|
||||
f2 date YES NULL
|
||||
DROP TABLE t1;
|
||||
#
|
||||
#
|
||||
# Bug#57278: Crash on min/max + with date out of range.
|
||||
#
|
||||
set @a=(select min(makedate('111','1'))) ;
|
||||
select @a;
|
||||
@a
|
||||
0111-01-01
|
||||
#
|
||||
End of 6.0 tests
|
||||
|
@@ -1094,6 +1094,19 @@ Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-
|
||||
Warning 1525 Incorrect XML value: 'parse error at line 1 pos 23: unexpected END-OF-INPUT'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#57257 Replace(ExtractValue(...)) causes MySQL crash
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT REPLACE(EXTRACTVALUE('1', '/a'),'ds','');
|
||||
REPLACE(EXTRACTVALUE('1', '/a'),'ds','')
|
||||
|
||||
#
|
||||
# Bug #57820 extractvalue crashes
|
||||
#
|
||||
SELECT AVG(DISTINCT EXTRACTVALUE((''),('$@k')));
|
||||
AVG(DISTINCT EXTRACTVALUE((''),('$@k')))
|
||||
NULL
|
||||
#
|
||||
# Bug#57279 updatexml dies with: Assertion failed: str_arg[length] == 0
|
||||
#
|
||||
SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1);
|
||||
|
Reference in New Issue
Block a user