mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merge from 5.5 main
This commit is contained in:
@ -17,6 +17,7 @@ main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeou
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#12403008 2011-04-27 sven fails sporadically
|
||||
rpl.rpl_innodb_bug28430 # Bug#46029
|
||||
rpl.rpl_show_slave_hosts # BUG#12416700 2011-05-02 sven fails sporadically
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.plugin_dir_basic # Bug#52223 2010-11-24 alik Test "plugin_dir_basic" does not support RPM build (test) directory structure
|
||||
|
@ -11,18 +11,28 @@
|
||||
# on the slave)
|
||||
# $can_convert True if conversion shall work, false if it
|
||||
# shall generate an error
|
||||
# $engine_type The storage engine to be used for storing table
|
||||
# on both master and slave
|
||||
|
||||
if (!$engine_type)
|
||||
{
|
||||
# Use the default storage engine
|
||||
let $engine_type=`SELECT @@storage_engine`;
|
||||
}
|
||||
|
||||
connection master;
|
||||
disable_warnings;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
enable_warnings;
|
||||
eval CREATE TABLE t1 (a $source_type);
|
||||
eval CREATE TABLE t1(
|
||||
pk INT NOT NULL PRIMARY KEY,
|
||||
a $source_type
|
||||
) ENGINE=$engine_type;
|
||||
sync_slave_with_master;
|
||||
eval ALTER TABLE t1 MODIFY a $target_type;
|
||||
|
||||
connection master;
|
||||
eval INSERT INTO t1 VALUES($source_value);
|
||||
eval INSERT INTO t1 VALUES(1, $source_value);
|
||||
if ($can_convert) {
|
||||
sync_slave_with_master;
|
||||
eval SELECT a = $target_value into @compare FROM t1;
|
||||
|
@ -31,6 +31,21 @@
|
||||
# Created: 2009-02-18 mleich
|
||||
#
|
||||
|
||||
if (!$condition)
|
||||
{
|
||||
--die ERROR IN TEST: the "condition" variable must be set
|
||||
}
|
||||
|
||||
if (!$field)
|
||||
{
|
||||
--die ERROR IN TEST: the "field" variable must be set
|
||||
}
|
||||
|
||||
if (!$show_statement)
|
||||
{
|
||||
--die ERROR IN TEST: the "show_statement" variable must be set
|
||||
}
|
||||
|
||||
let $max_run_time= 30;
|
||||
if ($wait_timeout)
|
||||
{
|
||||
|
@ -12807,3 +12807,19 @@ DROP TABLE t1;
|
||||
#
|
||||
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||
DROP TABLE `a/../`;
|
||||
#
|
||||
# BUG#57162 - valgrind errors, random data when returning
|
||||
# ordered data from archive tables
|
||||
#
|
||||
SET sort_buffer_size=32804;
|
||||
CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
|
||||
e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
|
||||
INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
|
||||
SELECT * FROM t1 ORDER BY f LIMIT 1;
|
||||
a b c d e f
|
||||
-1 b c d e 1
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size=DEFAULT;
|
||||
|
@ -451,4 +451,21 @@ SELECT CONVERT(t2.a USING UTF8) FROM t1, t1 t2 LIMIT 1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
|
||||
# DOESN'T ADHERE TO MAX_ALLOWED_PACKET
|
||||
SET @@GLOBAL.max_allowed_packet=2048;
|
||||
Warnings:
|
||||
Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
||||
SELECT CONVERT('a', BINARY(2049));
|
||||
CONVERT('a', BINARY(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_binary() was larger than max_allowed_packet (2048) - truncated
|
||||
SELECT CONVERT('a', CHAR(2049));
|
||||
CONVERT('a', CHAR(2049))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of cast_as_char() was larger than max_allowed_packet (2048) - truncated
|
||||
SET @@GLOBAL.max_allowed_packet=default;
|
||||
End of 5.1 tests
|
||||
|
@ -2046,7 +2046,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varbinary(2) DEFAULT NULL
|
||||
`concat(a)` varbinary(4) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2355,7 +2355,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varbinary(2) YES NULL
|
||||
a varbinary(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
|
@ -2438,7 +2438,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2747,7 +2747,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
|
@ -2465,7 +2465,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) DEFAULT NULL
|
||||
`concat(a)` varchar(4) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -2774,7 +2774,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
|
@ -3299,7 +3299,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -3608,7 +3608,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
00300031
|
||||
|
@ -4177,7 +4177,7 @@ create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET utf8 DEFAULT NULL
|
||||
`concat(a)` varchar(4) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
@ -4486,7 +4486,7 @@ insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
a varchar(4) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
|
@ -794,3 +794,14 @@ DROP TABLE t1;
|
||||
SET @@sort_buffer_size = @old_sort_buffer_size;
|
||||
SET @@max_heap_table_size = @old_max_heap_table_size;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #11744875: 4082: integer lengths cause truncation with distinct concat and innodb
|
||||
#
|
||||
CREATE TABLE t1 (a INT(1), b INT(1));
|
||||
INSERT INTO t1 VALUES (1111, 2222), (3333, 4444);
|
||||
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
|
||||
c
|
||||
11112222
|
||||
33334444
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
@ -259,33 +260,36 @@ events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLE
|
||||
Try to alter mysql.event: the server should fail to load
|
||||
event information after mysql.event was tampered with.
|
||||
|
||||
First, let's add a column to the end and make sure everything
|
||||
works as before
|
||||
First, let's add a column to the end and check the error is emitted.
|
||||
|
||||
ALTER TABLE mysql.event ADD dummy INT;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
event_name
|
||||
intact_check
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
|
||||
intact_check SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `intact_check` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT "nothing" latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -294,6 +298,7 @@ Variable_name Value
|
||||
event_scheduler OFF
|
||||
SET GLOBAL event_scheduler=OFF;
|
||||
ALTER TABLE mysql.event DROP dummy;
|
||||
DROP EVENT intact_check;
|
||||
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
|
||||
|
||||
Now let's add a column to the first position: the server
|
||||
@ -301,30 +306,32 @@ expects to see event schema name there
|
||||
|
||||
ALTER TABLE mysql.event ADD dummy INT FIRST;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to store event name. Error code 2 from storage engine.
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Unknown event 'intact_check'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -345,29 +352,32 @@ Drop some columns and try more checks.
|
||||
|
||||
ALTER TABLE mysql.event DROP comment, DROP starts;
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
SHOW CREATE EVENT intact_check;
|
||||
ERROR HY000: Cannot load from mysql.event. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT no_such_event;
|
||||
ERROR HY000: Unknown event 'no_such_event'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Column count of mysql.event is wrong. Expected 22, found 20. The table is probably corrupted
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_1;
|
||||
ERROR HY000: Unknown event 'intact_check_1'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check_2;
|
||||
ERROR HY000: Unknown event 'intact_check_2'
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP EVENT intact_check;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
DROP DATABASE mysqltest_db2;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
SELECT @@event_scheduler;
|
||||
@@event_scheduler
|
||||
OFF
|
||||
@ -425,4 +435,42 @@ CREATE TABLE mysql.event like event_like;
|
||||
DROP TABLE event_like;
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# Bug#12394306: the sever may crash if mysql.event is corrupted
|
||||
#
|
||||
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
|
||||
CREATE TABLE event_original LIKE mysql.event;
|
||||
INSERT INTO event_original SELECT * FROM mysql.event;
|
||||
|
||||
ALTER TABLE mysql.event MODIFY modified CHAR(1);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'modified' at row 1
|
||||
|
||||
SHOW EVENTS;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
SELECT event_name, created, last_altered FROM information_schema.events;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
CREATE EVENT ev2 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 9 HOUR DO SELECT 9;
|
||||
ERROR HY000: Failed to open mysql.event
|
||||
|
||||
DROP TABLE mysql.event;
|
||||
RENAME TABLE event_original TO mysql.event;
|
||||
|
||||
DROP EVENT ev1;
|
||||
|
||||
SHOW EVENTS;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
drop database events_test;
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
set global event_scheduler=off;
|
||||
drop database if exists events_test;
|
||||
create database events_test;
|
||||
@ -52,6 +53,8 @@ Warnings:
|
||||
Note 1008 Can't drop database 'mysqltest_database_not_exists'; database doesn't exist
|
||||
create database mysqltest_db1;
|
||||
drop database mysqltest_db1;
|
||||
Warnings:
|
||||
Error 1545 Failed to open mysql.event
|
||||
Restore the original mysql.event table
|
||||
drop table mysql.event;
|
||||
rename table event_like to mysql.event;
|
||||
|
@ -180,7 +180,6 @@ ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP col
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where <not>(<exists>(...))
|
||||
SET SESSION sql_mode=@old_sql_mode;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
@ -318,3 +317,17 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
#
|
||||
# Bug#11829785 EXPLAIN EXTENDED CRASH WITH RIGHT OUTER JOIN, SUBQUERIES
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0), (0);
|
||||
PREPARE s FROM
|
||||
'EXPLAIN EXTENDED
|
||||
SELECT SUBSTRING(1, (SELECT 1 FROM t1 a1 RIGHT OUTER JOIN t1 ON 0)) AS d
|
||||
FROM t1 WHERE 0 > ANY (SELECT @a FROM t1)';
|
||||
EXECUTE s;
|
||||
ERROR 21000: Subquery returns more than 1 row
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@ -1056,7 +1056,6 @@ ERROR HY000: Only constant XPATH queries are supported
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1105 Only constant XPATH queries are supported
|
||||
Note 1003 select updatexml('1',`test`.`t1`.`a`,'1') AS `UPDATEXML('1', a, '1')` from `test`.`t1` order by (select group_concat(1 separator ',') from `test`.`t1`)
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
|
@ -1043,6 +1043,10 @@ create spatial index i on t1 (a);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t0 (a BINARY(32) NOT NULL);
|
||||
CREATE SPATIAL INDEX i on t0 (a);
|
||||
ERROR 42000: A SPATIAL index may only contain a geometrical type column
|
||||
INSERT INTO t0 VALUES (1);
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
col2 TIMESTAMP,
|
||||
@ -1071,5 +1075,5 @@ col2 LINESTRING,
|
||||
SPATIAL INDEX i1 (col1, col2)
|
||||
);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t0, t1, t2;
|
||||
End of 5.5 tests
|
||||
|
@ -126,7 +126,7 @@ renamed
|
||||
1
|
||||
select * from v3 where renamed=1 group by renamed;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def v3 v3 renamed renamed 8 11 0 Y 32896 0 63
|
||||
def v3 v3 renamed renamed 8 12 0 Y 32896 0 63
|
||||
renamed
|
||||
drop table t1;
|
||||
drop view v1,v2,v3;
|
||||
|
@ -109,3 +109,13 @@ count(*)
|
||||
35840
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
SET @old_binlog_format= @@binlog_format;
|
||||
SET SESSION binlog_format=ROW;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
FLUSH LOGS;
|
||||
DROP TABLE t1;
|
||||
SET SESSION binlog_format= @old_binlog_format;
|
||||
RESET MASTER;
|
||||
|
@ -4626,7 +4626,7 @@ DELIMITER ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
DROP DATABASE `test-database`;
|
||||
USE `test`;
|
||||
USE test;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -7452,6 +7452,24 @@ c1
|
||||
# Cleanup
|
||||
drop table t1;
|
||||
drop procedure p1;
|
||||
#
|
||||
# BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW)
|
||||
# FAILS IN SET_FIELD_ITERATOR
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE VIEW v1 AS SELECT a FROM t2;
|
||||
CREATE PROCEDURE proc() SELECT * FROM t1 NATURAL JOIN v1;
|
||||
ALTER TABLE t2 CHANGE COLUMN a b CHAR;
|
||||
|
||||
CALL proc();
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
CALL proc();
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
DROP VIEW v1;
|
||||
DROP PROCEDURE proc;
|
||||
|
||||
# --
|
||||
# -- Bug 11765684 - 58674: SP-cache does not detect changes in
|
||||
|
@ -865,9 +865,6 @@ Level Code Message
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
|
||||
Error 1054 Unknown column 'c' in 'field list'
|
||||
Note 1003 select `c` AS `c` from (select (select count(`test`.`t1`.`a`) from dual group by `c`) AS `(SELECT COUNT(a) FROM
|
||||
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
|
||||
)` from `test`.`t1` group by `test`.`t1`.`b`) `y`
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t0 (a int);
|
||||
|
@ -2208,4 +2208,22 @@ trigger_name
|
||||
# Clean-up.
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
End of 6.0 tests.
|
||||
|
||||
#
|
||||
# Bug #12362125: SP INOUT HANDLING IS BROKEN FOR TEXT TYPE.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(c TEXT);
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE v TEXT;
|
||||
SET v = 'aaa';
|
||||
SET NEW.c = v;
|
||||
END|
|
||||
INSERT INTO t1 VALUES('qazwsxedc');
|
||||
SELECT c FROM t1;
|
||||
c
|
||||
aaa
|
||||
DROP TABLE t1;
|
||||
|
||||
End of 5.5 tests.
|
||||
|
@ -1920,4 +1920,17 @@ SELECT SUM(DISTINCT a) FROM t1;
|
||||
SUM(DISTINCT a)
|
||||
0.0000
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#55436: buffer overflow in debug binary of dbug_buff in
|
||||
# Field_new_decimal::store_value
|
||||
#
|
||||
SET SQL_MODE='';
|
||||
CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
|
||||
INSERT INTO t1 SET f1 = -64878E-85;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f1' at row 1
|
||||
SELECT f1 FROM t1;
|
||||
f1
|
||||
0.000000000000000000000000
|
||||
DROP TABLE IF EXISTS t1;
|
||||
End of 5.1 tests
|
||||
|
@ -271,7 +271,7 @@ drop table t2;
|
||||
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
|
||||
show full columns from t2;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
auto int(6) unsigned NULL NO PRI 0 #
|
||||
auto int(11) unsigned NULL NO PRI 0 #
|
||||
t1 int(1) NULL NO 0 #
|
||||
t2 varchar(1) latin1_swedish_ci NO #
|
||||
t3 varchar(256) latin1_swedish_ci NO #
|
||||
|
@ -698,7 +698,7 @@ master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`= @b + bug27417(2) ;file_id=#
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
/* the output must denote there is the query */;
|
||||
drop trigger trg_del_t2;
|
||||
@ -950,7 +950,7 @@ master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Intvar # # INSERT_ID=10
|
||||
master-bin.000001 # User var # # @`b`=_latin1 0x3135 COLLATE latin1_swedish_ci
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`=((@b) + `bug27417`(2)) ;file_id=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE `t4` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, @b) SET `b`= @b + bug27417(2) ;file_id=#
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
drop trigger trg_del_t2;
|
||||
drop table t1,t2,t3,t4,t5;
|
||||
|
@ -35,7 +35,7 @@ connect(default,localhost,root,,test);
|
||||
|
||||
# Copied data from t1 into t2 large than max_binlog_cache_size
|
||||
START TRANSACTION;
|
||||
--error 1197
|
||||
--error ER_TRANS_CACHE_FULL
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
|
@ -71,3 +71,47 @@ FK1_Key FK2_Key
|
||||
DROP TABLE Bug_60196;
|
||||
DROP TABLE Bug_60196_FK1;
|
||||
DROP TABLE Bug_60196_FK2;
|
||||
CREATE TABLE Bug_60309_FK (
|
||||
ID INT PRIMARY KEY,
|
||||
ID2 INT,
|
||||
KEY K2(ID2)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE Bug_60309 (
|
||||
ID INT PRIMARY KEY,
|
||||
FK_ID INT,
|
||||
KEY (FK_ID),
|
||||
CONSTRAINT FK FOREIGN KEY (FK_ID) REFERENCES Bug_60309_FK (ID)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO Bug_60309_FK (ID, ID2) VALUES (1, 1), (2, 2), (3, 3);
|
||||
INSERT INTO Bug_60309 VALUES (1, 1);
|
||||
INSERT INTO Bug_60309 VALUES (2, 99);
|
||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`bug_60309`, CONSTRAINT `FK` FOREIGN KEY (`FK_ID`) REFERENCES `Bug_60309_FK` (`ID`))
|
||||
SELECT * FROM Bug_60309_FK;
|
||||
ID ID2
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
SELECT * FROM Bug_60309;
|
||||
ID FK_ID
|
||||
1 1
|
||||
# Stop server
|
||||
# Restart server.
|
||||
#
|
||||
# Try to insert more to the example table with foreign keys.
|
||||
# Bug60309 causes the foreign key file not to be found after
|
||||
# the resstart above.
|
||||
#
|
||||
SELECT * FROM Bug_60309;
|
||||
ID FK_ID
|
||||
1 1
|
||||
INSERT INTO Bug_60309 VALUES (2, 2);
|
||||
INSERT INTO Bug_60309 VALUES (3, 3);
|
||||
SELECT * FROM Bug_60309;
|
||||
ID FK_ID
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
|
||||
# Clean up.
|
||||
DROP TABLE Bug_60309;
|
||||
DROP TABLE Bug_60309_FK;
|
||||
|
@ -85,3 +85,73 @@ DROP TABLE Bug_60196;
|
||||
DROP TABLE Bug_60196_FK1;
|
||||
DROP TABLE Bug_60196_FK2;
|
||||
|
||||
|
||||
# Bug#60309/12356829
|
||||
# MYSQL 5.5.9 FOR MAC OSX HAS BUG WITH FOREIGN KEY CONSTRAINTS
|
||||
# This testcase is different from that for Bug#60196 in that the
|
||||
# referenced table contains a secondary key. When the engine is
|
||||
# restarted, the referenced table is opened by the purge thread,
|
||||
# which does not notice that lower_case_table_names == 2.
|
||||
|
||||
#
|
||||
# Create test data.
|
||||
#
|
||||
CREATE TABLE Bug_60309_FK (
|
||||
ID INT PRIMARY KEY,
|
||||
ID2 INT,
|
||||
KEY K2(ID2)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE Bug_60309 (
|
||||
ID INT PRIMARY KEY,
|
||||
FK_ID INT,
|
||||
KEY (FK_ID),
|
||||
CONSTRAINT FK FOREIGN KEY (FK_ID) REFERENCES Bug_60309_FK (ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO Bug_60309_FK (ID, ID2) VALUES (1, 1), (2, 2), (3, 3);
|
||||
INSERT INTO Bug_60309 VALUES (1, 1);
|
||||
--error ER_NO_REFERENCED_ROW_2
|
||||
INSERT INTO Bug_60309 VALUES (2, 99);
|
||||
|
||||
SELECT * FROM Bug_60309_FK;
|
||||
SELECT * FROM Bug_60309;
|
||||
|
||||
--echo # Stop server
|
||||
|
||||
# Write file to make mysql-test-run.pl wait for the server to stop
|
||||
-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Send a shutdown request to the server
|
||||
-- shutdown_server 10
|
||||
|
||||
# Call script that will poll the server waiting for it to disapear
|
||||
-- source include/wait_until_disconnected.inc
|
||||
|
||||
--echo # Restart server.
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
||||
# Call script that will poll the server waiting for it to be back online again
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
# Turn off reconnect again
|
||||
--disable_reconnect
|
||||
|
||||
--echo #
|
||||
--echo # Try to insert more to the example table with foreign keys.
|
||||
--echo # Bug60309 causes the foreign key file not to be found after
|
||||
--echo # the resstart above.
|
||||
--echo #
|
||||
SELECT * FROM Bug_60309;
|
||||
INSERT INTO Bug_60309 VALUES (2, 2);
|
||||
INSERT INTO Bug_60309 VALUES (3, 3);
|
||||
SELECT * FROM Bug_60309;
|
||||
|
||||
--echo
|
||||
--echo # Clean up.
|
||||
DROP TABLE Bug_60309;
|
||||
DROP TABLE Bug_60309_FK;
|
||||
|
@ -93,4 +93,31 @@ Slave 44
|
||||
DROP TABLE t1;
|
||||
SET SESSION sql_mode=@old_mode;
|
||||
[slave]
|
||||
|
||||
Bug #60580/#11902767:
|
||||
"statement improperly replicated crashes slave sql thread"
|
||||
|
||||
[master]
|
||||
CREATE TABLE t1(f1 INT, f2 INT);
|
||||
CREATE TABLE t2(f1 INT, f2 TIMESTAMP);
|
||||
INSERT INTO t2 VALUES(1, '2011-03-22 21:01:28');
|
||||
INSERT INTO t2 VALUES(2, '2011-03-21 21:01:28');
|
||||
INSERT INTO t2 VALUES(3, '2011-03-20 21:01:28');
|
||||
CREATE TABLE t3 AS SELECT * FROM t2;
|
||||
CREATE VIEW v1 AS SELECT * FROM t2
|
||||
WHERE f1 IN (SELECT f1 FROM t3 WHERE (t3.f2 IS NULL));
|
||||
SELECT 1 INTO OUTFILE 'MYSQLD_DATADIR/bug60580.csv' FROM DUAL;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug60580.csv' INTO TABLE t1 (@f1) SET f2 = (SELECT f1 FROM v1 WHERE f1=@f1);
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
NULL NULL
|
||||
[slave]
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
NULL NULL
|
||||
[master]
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2, t3;
|
||||
[slave]
|
||||
include/rpl_end.inc
|
||||
# End of 5.1 tests
|
||||
|
@ -22,7 +22,7 @@ change master to master_port=MASTER_PORT;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS;
|
||||
include/wait_for_slave_io_to_start.inc
|
||||
include/wait_for_slave_sql_to_stop.inc
|
||||
*** checking until postion execution: must be only t1 in the list ***
|
||||
*** checking until position execution: must be only t1 in the list ***
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
|
@ -8,8 +8,7 @@ SHOW SLAVE HOSTS;
|
||||
Server_id Host Port Master_id
|
||||
3 slave2 DEFAULT_PORT 1
|
||||
2 SLAVE_PORT 1
|
||||
STOP SLAVE IO_THREAD;
|
||||
include/wait_for_slave_io_to_stop.inc
|
||||
include/stop_slave_io.inc
|
||||
SHOW SLAVE HOSTS;
|
||||
Server_id Host Port Master_id
|
||||
2 SLAVE_PORT 1
|
||||
|
@ -534,7 +534,7 @@ BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
|
||||
BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
|
||||
BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
|
||||
DROP TABLE type_conversions;
|
||||
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
|
||||
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677");
|
||||
DROP TABLE t1;
|
||||
set global slave_type_conversions = @saved_slave_type_conversions;
|
||||
include/rpl_end.inc
|
||||
|
@ -185,5 +185,56 @@ SET SESSION sql_mode=@old_mode;
|
||||
--echo [slave]
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
|
||||
--echo
|
||||
--echo Bug #60580/#11902767:
|
||||
--echo "statement improperly replicated crashes slave sql thread"
|
||||
--echo
|
||||
|
||||
--echo [master]
|
||||
connection master;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
CREATE TABLE t1(f1 INT, f2 INT);
|
||||
CREATE TABLE t2(f1 INT, f2 TIMESTAMP);
|
||||
|
||||
INSERT INTO t2 VALUES(1, '2011-03-22 21:01:28');
|
||||
INSERT INTO t2 VALUES(2, '2011-03-21 21:01:28');
|
||||
INSERT INTO t2 VALUES(3, '2011-03-20 21:01:28');
|
||||
|
||||
CREATE TABLE t3 AS SELECT * FROM t2;
|
||||
|
||||
CREATE VIEW v1 AS SELECT * FROM t2
|
||||
WHERE f1 IN (SELECT f1 FROM t3 WHERE (t3.f2 IS NULL));
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval SELECT 1 INTO OUTFILE '$MYSQLD_DATADIR/bug60580.csv' FROM DUAL;
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval LOAD DATA LOCAL INFILE '$MYSQLD_DATADIR/bug60580.csv' INTO TABLE t1 (@f1) SET f2 = (SELECT f1 FROM v1 WHERE f1=@f1);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
sleep 1;
|
||||
|
||||
--echo [slave]
|
||||
sync_slave_with_master;
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
--remove_file $MYSQLD_DATADIR/bug60580.csv
|
||||
|
||||
--echo [master]
|
||||
connection master;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
--echo [slave]
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
--source include/rpl_end.inc
|
||||
|
||||
--echo # End of 5.1 tests
|
||||
|
@ -8,32 +8,32 @@
|
||||
connection master;
|
||||
CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
# Save master log postion for query DROP TABLE t1
|
||||
# Save master log position for query DROP TABLE t1
|
||||
let $master_pos_drop_t1= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
DROP TABLE t1;
|
||||
# Save master log postion for query DROP TABLE t1
|
||||
# Save master log position for query DROP TABLE t1
|
||||
save_master_pos;
|
||||
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7);
|
||||
let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
|
||||
|
||||
# Save master log postion for query CREATE TABLE t2
|
||||
# Save master log position for query CREATE TABLE t2
|
||||
let $master_pos_create_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
|
||||
#show binlog events;
|
||||
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
# Save master log postion for query INSERT INTO t2 VALUES (1),(2);
|
||||
# Save master log position for query INSERT INTO t2 VALUES (1),(2);
|
||||
let $master_pos_insert1_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
sync_slave_with_master;
|
||||
#show binlog events;
|
||||
|
||||
# Save relay log postion for query INSERT INTO t2 VALUES (1),(2);
|
||||
# Save relay log position for query INSERT INTO t2 VALUES (1),(2);
|
||||
let $relay_pos_insert1_t2= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1);
|
||||
|
||||
connection master;
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
DROP TABLE t2;
|
||||
# Save master log postion for query DROP TABLE t2;
|
||||
# Save master log position for query DROP TABLE t2;
|
||||
let $master_pos_drop_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
sync_slave_with_master;
|
||||
#show binlog events;
|
||||
|
@ -50,7 +50,7 @@ eval start slave until master_log_file='master-bin.000001', master_log_pos=$unti
|
||||
--source include/wait_for_slave_io_to_start.inc
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
|
||||
--echo *** checking until postion execution: must be only t1 in the list ***
|
||||
--echo *** checking until position execution: must be only t1 in the list ***
|
||||
show tables;
|
||||
|
||||
# cleanup
|
||||
|
@ -23,14 +23,13 @@ connection master;
|
||||
let $show_statement= SHOW SLAVE HOSTS;
|
||||
let $field= Server_id;
|
||||
# 3 is server_id of slave2.
|
||||
let $connection= ='3';
|
||||
let $condition= ='3';
|
||||
source include/wait_show_condition.inc;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT $DEFAULT_MASTER_PORT DEFAULT_PORT
|
||||
SHOW SLAVE HOSTS;
|
||||
|
||||
connection slave2;
|
||||
STOP SLAVE IO_THREAD;
|
||||
source include/wait_for_slave_io_to_stop.inc;
|
||||
--source include/stop_slave_io.inc
|
||||
|
||||
connection master;
|
||||
let $show_statement= SHOW SLAVE HOSTS;
|
||||
|
@ -61,7 +61,7 @@ SELECT RPAD(Source, 15, ' ') AS Source_Type,
|
||||
enable_query_log;
|
||||
DROP TABLE type_conversions;
|
||||
|
||||
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
|
||||
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* Error_code: 1677");
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
@ -1730,3 +1730,18 @@ DROP TABLE t1;
|
||||
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||
remove_file $MYSQLD_DATADIR/test/a@002f@002e@002e@002f.frm;
|
||||
DROP TABLE `a/../`;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#57162 - valgrind errors, random data when returning
|
||||
--echo # ordered data from archive tables
|
||||
--echo #
|
||||
SET sort_buffer_size=32804;
|
||||
CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
|
||||
e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
|
||||
INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
|
||||
SELECT * FROM t1 ORDER BY f LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
SET sort_buffer_size=DEFAULT;
|
||||
|
@ -280,5 +280,19 @@ SELECT 1 FROM
|
||||
) AS s LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11765023: 57934: DOS POSSIBLE SINCE BINARY CASTING
|
||||
--echo # DOESN'T ADHERE TO MAX_ALLOWED_PACKET
|
||||
|
||||
SET @@GLOBAL.max_allowed_packet=2048;
|
||||
# reconnect to make the new max packet size take effect
|
||||
--connect (newconn, localhost, root,,)
|
||||
|
||||
SELECT CONVERT('a', BINARY(2049));
|
||||
SELECT CONVERT('a', CHAR(2049));
|
||||
|
||||
connection default;
|
||||
disconnect newconn;
|
||||
SET @@GLOBAL.max_allowed_packet=default;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -614,3 +614,16 @@ SET @@sort_buffer_size = @old_sort_buffer_size;
|
||||
SET @@max_heap_table_size = @old_max_heap_table_size;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11744875: 4082: integer lengths cause truncation with distinct concat and innodb
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT(1), b INT(1));
|
||||
INSERT INTO t1 VALUES (1111, 2222), (3333, 4444);
|
||||
SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
@ -4,6 +4,8 @@
|
||||
# Can't test with embedded server that doesn't support grants
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
@ -270,23 +272,28 @@ SHOW EVENTS;
|
||||
--echo Try to alter mysql.event: the server should fail to load
|
||||
--echo event information after mysql.event was tampered with.
|
||||
--echo
|
||||
--echo First, let's add a column to the end and make sure everything
|
||||
--echo works as before
|
||||
--echo First, let's add a column to the end and check the error is emitted.
|
||||
--echo
|
||||
ALTER TABLE mysql.event ADD dummy INT;
|
||||
--replace_column 8 # 9 #
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW EVENTS;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
--replace_regex /STARTS '[^']+'/STARTS '#'/
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW CREATE EVENT intact_check;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT no_such_event;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_1;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_2;
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check;
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
@ -296,6 +303,7 @@ SHOW VARIABLES LIKE 'event_scheduler';
|
||||
SET GLOBAL event_scheduler=OFF;
|
||||
# Clean up
|
||||
ALTER TABLE mysql.event DROP dummy;
|
||||
DROP EVENT intact_check;
|
||||
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
|
||||
--echo
|
||||
--echo Now let's add a column to the first position: the server
|
||||
@ -303,24 +311,26 @@ CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
|
||||
--echo
|
||||
ALTER TABLE mysql.event ADD dummy INT FIRST;
|
||||
--error ER_CANNOT_LOAD_FROM_TABLE
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW EVENTS;
|
||||
--error ER_CANNOT_LOAD_FROM_TABLE
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.events;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW CREATE EVENT intact_check;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT no_such_event;
|
||||
--error ER_EVENT_STORE_FAILED
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_1;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_2;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check;
|
||||
# Should work OK
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
@ -341,25 +351,25 @@ INSERT INTO event_like SELECT * FROM mysql.event;
|
||||
--echo
|
||||
--echo
|
||||
ALTER TABLE mysql.event DROP comment, DROP starts;
|
||||
--error ER_CANNOT_LOAD_FROM_TABLE
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW EVENTS;
|
||||
--error ER_CANNOT_LOAD_FROM_TABLE
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SELECT event_name FROM INFORMATION_SCHEMA.EVENTS;
|
||||
--error ER_CANNOT_LOAD_FROM_TABLE
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW CREATE EVENT intact_check;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT no_such_event;
|
||||
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT intact_check_1 RENAME TO intact_check_2;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_1;
|
||||
--error ER_EVENT_DOES_NOT_EXIST
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check_2;
|
||||
# Should succeed
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
DROP EVENT intact_check;
|
||||
DROP DATABASE IF EXISTS mysqltest_no_such_database;
|
||||
CREATE DATABASE mysqltest_db2;
|
||||
@ -407,9 +417,54 @@ CREATE TABLE mysql.event like event_like;
|
||||
DROP TABLE event_like;
|
||||
--replace_column 8 # 9 #
|
||||
SHOW EVENTS;
|
||||
#
|
||||
# End of tests
|
||||
#
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo # Bug#12394306: the sever may crash if mysql.event is corrupted
|
||||
--echo #
|
||||
|
||||
--echo
|
||||
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
|
||||
|
||||
--echo
|
||||
CREATE TABLE event_original LIKE mysql.event;
|
||||
INSERT INTO event_original SELECT * FROM mysql.event;
|
||||
|
||||
--echo
|
||||
ALTER TABLE mysql.event MODIFY modified CHAR(1);
|
||||
|
||||
--echo
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SHOW EVENTS;
|
||||
|
||||
--echo
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
SELECT event_name, created, last_altered FROM information_schema.events;
|
||||
|
||||
--echo
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
CREATE EVENT ev2 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
|
||||
|
||||
--echo
|
||||
--error ER_EVENT_OPEN_TABLE_FAILED
|
||||
ALTER EVENT ev1 ON SCHEDULE EVERY 9 HOUR DO SELECT 9;
|
||||
|
||||
--echo
|
||||
DROP TABLE mysql.event;
|
||||
RENAME TABLE event_original TO mysql.event;
|
||||
|
||||
--echo
|
||||
DROP EVENT ev1;
|
||||
|
||||
--echo
|
||||
SHOW EVENTS;
|
||||
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo # End of tests
|
||||
--echo #
|
||||
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from information_schema.processlist
|
||||
|
@ -1,6 +1,8 @@
|
||||
# Can't test with embedded server that doesn't support grants
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
|
||||
#
|
||||
# Test that when the server is restarted, it checks mysql.event table,
|
||||
# and disables the scheduler if it's not up to date.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Test of different EXPLAIN's
|
||||
# Test of different EXPLAINs
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
@ -275,3 +275,24 @@ DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11829785 EXPLAIN EXTENDED CRASH WITH RIGHT OUTER JOIN, SUBQUERIES
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
|
||||
INSERT INTO t1 VALUES (0), (0);
|
||||
|
||||
PREPARE s FROM
|
||||
'EXPLAIN EXTENDED
|
||||
SELECT SUBSTRING(1, (SELECT 1 FROM t1 a1 RIGHT OUTER JOIN t1 ON 0)) AS d
|
||||
FROM t1 WHERE 0 > ANY (SELECT @a FROM t1)';
|
||||
|
||||
--error ER_SUBQUERY_NO_1_ROW
|
||||
EXECUTE s;
|
||||
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
|
@ -773,7 +773,14 @@ drop table t1;
|
||||
#
|
||||
# Bug #50574 5.5.x allows spatial indexes on non-spatial
|
||||
# columns, causing crashes!
|
||||
# Bug#11767480 SPATIAL INDEXES ON NON-SPATIAL COLUMNS
|
||||
# CAUSE CRASHES.
|
||||
#
|
||||
CREATE TABLE t0 (a BINARY(32) NOT NULL);
|
||||
--error ER_SPATIAL_MUST_HAVE_GEOM_COL
|
||||
CREATE SPATIAL INDEX i on t0 (a);
|
||||
INSERT INTO t0 VALUES (1);
|
||||
|
||||
--error ER_SPATIAL_MUST_HAVE_GEOM_COL
|
||||
CREATE TABLE t1(
|
||||
col0 BINARY NOT NULL,
|
||||
@ -811,6 +818,7 @@ CREATE TABLE t3 (
|
||||
);
|
||||
|
||||
# cleanup
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t0, t1, t2;
|
||||
|
||||
|
||||
--echo End of 5.5 tests
|
||||
|
@ -71,3 +71,32 @@ select count(*) from t2;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
||||
#
|
||||
# BUG#12354268
|
||||
#
|
||||
# This test verifies that using --start-position with DECODE-ROWS
|
||||
# does not make mysqlbinlog to output an error stating that it
|
||||
# does not contain any FD event.
|
||||
#
|
||||
|
||||
RESET MASTER;
|
||||
USE test;
|
||||
SET @old_binlog_format= @@binlog_format;
|
||||
SET SESSION binlog_format=ROW;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
--let $master_binlog= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||
--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
|
||||
--let $MYSQLD_DATADIR= `SELECT @@datadir`
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--disable_result_log
|
||||
--exec $MYSQL_BINLOG --base64-output=DECODE-ROWS --start-position=$master_pos -v $MYSQLD_DATADIR/$master_binlog
|
||||
--enable_result_log
|
||||
|
||||
DROP TABLE t1;
|
||||
SET SESSION binlog_format= @old_binlog_format;
|
||||
RESET MASTER;
|
||||
|
@ -2199,7 +2199,7 @@ ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
|
||||
|
||||
DROP DATABASE `test-database`;
|
||||
# Switching back to test database.
|
||||
USE `test`;
|
||||
USE test;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
|
@ -8713,6 +8713,30 @@ call p1(3, 2);
|
||||
drop table t1;
|
||||
drop procedure p1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW)
|
||||
--echo # FAILS IN SET_FIELD_ITERATOR
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
CREATE VIEW v1 AS SELECT a FROM t2;
|
||||
CREATE PROCEDURE proc() SELECT * FROM t1 NATURAL JOIN v1;
|
||||
ALTER TABLE t2 CHANGE COLUMN a b CHAR;
|
||||
|
||||
--echo
|
||||
--error ER_VIEW_INVALID
|
||||
CALL proc();
|
||||
--error ER_VIEW_INVALID
|
||||
CALL proc();
|
||||
|
||||
--echo
|
||||
DROP TABLE t1,t2;
|
||||
DROP VIEW v1;
|
||||
DROP PROCEDURE proc;
|
||||
|
||||
|
||||
--echo
|
||||
--echo # --
|
||||
--echo # -- Bug 11765684 - 58674: SP-cache does not detect changes in
|
||||
|
@ -2583,4 +2583,32 @@ select trigger_name from information_schema.triggers
|
||||
drop temporary table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 6.0 tests.
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo # Bug #12362125: SP INOUT HANDLING IS BROKEN FOR TEXT TYPE.
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1(c TEXT);
|
||||
|
||||
delimiter |;
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE v TEXT;
|
||||
SET v = 'aaa';
|
||||
SET NEW.c = v;
|
||||
END|
|
||||
delimiter ;|
|
||||
|
||||
INSERT INTO t1 VALUES('qazwsxedc');
|
||||
|
||||
SELECT c FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo
|
||||
--echo End of 5.5 tests.
|
||||
|
@ -1519,4 +1519,19 @@ SELECT AVG(DISTINCT a) FROM t1;
|
||||
SELECT SUM(DISTINCT a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#55436: buffer overflow in debug binary of dbug_buff in
|
||||
--echo # Field_new_decimal::store_value
|
||||
--echo #
|
||||
|
||||
# this threw memory warnings on Windows. Also make sure future changes
|
||||
# don't change these results, as per usual.
|
||||
SET SQL_MODE='';
|
||||
CREATE TABLE t1(f1 DECIMAL(44,24)) ENGINE=MYISAM;
|
||||
INSERT INTO t1 SET f1 = -64878E-85;
|
||||
SELECT f1 FROM t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
Reference in New Issue
Block a user