mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
mysql-5.5.18 merge
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -132,3 +132,26 @@ ADD_CUSTOM_TARGET(test-bt-debug
|
||||
COMMAND ${MTR_FORCE} --comment=debug --timer --skip-ndbcluster --skip-rpl --report-features ${EXP}
|
||||
)
|
||||
|
||||
# Process .in files with includes in collections/
|
||||
|
||||
MACRO(PROCESS_COLLECTION_INCLUDE collin collection)
|
||||
FILE(STRINGS ${collin} inlines)
|
||||
FOREACH(line ${inlines})
|
||||
IF(${line} MATCHES "#include .*")
|
||||
STRING(REPLACE "#include " "collections/" incfile ${line})
|
||||
FILE(READ ${incfile} contents)
|
||||
FILE(APPEND ${collection} "${contents}")
|
||||
ELSE()
|
||||
FILE(APPEND ${collection} "${line}\n")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDMACRO()
|
||||
|
||||
FILE(GLOB infiles "collections/*.in")
|
||||
FOREACH(collin ${infiles})
|
||||
STRING(REPLACE ".in" "" collection ${collin})
|
||||
# Only generate file once
|
||||
IF(NOT EXISTS ${collection})
|
||||
PROCESS_COLLECTION_INCLUDE(${collin} ${collection})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -28,3 +28,11 @@ these steps:
|
||||
5) The commands from the collection are run line by line via execv() or
|
||||
similar system calls. They are not run as a shell script. Shell
|
||||
expansions are not guaranteed to work and most likely won't.
|
||||
|
||||
The directory may contain collections that are "super sets" of others,
|
||||
identified by a file name suffix ".in". These files may contain lines
|
||||
"#include <filename>", or lines with mysql-test-run.pl invocations.
|
||||
CMake will create a new file without the .in suffix where
|
||||
the include lines are replaced with the contents of the referred
|
||||
file. Filename is local to the collections directory, and includes do
|
||||
not nest.
|
||||
|
@ -8,16 +8,15 @@ funcs_1.charset_collation_1 # depends on compile-time decisions
|
||||
main.func_math @freebsd # Bug#11751977 2010-05-04 alik main.func_math fails on FreeBSD in PB2
|
||||
main.lock_multi_bug38499 # Bug#11755645 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||
main.outfile_loaddata @solaris # Bug#11755168 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
||||
main.signal_demo3 @solaris # Bug#11755949 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp @solaris # Bug#11755949 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.signal_demo3 @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.sp @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
main.wait_timeout @solaris # Bug#11758972 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_bug37426 # WL#5867: skozlov: test case moved from unused bugs suite
|
||||
rpl.rpl_heartbeat_basic # BUG#12403008 2011-04-27 sven fails sporadically
|
||||
rpl.rpl_show_slave_hosts # BUG#12416700 2011-05-02 sven fails sporadically
|
||||
rpl.rpl_innodb_bug28430 # Bug#11754425
|
||||
rpl.rpl_row_sp011 @solaris # Bug#11753919 2011-07-25 sven Several test cases fail on Solaris with error Thread stack overrun
|
||||
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11755949 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||
sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wait_timeout_func fails
|
||||
|
||||
# BUG #59055 : All ndb tests should be removed from the repository
|
||||
|
@ -1,3 +1,9 @@
|
||||
# This file contains the old default.release, the plan is to replace that
|
||||
# with something like the below (remove space after #):
|
||||
|
||||
# include default.daily
|
||||
# include default.weekly
|
||||
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-ndbcluster --skip-rpl --report-features --debug-server
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --skip-ndbcluster --report-features
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --skip-ndbcluster --ps-protocol
|
@ -1,59 +0,0 @@
|
||||
# BUG#59338 Inconsistency in binlog for statements that don't change any rows STATEMENT SBR
|
||||
# In SBR, if a statement does not fail, it is always written to the binary log,
|
||||
# regardless if rows are changed or not. If there is a failure, a statement is
|
||||
# only written to the binary log if a non-transactional (.e.g. MyIsam) engine
|
||||
# is updated. INSERT ON DUPLICATE KEY UPDATE was not following the rule above
|
||||
# and was not written to the binary log, if then engine was Innodb.
|
||||
#
|
||||
# In this test case, we check if INSERT ON DUPLICATE KEY UPDATE that does not
|
||||
# change anything is still written to the binary log.
|
||||
|
||||
# Prepare environment
|
||||
--connection master
|
||||
|
||||
eval CREATE TABLE t1 (
|
||||
a INT UNSIGNED NOT NULL PRIMARY KEY
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
eval CREATE TABLE t2 (
|
||||
a INT UNSIGNED
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
# An insert duplicate that does not update anything must be written to the binary
|
||||
# log in SBR and MIXED modes. We check this property by summing a before and after
|
||||
# the update and comparing the binlog positions. The sum should be the same at both
|
||||
# points and the statement should be in the binary log.
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT INTO t1 SELECT t2.a FROM t2 ORDER BY t2.a ON DUPLICATE KEY UPDATE t1.a= t1.a
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= SUM(a) = 1 FROM t1
|
||||
--let $assert_text= Sum of elements in t1 should be 1.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT = 'ROW'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT != 'ROW'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 1, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
--source include/assert.inc
|
||||
|
||||
# Compare master and slave
|
||||
--sync_slave_with_master
|
||||
--let $diff_tables= master:test.t1 , slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
drop table t1, t2;
|
||||
--sync_slave_with_master
|
@ -77,6 +77,7 @@ eval create table t2(b int auto_increment, c int, key(b)) engine=$engine_type;
|
||||
insert into t1 values (10);
|
||||
insert into t1 values (null),(null),(null);
|
||||
insert into t2 values (5,0);
|
||||
--disable_warnings ONCE
|
||||
insert into t2 (c) select * from t1 ORDER BY a;
|
||||
select * from t2 ORDER BY b;
|
||||
sync_slave_with_master;
|
||||
@ -113,8 +114,10 @@ set @@session.sql_auto_is_null=1;
|
||||
eval create table t1(a int auto_increment, key(a)) engine=$engine_type;
|
||||
eval create table t2(a int) engine=$engine_type;
|
||||
insert into t1 (a) values (null);
|
||||
--disable_warnings
|
||||
insert into t2 (a) select a from t1 where a is null;
|
||||
insert into t2 (a) select a from t1 where a is null;
|
||||
--enable_warnings
|
||||
select * from t2;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
@ -172,17 +175,15 @@ begin
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
insert into t1 (last_id) values (0);
|
||||
--enable_warnings
|
||||
|
||||
drop trigger t1_bi;
|
||||
|
||||
# Check that nested call doesn't affect outer context.
|
||||
select last_insert_id();
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
select bug15728_insert();
|
||||
--enable_warnings
|
||||
select last_insert_id();
|
||||
insert into t1 (last_id) values (bug15728());
|
||||
# This should be exactly one greater than in the previous call.
|
||||
@ -190,9 +191,8 @@ select last_insert_id();
|
||||
|
||||
# BUG#20339 - stored procedure using LAST_INSERT_ID() does not
|
||||
# replicate statement-based
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
drop procedure if exists foo;
|
||||
--enable_warnings
|
||||
delimiter |;
|
||||
create procedure foo()
|
||||
begin
|
||||
@ -252,6 +252,7 @@ select * from t1 order by n;
|
||||
# table's counter, the counter for next row is bigger than the
|
||||
# after-value of the updated row.
|
||||
connection master;
|
||||
--disable_warnings ONCE
|
||||
insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000;
|
||||
select * from t1 order by n;
|
||||
sync_slave_with_master;
|
||||
@ -270,6 +271,7 @@ delete from t1 where b <> 100;
|
||||
select * from t1 order by n;
|
||||
|
||||
connection master;
|
||||
--disable_warnings ONCE
|
||||
insert into t1 values(null,100),(null,350) on duplicate key update n=2;
|
||||
select * from t1 order by n;
|
||||
sync_slave_with_master;
|
||||
@ -287,6 +289,7 @@ connection master;
|
||||
# testcase with INSERT VALUES
|
||||
eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT,
|
||||
UNIQUE(b)) ENGINE=$engine_type;
|
||||
--disable_warnings ONCE
|
||||
INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
@ -314,19 +317,23 @@ INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c');
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d');
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e');
|
||||
# Updating table t1 based on values from table t2
|
||||
--disable_warnings
|
||||
INSERT INTO t1 (field_1, field_2, field_3)
|
||||
SELECT t2.field_a, t2.field_b, t2.field_c
|
||||
FROM t2
|
||||
ON DUPLICATE KEY UPDATE
|
||||
t1.field_3 = t2.field_c;
|
||||
--enable_warnings
|
||||
# Inserting new record into t2
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f');
|
||||
# Updating t1 again
|
||||
--disable_warnings
|
||||
INSERT INTO t1 (field_1, field_2, field_3)
|
||||
SELECT t2.field_a, t2.field_b, t2.field_c
|
||||
FROM t2
|
||||
ON DUPLICATE KEY UPDATE
|
||||
t1.field_3 = t2.field_c;
|
||||
--enable_warnings
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
@ -433,9 +440,8 @@ delimiter ;|
|
||||
|
||||
INSERT INTO t1 VALUES (NULL, -1);
|
||||
CALL p1();
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
SELECT f1();
|
||||
--enable_warnings
|
||||
INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()),
|
||||
(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2());
|
||||
INSERT INTO t1 VALUES (NULL, f2());
|
||||
@ -504,16 +510,14 @@ insert into t2 (id) values(1),(2),(3);
|
||||
delete from t2;
|
||||
set sql_log_bin=1;
|
||||
#inside SELECT, then inside INSERT
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
select insid();
|
||||
--enable_warnings
|
||||
set sql_log_bin=0;
|
||||
insert into t2 (id) values(5),(6),(7);
|
||||
delete from t2 where id>=5;
|
||||
set sql_log_bin=1;
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
insert into t1 select insid();
|
||||
--enable_warnings
|
||||
select * from t1 order by id;
|
||||
select * from t2 order by id;
|
||||
|
||||
@ -537,6 +541,7 @@ begin
|
||||
insert into t2 values(null,3);
|
||||
end|
|
||||
delimiter ;|
|
||||
--disable_warnings ONCE
|
||||
call foo();
|
||||
select * from t1 order by n;
|
||||
select * from t2 order by id;
|
||||
|
@ -31,7 +31,7 @@ INSERT INTO t2 VALUES (3, 5);
|
||||
INSERT INTO t2 VALUES (4, 3);
|
||||
INSERT INTO t2 VALUES (5, 4);
|
||||
INSERT INTO t2 VALUES (6, 6);
|
||||
|
||||
--disable_warnings ONCE
|
||||
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
|
||||
--let $assert_cond= COUNT(*) = 6 FROM t1
|
||||
--let $assert_text= Count of elements in t1 should be 6.
|
||||
@ -51,25 +51,70 @@ INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a
|
||||
--disable_warnings ONCE
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= COUNT(*) = 6 FROM t1
|
||||
--let $assert_text= Count of elements in t1 should be 6.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT = 'ROW'`)
|
||||
if (`SELECT @@BINLOG_FORMAT != 'STATEMENT'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT != 'ROW'`)
|
||||
if (`SELECT @@BINLOG_FORMAT = 'STATEMENT'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 2, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
|
||||
--source include/assert.inc
|
||||
|
||||
# An insert duplicate that does not update anything must be written to the binary
|
||||
# log in SBR and MIXED modes. We check this property by summing a before and after
|
||||
# the update and comparing the binlog positions. The sum should be the same at both
|
||||
# points and the statement should be in the binary log.
|
||||
--disable_warnings
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t1 (
|
||||
a INT UNSIGNED NOT NULL PRIMARY KEY
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
eval CREATE TABLE t2 (
|
||||
a INT UNSIGNED
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT INTO t1 SELECT t2.a FROM t2 ORDER BY t2.a ON DUPLICATE KEY UPDATE t1.a= t1.a
|
||||
--disable_warnings ONCE
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= SUM(a) = 1 FROM t1
|
||||
--let $assert_text= Sum of elements in t1 should be 1.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT != 'STATEMENT'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT = 'STATEMENT'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 1, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
--source include/assert.inc
|
||||
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
drop table t1, t2;
|
||||
|
@ -80,5 +80,31 @@ reset slave;
|
||||
source include/check_slave_no_error.inc;
|
||||
change master to master_user='root';
|
||||
|
||||
--let $rpl_only_running_threads= 1
|
||||
|
||||
#
|
||||
# BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796
|
||||
#
|
||||
|
||||
reset slave;
|
||||
--source include/start_slave.inc
|
||||
|
||||
--source include/stop_slave.inc
|
||||
--let $_slave_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1)
|
||||
--let $_slave_master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
|
||||
--let $_slave_master_port= query_get_value(SHOW SLAVE STATUS, Master_Port, 1)
|
||||
|
||||
reset slave all;
|
||||
--error ER_BAD_SLAVE
|
||||
start slave;
|
||||
|
||||
--let $_show_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1)
|
||||
if ($_show_master_host != No such row)
|
||||
{
|
||||
die;
|
||||
}
|
||||
|
||||
--replace_result $_slave_master_host MASTER_HOST $_slave_master_user MASTER_USER $_slave_master_port MASTER_PORT
|
||||
--eval CHANGE MASTER TO MASTER_HOST= '$_slave_master_host', MASTER_USER= '$_slave_master_user', MASTER_PORT= $_slave_master_port
|
||||
--source include/start_slave.inc
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
@ -521,10 +521,34 @@ commit;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
--echo # 15. Read-write statement: UPDATE IGNORE, change 0 rows.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
update ignore t1 set a=2 where a=1;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_warnings
|
||||
if (`select @@binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
if (`select @@binlog_format != 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
commit;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
if (`select @@binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
if (`select @@binlog_format != 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
--echo #
|
||||
--echo # Create a stored function that modifies a
|
||||
--echo # non-transactional table. Demonstrate that changes in
|
||||
@ -603,7 +627,9 @@ call p_verify_status_increment(2, 0, 1, 0);
|
||||
|
||||
--echo # 21. Read-write statement: UPDATE, change 0 (transactional) rows.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
update t1 set a=2 where a=f1()+10;
|
||||
--enable_warnings
|
||||
call p_verify_status_increment(2, 0, 1, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(2, 0, 1, 0);
|
||||
@ -703,7 +729,9 @@ call p_verify_status_increment(4, 4, 4, 4);
|
||||
--echo #
|
||||
insert into t2 select a from t1;
|
||||
commit;
|
||||
--disable_warnings
|
||||
replace into t2 select a from t1;
|
||||
--enable_warnings
|
||||
commit;
|
||||
call p_verify_status_increment(8, 8, 8, 8);
|
||||
#
|
||||
|
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_example
|
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_BADNAME
|
||||
daemon_BADNAME
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2007 MySQL AB, 2009, 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Use default setting for mysqld processes
|
||||
!include default_mysqld.cnf
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Default values that applies to all MySQL Servers
|
||||
[mysqld]
|
||||
|
@ -1,3 +1,18 @@
|
||||
-- Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; version 2 of the License.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software Foundation,
|
||||
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
delimiter ||;
|
||||
|
||||
use mtr||
|
||||
@ -12,11 +27,9 @@ BEGIN
|
||||
-- Dump all global variables except those
|
||||
-- that are supposed to change
|
||||
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE variable_name != 'timestamp'
|
||||
WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
|
||||
AND variable_name not like "Last_IO_Err*"
|
||||
AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND
|
||||
variable_name != 'INNODB_FILE_FORMAT_CHECK'
|
||||
ORDER BY variable_name;
|
||||
ORDER BY VARIABLE_NAME;
|
||||
|
||||
-- Dump all databases, there should be none
|
||||
-- except those that was created during bootstrap
|
||||
@ -61,3 +74,13 @@ BEGIN
|
||||
mysql.user;
|
||||
|
||||
END||
|
||||
|
||||
--
|
||||
-- Procedure used by test case used to force all
|
||||
-- servers to restart after testcase and thus skipping
|
||||
-- check test case after test
|
||||
--
|
||||
CREATE DEFINER=root@localhost PROCEDURE force_restart()
|
||||
BEGIN
|
||||
SELECT 1 INTO OUTFILE 'force_restart';
|
||||
END||
|
||||
|
@ -1,3 +1,18 @@
|
||||
-- Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation; version 2 of the License.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software Foundation,
|
||||
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
delimiter ||;
|
||||
|
||||
use mtr||
|
||||
|
@ -26,7 +26,7 @@ perl;
|
||||
|
||||
# And substitute the content some environment variables with their
|
||||
# names:
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
|
||||
|
||||
$re1=join('|', @skipvars, @plugins);
|
||||
$re2=join('|', @plugins);
|
||||
|
@ -39,3 +39,4 @@ ha_archive storage/archive ARCHIVE_PLUGIN
|
||||
ha_blackhole storage/blackhole BLACKHOLE_PLUGIN
|
||||
ha_federated storage/federated FEDERATED_PLUGIN
|
||||
mypluglib plugin/fulltext SIMPLE_PARSER
|
||||
libdaemon_example plugin/daemon_example DAEMONEXAMPLE
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=MIXED;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=ROW;
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
|
@ -1,2 +1,18 @@
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
|
@ -1,5 +1,20 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
package My::Config::Option;
|
||||
|
||||
use strict;
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
|
@ -81,7 +81,7 @@ sub _gdb {
|
||||
return if $? >> 8;
|
||||
return unless $gdb_output;
|
||||
|
||||
resfile_print <<EOF, $gdb_output, "\n";
|
||||
resfile_print <<EOF . $gdb_output . "\n";
|
||||
Output from gdb follows. The first stack trace is from the failing thread.
|
||||
The following stack traces are from all threads (so the failing one is
|
||||
duplicated).
|
||||
@ -245,7 +245,7 @@ sub _cdb {
|
||||
$cdb_output=~ s/^Child\-SP RetAddr Call Site//gm;
|
||||
$cdb_output=~ s/\+0x([0-9a-fA-F]+)//gm;
|
||||
|
||||
resfile_print <<EOF, $cdb_output, "\n";
|
||||
resfile_print <<EOF . $cdb_output . "\n";
|
||||
Output from cdb follows. Faulting thread is printed twice,with and without function parameters
|
||||
Search for STACK_TEXT to see the stack trace of
|
||||
the faulting thread. Callstacks of other threads are printed after it.
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (c) 2008, 2011, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates.
|
||||
# Copyright (c) 2009, 2011 Monty Program Ab
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,6 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2008 MySQL AB
|
||||
# Copyright (c) 2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -339,17 +339,41 @@ sub collect_one_suite
|
||||
for my $skip (@disabled_collection)
|
||||
{
|
||||
if ( open(DISABLED, $skip ) )
|
||||
{
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
{
|
||||
# $^O on Windows considered not generic enough
|
||||
my $plat= (IS_WINDOWS) ? 'windows' : $^O;
|
||||
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
chomp;
|
||||
#diasble the test case if platform matches
|
||||
if ( /\@/ )
|
||||
{
|
||||
if ( /\@$plat/ )
|
||||
{
|
||||
/^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
elsif ( /\@!(\S*)/ )
|
||||
{
|
||||
if ( $1 ne $plat)
|
||||
{
|
||||
/^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
# Read suite.opt file
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2007 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Copyright (c) 2006, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,5 +1,20 @@
|
||||
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
use strict;
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use FindBin;
|
||||
use IO::File;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007, 2008 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use FindBin;
|
||||
use My::SafeProcess;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
|
||||
use My::File::Path;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use IO::File;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
|
||||
use My::File::Path;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Temp qw / tempdir /;
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
@ -1,6 +1,22 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2007 MySQL AB
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
|
@ -1,5 +1,21 @@
|
||||
# -*- cperl -*-
|
||||
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
package My::Config::Option;
|
||||
|
||||
use strict;
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
# Copyright (c) 2005, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004, 2006 MySQL AB
|
||||
# Copyright (c) 2004, 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
# Copyright (c) 2004 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004-2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,5 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2004-2006 MySQL AB
|
||||
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2005-2006 MySQL AB
|
||||
# Copyright (c) 2005, 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,5 +1,6 @@
|
||||
# -*- cperl -*-
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (c) 2006 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -1,7 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
# -*- cperl -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# mysql-test-run.pl
|
||||
|
@ -222,9 +222,9 @@ GetOptions("server-host=s", "server-logs-dir=s", "server-port=s",
|
||||
"test-duration=i", "test-suffix=s", "check-tests-file",
|
||||
"verbose", "log-error-details", "cleanup", "mysqltest=s",
|
||||
# OBN: (changing 'abort-on-error' to numberic for WL-4626/4685)
|
||||
"abort-on-error=i" => \$opt_abort_on_error, "help") || usage();
|
||||
"abort-on-error=i" => \$opt_abort_on_error, "help") || usage(1);
|
||||
|
||||
usage() if ($opt_help);
|
||||
usage(0) if ($opt_help);
|
||||
|
||||
#$opt_abort_on_error=1;
|
||||
|
||||
@ -1115,6 +1115,7 @@ sub sig_TERM_handler
|
||||
|
||||
sub usage
|
||||
{
|
||||
my $retcode= shift;
|
||||
print <<EOF;
|
||||
|
||||
The MySQL Stress suite Ver $stress_suite_version
|
||||
@ -1218,7 +1219,7 @@ perl mysql-stress-test.pl \
|
||||
--cleanup \
|
||||
|
||||
EOF
|
||||
exit(0);
|
||||
exit($retcode);
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,9 +186,11 @@ my $opt_suites;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
our $exe_mysql;
|
||||
our $exe_mysql_plugin;
|
||||
our $exe_mysqladmin;
|
||||
our $exe_mysqltest;
|
||||
our $exe_libtool;
|
||||
our $exe_mysql_embedded;
|
||||
|
||||
our $opt_big_test= 0;
|
||||
our $opt_staging_run= 0;
|
||||
@ -198,6 +200,8 @@ our @opt_combinations;
|
||||
our @opt_extra_mysqld_opt;
|
||||
our @opt_mysqld_envs;
|
||||
|
||||
my $opt_stress;
|
||||
|
||||
my $opt_compress;
|
||||
my $opt_ssl;
|
||||
my $opt_skip_ssl;
|
||||
@ -237,10 +241,13 @@ our %gprof_dirs;
|
||||
our $glob_debugger= 0;
|
||||
our $opt_gdb;
|
||||
our $opt_client_gdb;
|
||||
my $opt_boot_gdb;
|
||||
our $opt_dbx;
|
||||
our $opt_client_dbx;
|
||||
my $opt_boot_dbx;
|
||||
our $opt_ddd;
|
||||
our $opt_client_ddd;
|
||||
my $opt_boot_ddd;
|
||||
our $opt_manual_gdb;
|
||||
our $opt_manual_dbx;
|
||||
our $opt_manual_ddd;
|
||||
@ -404,6 +411,7 @@ sub main {
|
||||
}
|
||||
}
|
||||
}
|
||||
mtr_report("Using suites: $opt_suites") unless @opt_cases;
|
||||
|
||||
print "vardir: $opt_vardir\n";
|
||||
initialize_servers();
|
||||
@ -469,8 +477,8 @@ sub main {
|
||||
}
|
||||
$ENV{MTR_PARALLEL} = $opt_parallel;
|
||||
|
||||
if ($opt_parallel > 1 && $opt_start_exit) {
|
||||
mtr_warning("Parallel and --start-and-exit cannot be combined\n" .
|
||||
if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) {
|
||||
mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" .
|
||||
"Setting parallel to 1");
|
||||
$opt_parallel= 1;
|
||||
}
|
||||
@ -693,8 +701,9 @@ sub run_test_server ($$$) {
|
||||
my $core_file= $File::Find::name;
|
||||
my $core_name= basename($core_file);
|
||||
|
||||
if ($core_name =~ /^core/ or # Starting with core
|
||||
(IS_WINDOWS and $core_name =~ /\.dmp$/)){
|
||||
# Name beginning with core, not ending in .gz
|
||||
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
|
||||
or (IS_WINDOWS and $core_name =~ /\.dmp$/)){
|
||||
# Ending with .dmp
|
||||
mtr_report(" - found '$core_name'",
|
||||
"($num_saved_cores/$opt_max_save_core)");
|
||||
@ -1167,14 +1176,17 @@ sub command_line_setup {
|
||||
'gdb' => \$opt_gdb,
|
||||
'client-gdb' => \$opt_client_gdb,
|
||||
'manual-gdb' => \$opt_manual_gdb,
|
||||
'boot-gdb' => \$opt_boot_gdb,
|
||||
'manual-debug' => \$opt_manual_debug,
|
||||
'ddd' => \$opt_ddd,
|
||||
'client-ddd' => \$opt_client_ddd,
|
||||
'manual-ddd' => \$opt_manual_ddd,
|
||||
'boot-ddd' => \$opt_boot_ddd,
|
||||
'dbx' => \$opt_dbx,
|
||||
'client-dbx' => \$opt_client_dbx,
|
||||
'manual-dbx' => \$opt_manual_dbx,
|
||||
'debugger=s' => \$opt_debugger,
|
||||
'boot-dbx' => \$opt_boot_dbx,
|
||||
'client-debugger=s' => \$opt_client_debugger,
|
||||
'strace' => \$opt_strace,
|
||||
'strace-client:s' => \$opt_strace_client,
|
||||
@ -1247,6 +1259,7 @@ sub command_line_setup {
|
||||
'default-myisam!' => \&collect_option,
|
||||
'report-times' => \$opt_report_times,
|
||||
'result-file' => \$opt_resfile,
|
||||
'stress=s' => \$opt_stress,
|
||||
|
||||
'help|h' => \$opt_usage,
|
||||
# list-options is internal, not listed in help
|
||||
@ -1689,6 +1702,21 @@ sub command_line_setup {
|
||||
mtr_error("--wait-all can only be used with --start options");
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Gather stress-test options and modify behavior
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
if ($opt_stress)
|
||||
{
|
||||
$opt_stress=~ s/,/ /g;
|
||||
$opt_user_args= 1;
|
||||
mtr_error("--stress cannot be combined with named ordinary suites or tests")
|
||||
if $opt_suites || @opt_cases;
|
||||
$opt_suites="stress";
|
||||
@opt_cases= ("wrapper");
|
||||
$ENV{MST_OPTIONS}= $opt_stress;
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check timeout arguments
|
||||
# --------------------------------------------------------------------------
|
||||
@ -2025,6 +2053,9 @@ sub executable_setup () {
|
||||
# Look for the client binaries
|
||||
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
|
||||
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
|
||||
$exe_mysql_plugin= mtr_exe_exists("$path_client_bindir/mysql_plugin");
|
||||
|
||||
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
|
||||
|
||||
if ( ! $opt_skip_ndbcluster )
|
||||
{
|
||||
@ -2243,8 +2274,10 @@ sub find_plugin($$)
|
||||
my $lib_plugin=
|
||||
mtr_file_exists(vs_config_dirs($location,$plugin_filename),
|
||||
"$basedir/lib/plugin/".$plugin_filename,
|
||||
"$basedir/lib64/plugin/".$plugin_filename,
|
||||
"$basedir/$location/.libs/".$plugin_filename,
|
||||
"$basedir/lib/mysql/plugin/".$plugin_filename,
|
||||
"$basedir/lib64/mysql/plugin/".$plugin_filename,
|
||||
);
|
||||
return $lib_plugin;
|
||||
}
|
||||
@ -2354,12 +2387,6 @@ sub environment_setup {
|
||||
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
|
||||
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
|
||||
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
|
||||
# Used for guessing default plugin dir, we can't really know for sure
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
|
||||
# Override if this does not exist, but lib64 does (best effort)
|
||||
if (! -d "$basedir/lib" && -d "$basedir/lib64") {
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib64";
|
||||
}
|
||||
$ENV{'MYSQL_BINDIR'}= "$bindir";
|
||||
$ENV{'MYSQL_SHAREDIR'}= $path_language;
|
||||
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
|
||||
@ -2427,6 +2454,14 @@ sub environment_setup {
|
||||
$ENV{'MYSQLADMIN'}= client_arguments("mysqladmin");
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments();
|
||||
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
|
||||
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
|
||||
|
||||
my $exe_mysqld= find_mysqld($basedir);
|
||||
$ENV{'MYSQLD'}= $exe_mysqld;
|
||||
my $extra_opts= join (" ", @opt_extra_mysqld_opt);
|
||||
$ENV{'MYSQLD_CMD'}= "$exe_mysqld --defaults-group-suffix=.1 ".
|
||||
"--defaults-file=$path_config_file $extra_opts";
|
||||
|
||||
# ----------------------------------------------------
|
||||
# bug25714 executable may _not_ exist in
|
||||
@ -3475,6 +3510,19 @@ sub mysql_install_db {
|
||||
# ----------------------------------------------------------------------
|
||||
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
|
||||
|
||||
if ($opt_boot_gdb) {
|
||||
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
if ($opt_boot_dbx) {
|
||||
dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
if ($opt_boot_ddd) {
|
||||
ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
|
||||
my $path_sql= my_find_file($install_basedir,
|
||||
["mysql", "sql/share", "share/mariadb",
|
||||
"share/mysql", "share", "scripts"],
|
||||
@ -4577,6 +4625,11 @@ sub extract_server_log ($$) {
|
||||
else
|
||||
{
|
||||
push(@lines, $line);
|
||||
if (scalar(@lines) > 1000000) {
|
||||
$Ferr = undef;
|
||||
mtr_warning("Too much log from test, bailing out from extracting");
|
||||
return ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5906,16 +5959,19 @@ sub gdb_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Write $args to gdb init file
|
||||
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
|
||||
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
|
||||
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join(" ", @$$args);
|
||||
$input = $input ? "< $input" : "";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file, "set args $str\n");
|
||||
mtr_tofile($gdb_init_file, "set args $str $input\n");
|
||||
|
||||
if ( $opt_manual_gdb )
|
||||
{
|
||||
@ -5954,16 +6010,19 @@ sub ddd_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Write $args to ddd init file
|
||||
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
|
||||
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
|
||||
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join(" ", @$$args);
|
||||
$input = $input ? "< $input" : "";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file, "file $$exe\nset args $str\n");
|
||||
mtr_tofile($gdb_init_file, "file $$exe\nset args $str $input\n");
|
||||
|
||||
if ( $opt_manual_ddd )
|
||||
{
|
||||
@ -5999,14 +6058,16 @@ sub dbx_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join " ", @$$args;
|
||||
my $runline= $input ? "run $str < $input" : "run $str";
|
||||
|
||||
if ( $opt_manual_dbx ) {
|
||||
print "\nTo start dbx for $type, type in another window:\n";
|
||||
print "cd $glob_mysql_test_dir; dbx -c \"stop in main; " .
|
||||
"run $str\" $$exe\n";
|
||||
"$runline\" $$exe\n";
|
||||
|
||||
# Indicate the exe should not be started
|
||||
$$exe= undef;
|
||||
@ -6025,7 +6086,7 @@ sub dbx_arguments {
|
||||
|
||||
mtr_add_arg($$args, "dbx");
|
||||
mtr_add_arg($$args, "-c");
|
||||
mtr_add_arg($$args, "stop in main; run $str");
|
||||
mtr_add_arg($$args, "stop in main; $runline");
|
||||
mtr_add_arg($$args, "$$exe");
|
||||
|
||||
$$exe= "xterm";
|
||||
@ -6319,11 +6380,15 @@ Options to run test on running server
|
||||
|
||||
Options for debugging the product
|
||||
|
||||
boot-dbx Start bootstrap server in dbx
|
||||
boot-ddd Start bootstrap server in ddd
|
||||
boot-gdb Start bootstrap server in gdb
|
||||
client-dbx Start mysqltest client in dbx
|
||||
client-ddd Start mysqltest client in ddd
|
||||
client-debugger=NAME Start mysqltest in the selected debugger
|
||||
client-gdb Start mysqltest client in gdb
|
||||
client-dbx Start mysqltest client in dbx
|
||||
ddd Start mysqld in ddd
|
||||
dbx Start the mysqld(s) in dbx
|
||||
ddd Start the mysqld(s) in ddd
|
||||
debug Dump trace output for all servers and client programs
|
||||
debug-common Same as debug, but sets 'd' debug flags to
|
||||
"query,info,error,enter,exit"
|
||||
@ -6331,7 +6396,6 @@ Options for debugging the product
|
||||
tracing
|
||||
debugger=NAME Start mysqld in the selected debugger
|
||||
gdb Start the mysqld(s) in gdb
|
||||
dbx Start the mysqld(s) in dbx
|
||||
manual-debug Let user manually start mysqld in debugger, before
|
||||
running test(s)
|
||||
manual-gdb Let user manually start mysqld in gdb, before running
|
||||
@ -6446,6 +6510,8 @@ Misc options
|
||||
engine to InnoDB.
|
||||
report-times Report how much time has been spent on different
|
||||
phases of test execution.
|
||||
stress=ARGS Run stress test, providing options to
|
||||
mysql-stress-test.pl. Options are separated by comma.
|
||||
|
||||
Some options that control enabling a feature for normal test runs,
|
||||
can be turned off by prepending 'no' to the option, e.g. --notimer.
|
||||
|
@ -1252,6 +1252,35 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (a TEXT, id INT, b INT);
|
||||
ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for bug #12652385 - "61493: REORDERING COLUMNS TO POSITION
|
||||
# FIRST CAN CAUSE DATA TO BE CORRUPTED".
|
||||
#
|
||||
drop table if exists t1;
|
||||
# Use MyISAM engine as the fact that InnoDB doesn't support
|
||||
# in-place ALTER TABLE in cases when columns are being renamed
|
||||
# hides some bugs.
|
||||
create table t1 (i int, j int) engine=myisam;
|
||||
insert into t1 value (1, 2);
|
||||
# First, test for original problem described in the bug report.
|
||||
select * from t1;
|
||||
i j
|
||||
1 2
|
||||
# Change of column order by the below ALTER TABLE statement should
|
||||
# affect both column names and column contents.
|
||||
alter table t1 modify column j int first;
|
||||
select * from t1;
|
||||
j i
|
||||
2 1
|
||||
# Now test for similar problem with the same root.
|
||||
# The below ALTER TABLE should change not only the name but
|
||||
# also the value for the last column of the table.
|
||||
alter table t1 drop column i, add column k int default 0;
|
||||
select * from t1;
|
||||
j k
|
||||
2 0
|
||||
# Clean-up.
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1(c CHAR(10),
|
||||
i INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY);
|
||||
|
24
mysql-test/r/auth_rpl.result
Normal file
24
mysql-test/r/auth_rpl.result
Normal file
@ -0,0 +1,24 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
[connection slave]
|
||||
include/stop_slave.inc
|
||||
[connection master]
|
||||
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
||||
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
||||
FLUSH PRIVILEGES;
|
||||
[connection slave]
|
||||
CHANGE MASTER TO
|
||||
MASTER_USER= 'plug_user',
|
||||
MASTER_PASSWORD= 'plug_user';
|
||||
include/start_slave.inc
|
||||
# Slave in-sync with master now.
|
||||
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
||||
user plugin authentication_string
|
||||
plug_user test_plugin_server plug_user
|
||||
# Cleanup (on slave).
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USER='root';
|
||||
DROP USER 'plug_user';
|
||||
# Cleanup (on master).
|
||||
DROP USER 'plug_user';
|
||||
include/rpl_end.inc
|
@ -549,11 +549,9 @@ SUCCESS
|
||||
# 15. Read-write statement: UPDATE IGNORE, change 0 rows.
|
||||
#
|
||||
update ignore t1 set a=2 where a=1;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
SUCCESS
|
||||
|
||||
commit;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
SUCCESS
|
||||
|
||||
#
|
||||
|
@ -29,4 +29,14 @@ SET lc_messages=cs_CZ;
|
||||
SET NAMES UTF8;
|
||||
USE nonexistant;
|
||||
ERROR 42000: Nezn-Bámá databáze 'nonexistant'
|
||||
End of 5.4 tests
|
||||
#
|
||||
# Bug#12736295: Buffer overflow for variable converted_err
|
||||
# with non-latin1 server error message
|
||||
#
|
||||
# Connection con1
|
||||
SET lc_messages=ru_RU;
|
||||
SET NAMES latin1;
|
||||
SELECT '01234567890123456789012345678901234\';
|
||||
ERROR 42000: \0423 \0432\0430\0441 \043E\0448\0438\0431\043A\0430 \0432 \0437\0430\043F\0440\043E\0441\0435. \0418\0437\0443\0447\0438\0442\0435 \0434\043E\043A\0443\043C\0435\043D\0442\0430\0446\0438\044E \043F\043E \0438\0441\043F\043E\043B\044C\0437\0443\0435\043C\043E\0439 \0432\0435\0440\0441\0438\0438 MySQL \043D\0430 \043F\0440\0435\0434\043C\0435\0442 \043A\043E\0440\0440\0435\043A\0442\043D\043E\0433\043E \0441\0438\043D\0442\0430\043A\0441\0438\0441\0430 \043E\043A\043E\043B\043E ''012345678901234567890123456
|
||||
# Connection default
|
||||
End of 5.5 tests
|
||||
|
@ -1118,5 +1118,14 @@ CASE s1 WHEN 'a' THEN 'b' ELSE 'c' END
|
||||
b
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12340997
|
||||
# DATE_ADD/DATE_SUB WITH INTERVAL CRASHES IN GET_INTERVAL_VALUE()
|
||||
#
|
||||
SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second));
|
||||
space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -2415,5 +2415,25 @@ HEX(s1)
|
||||
00000061
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #12319710 : INVALID MEMORY READ AND/OR CRASH IN
|
||||
# MY_UCA_CHARCMP WITH UTF32
|
||||
#
|
||||
SET collation_connection=utf32_unicode_ci;
|
||||
CREATE TABLE t1 (a TEXT CHARACTER SET utf32 COLLATE utf32_turkish_ci NOT NULL);
|
||||
INSERT INTO t1 VALUES ('a'), ('b');
|
||||
CREATE TABLE t2 (b VARBINARY(5) NOT NULL);
|
||||
#insert chars outside of BMP
|
||||
INSERT INTO t2 VALUEs (0x082837),(0x082837);
|
||||
#test for read-out-of-bounds with non-BMP chars as a LIKE pattern
|
||||
SELECT * FROM t1,t2 WHERE a LIKE b;
|
||||
a b
|
||||
#test the original statement
|
||||
SELECT 1 FROM t1 AS t1_0 NATURAL LEFT OUTER JOIN t2 AS t2_0
|
||||
RIGHT JOIN t1 AS t1_1 ON t1_0.a LIKE t2_0.b;
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -7,6 +7,6 @@ PRIMARY KEY (`ID_MEMBER`,`ID_BOARD`),
|
||||
KEY `logTime` (`logTime`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci;
|
||||
INSERT INTO `t_bug21476` VALUES (2,2,1154870939,0),(1,2,1154870957,0),(2,183,1154941362,0),(2,84,1154904301,0),(1,84,1154905867,0),(2,13,1154947484,10271),(3,84,1154880549,0),(1,6,1154892183,0),(2,25,1154947581,10271),(3,25,1154904760,0),(1,25,1154947373,10271),(1,179,1154899992,0),(2,179,1154899410,0),(5,25,1154901666,0),(2,329,1154902026,0),(3,329,1154902040,0),(1,329,1154902058,0),(1,13,1154930841,0),(3,85,1154904987,0),(1,183,1154929665,0),(3,13,1154931268,0),(1,85,1154936888,0),(1,169,1154937959,0),(2,169,1154941717,0),(3,183,1154939810,0),(3,169,1154941734,0);
|
||||
Assertion: mysql_errno 1436 == 1436
|
||||
Assertion: mysql_errname ER_STACK_OVERRUN_NEED_MORE == ER_STACK_OVERRUN_NEED_MORE
|
||||
DROP TABLE `t_bug21476`;
|
||||
End of 5.0 tests.
|
||||
|
@ -182,9 +182,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
2 SUBQUERY t system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where 0
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` where 0
|
||||
SET SESSION sql_mode=@old_sql_mode;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
|
@ -466,3 +466,26 @@ ALTER TABLE t1 COMMENT 'test';
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test for bug #12641342 - "61401: UPDATE PERFORMANCE DEGRADES
|
||||
# GRADUALLY IF A TRIGGER EXISTS".
|
||||
#
|
||||
# One of side-effects of this bug was that a transaction which
|
||||
# involved DML statements requiring prelocking blocked concurrent
|
||||
# FLUSH TABLES WITH READ LOCK for the whole its duration, while
|
||||
# correct behavior in this case is to block FTWRL only for duration
|
||||
# of individual DML statements.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY, value INT);
|
||||
INSERT INTO t1 VALUES (1, 1);
|
||||
CREATE TRIGGER t1_au AFTER UPDATE ON t1 FOR EACH ROW SET @var = "a";
|
||||
BEGIN;
|
||||
UPDATE t1 SET value= value + 1 WHERE id = 1;
|
||||
# Switching to connection 'con1'.
|
||||
# The below FLUSH TABLES WITH READ LOCK should succeed and
|
||||
# should not be blocked by the transaction in default connection.
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
UNLOCK TABLES;
|
||||
# Switching to connection 'default'.
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
|
@ -527,7 +527,7 @@ select "123456789012345678901234567890.123456789012345678901234567890" div 1 as
|
||||
ERROR 22003: BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1916 Got overflow when converting '123456789012345678901234567890.123456789012345678901234567890000000' to INT. Value truncated.
|
||||
Warning 1916 Got overflow when converting '123456789012345678901234567890' to INT. Value truncated.
|
||||
Error 1690 BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)'
|
||||
#
|
||||
# Bug#57810 case/when/then : Assertion failed: length || !scale
|
||||
@ -727,3 +727,32 @@ select (1.175494351E-37 div 1.7976931348623157E+308);
|
||||
0
|
||||
Warnings:
|
||||
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated.
|
||||
#
|
||||
# Bug#12537160 ASSERTION FAILED:
|
||||
# STOP0 <= &TO->BUF[TO->LEN] WITH LARGE NUMBER.
|
||||
#
|
||||
select 999999999999999999999999999999999999999999999999999999999999999999999999999999999 % 0.1 as foo;
|
||||
foo
|
||||
0.0
|
||||
select 999999999999999999999999999999999999999999999999999999999999999999999999999999999 % 0.0 as foo;
|
||||
foo
|
||||
NULL
|
||||
#
|
||||
# Bug#12711164 - 61676:
|
||||
# RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE
|
||||
#
|
||||
select 5 div 2;
|
||||
5 div 2
|
||||
2
|
||||
select 5.0 div 2.0;
|
||||
5.0 div 2.0
|
||||
2
|
||||
select 5.0 div 2;
|
||||
5.0 div 2
|
||||
2
|
||||
select 5 div 2.0;
|
||||
5 div 2.0
|
||||
2
|
||||
select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
|
||||
5.9 div 2 1.23456789e3 DIV 2 1.23456789e9 DIV 2 1.23456789e19 DIV 2
|
||||
2 617 617283945 6172839450000000000
|
||||
|
@ -2786,5 +2786,40 @@ format(123,2,'no_NO')
|
||||
123,00
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
|
||||
#
|
||||
SELECT (rpad(1.0,2048,1)) IS NOT FALSE;
|
||||
(rpad(1.0,2048,1)) IS NOT FALSE
|
||||
1
|
||||
SELECT ((+0) IN
|
||||
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
|
||||
(32767.1)));
|
||||
((+0) IN
|
||||
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
|
||||
(32767.1)))
|
||||
0
|
||||
SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
|
||||
((rpad(1.0,2048,1)) = ('4(') ^ (0.1))
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '4('
|
||||
SELECT
|
||||
pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
|
||||
ERROR 22003: DOUBLE value is out of range in 'pow(rpad(10.0,2048,1),0x07ffffffffff)'
|
||||
SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
|
||||
((rpad(1.0,2048,1)) + (0) ^ ('../'))
|
||||
1.011111111111111
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '../'
|
||||
SELECT stddev_samp(rpad(1.0,2048,1));
|
||||
stddev_samp(rpad(1.0,2048,1))
|
||||
NULL
|
||||
SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));
|
||||
((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)))
|
||||
1
|
||||
SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
|
||||
((0xf3) * (rpad(1.0,2048,1)) << (0xcc))
|
||||
0
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -1426,6 +1426,12 @@ NULL
|
||||
SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
|
||||
WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
|
||||
NULL
|
||||
#
|
||||
# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
|
||||
#
|
||||
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect date value: '0000-00-00'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#57039: constant subtime expression returns incorrect result.
|
||||
|
@ -1076,4 +1076,21 @@ SPATIAL INDEX i1 (col1, col2)
|
||||
);
|
||||
ERROR HY000: Incorrect arguments to SPATIAL INDEX
|
||||
DROP TABLE t0, t1, t2;
|
||||
#
|
||||
# Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE
|
||||
#
|
||||
CREATE TABLE g1
|
||||
(a geometry NOT NULL, UNIQUE KEY i (a(151))) engine=myisam;
|
||||
INSERT INTO g1 VALUES (geomfromtext('point(1 1)'));
|
||||
INSERT INTO g1 VALUES (geomfromtext('point(1 2)'));
|
||||
FLUSH TABLES;
|
||||
SELECT 1 FROM g1
|
||||
FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month)
|
||||
;
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?'
|
||||
Warning 1441 Datetime function: datetime field overflow
|
||||
Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\x00@'
|
||||
DROP TABLE g1;
|
||||
End of 5.5 tests
|
||||
|
@ -1671,7 +1671,7 @@ c (SELECT a FROM t1 WHERE b = c)
|
||||
SELECT b c, (SELECT a FROM t1 WHERE b = c)
|
||||
FROM t1
|
||||
HAVING b = 10;
|
||||
ERROR 42000: non-grouping field 'b' is used in HAVING clause
|
||||
ERROR 42000: Non-grouping field 'b' is used in HAVING clause
|
||||
SELECT MAX(b) c, (SELECT a FROM t1 WHERE b = c)
|
||||
FROM t1
|
||||
HAVING b = 10;
|
||||
@ -1904,6 +1904,38 @@ a AVG(t1.b) t11c t12c
|
||||
1 4.0000 6 6
|
||||
2 2.0000 7 7
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
|
||||
# by functions
|
||||
#
|
||||
SET SQL_BIG_TABLES=1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM '');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),'');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
DROP TABLE t1;
|
||||
SET SQL_BIG_TABLES=0;
|
||||
# End of 5.1 tests
|
||||
#
|
||||
# Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00
|
||||
|
@ -419,7 +419,7 @@ select f1 from t1 group by f1 having max(f1)=f1;
|
||||
f1
|
||||
set session sql_mode='ONLY_FULL_GROUP_BY';
|
||||
select f1 from t1 having max(f1)=f1;
|
||||
ERROR 42000: non-grouping field 'f1' is used in HAVING clause
|
||||
ERROR 42000: Non-grouping field 'f1' is used in HAVING clause
|
||||
select f1 from t1 group by f1 having max(f1)=f1;
|
||||
f1
|
||||
set session sql_mode='';
|
||||
|
@ -715,8 +715,8 @@ create table t1 (c char(10)) engine=memory;
|
||||
create table t2 (c varchar(10)) engine=memory;
|
||||
show table status like 't_';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1(a VARCHAR(1), b VARCHAR(2), c VARCHAR(256),
|
||||
KEY(a), KEY(b), KEY(c)) ENGINE=MEMORY;
|
||||
|
@ -1814,5 +1814,119 @@ unlock tables;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
#
|
||||
# Test for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD FOR
|
||||
# CERTAIN QUERIES TO INFORMATION_SCHEMA".
|
||||
#
|
||||
# Check that metadata locks which are acquired during the process
|
||||
# of opening tables/.FRMs/.TRG files while filling I_S table are
|
||||
# not kept to the end of statement. Keeping the locks has caused
|
||||
# performance problems in cases when big number of tables (.FRMs
|
||||
# or .TRG files) were scanned as cost of new lock acquisition has
|
||||
# increased linearly.
|
||||
drop database if exists mysqltest;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create table t0 (i int);
|
||||
create table t1 (j int);
|
||||
create table t2 (k int);
|
||||
#
|
||||
# Test that we don't keep locks in case when we to fill
|
||||
# I_S table we perform full-blown table open.
|
||||
#
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select table_name, auto_increment from information_schema.tables where table_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
table_name auto_increment
|
||||
t0 NULL
|
||||
t1 NULL
|
||||
t2 NULL
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Now test that we don't keep locks in case when we to fill
|
||||
# I_S table we read .FRM or .TRG file only (this was the case
|
||||
# for which problem existed).
|
||||
#
|
||||
rename table t4 to t0;
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select event_object_table, trigger_name from information_schema.triggers where event_object_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
event_object_table trigger_name
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Clean-up.
|
||||
drop database mysqltest;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -904,7 +904,8 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Error Table 'test.t1' doesn't exist
|
||||
test.tm1 check Error Table 'test.t1' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
CREATE TABLE t1(a INT);
|
||||
@ -912,7 +913,7 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Error Table 'test.t2' doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
CREATE TABLE t2(a BLOB);
|
||||
@ -920,7 +921,7 @@ SELECT * FROM tm1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
CHECK TABLE tm1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.tm1 check Warning Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.tm1 check error Corrupt
|
||||
ALTER TABLE t2 MODIFY a INT;
|
||||
@ -3618,7 +3619,7 @@ test.t1 analyze Error Unable to open underlying table which is differently defin
|
||||
test.t1 analyze error Corrupt
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Table 'test.t_not_exists' doesn't exist
|
||||
test.t1 check Error Table 'test.t_not_exists' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 check error Corrupt
|
||||
CHECKSUM TABLE t1;
|
||||
@ -3634,7 +3635,7 @@ test.t1 optimize Error Unable to open underlying table which is differently defi
|
||||
test.t1 optimize error Corrupt
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair Error Table 'test.t_not_exists' doesn't exist
|
||||
test.t1 repair Error Table 'test.t_not_exists' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 repair Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.t1 repair error Corrupt
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
@ -3660,4 +3661,37 @@ ALTER TABLE t1 engine=myisam;
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m1, t1;
|
||||
End of 6.0 tests
|
||||
#
|
||||
# Test for bug #11754210 - "45777: CHECK TABLE DOESN'T SHOW ALL
|
||||
# PROBLEMS FOR MERGE TABLE COMPLIANCE IN 5.1"
|
||||
#
|
||||
drop tables if exists t1, t2, t3, t4, m1;
|
||||
create table t1(id int) engine=myisam;
|
||||
create view t3 as select 1 as id;
|
||||
create table t4(id int) engine=memory;
|
||||
create table m1(id int) engine=merge union=(t1,t2,t3,t4);
|
||||
select * from m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
# The below CHECK and REPAIR TABLE statements should
|
||||
# report all problems with underlying tables:
|
||||
# - absence of 't2',
|
||||
# - missing base table for 't3',
|
||||
# - wrong engine of 't4'.
|
||||
check table m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 check Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Table 'test.t3' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Table 'test.t4' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 check error Corrupt
|
||||
repair table m1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.m1 repair Error Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Table 'test.t3' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Table 'test.t4' is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair Error Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
test.m1 repair error Corrupt
|
||||
# Clean-up.
|
||||
drop tables m1, t1, t4;
|
||||
drop view t3;
|
||||
End of 5.5 tests
|
||||
|
@ -118,3 +118,35 @@ Aborted: file is not compressed
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
#
|
||||
# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
|
||||
FLUSH TABLE t1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
|
||||
a
|
||||
aaaa
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
|
||||
a
|
||||
aaaa
|
||||
DROP TABLE t1;
|
||||
# Test table with key_reflength > rec_reflength
|
||||
CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
|
||||
# Populating a table, so it's index file exceeds 65K
|
||||
# Populating a table, so index file has second level fulltext tree
|
||||
FLUSH TABLE t1;
|
||||
# Compressing table
|
||||
# Fixing index (repair by sort)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
FLUSH TABLE t1;
|
||||
# Fixing index (repair with keycache)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
|
110
mysql-test/r/mysql_plugin.result
Normal file
110
mysql-test/r/mysql_plugin.result
Normal file
@ -0,0 +1,110 @@
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Enable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin is now loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
daemon_example libdaemon_example.so
|
||||
#
|
||||
# Disable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Attempt to load non-existant plugin
|
||||
#
|
||||
ERROR: Cannot read plugin config file NOT_THERE_AT_ALL. File does not exist.
|
||||
#
|
||||
# Attempt to use non-existant plugin.ini file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to omit the plugin
|
||||
#
|
||||
ERROR: No plugin specified.
|
||||
#
|
||||
# Attempt to omit DISABLE|ENABLE
|
||||
#
|
||||
ERROR: missing operation. Please specify either '<plugin> ENABLE' or '<plugin> DISABLE'.
|
||||
#
|
||||
# Attempt to use bad paths - datadir
|
||||
#
|
||||
ERROR: Cannot access datadir at '/data_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - basedir
|
||||
#
|
||||
ERROR: Cannot access basedir at '/basedir_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - plugin_dir
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to use bad paths - mysqld
|
||||
#
|
||||
ERROR: Cannot access mysqld path '/mysqld_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - my_print_defaults
|
||||
#
|
||||
ERROR: Cannot access my-print-defaults path '/my_print_defaults_not_there/'.
|
||||
#
|
||||
# Missing library
|
||||
#
|
||||
ERROR: The plugin library is missing or in a different location.
|
||||
#
|
||||
# Bad format for config file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. Bad format in plugin configuration file.
|
||||
#
|
||||
# Missing base_dir option
|
||||
#
|
||||
ERROR: Missing --basedir option.
|
||||
#
|
||||
# Missing data_dir option
|
||||
#
|
||||
ERROR: Missing --datadir option.
|
||||
#
|
||||
# Missing plugin_dir option
|
||||
#
|
||||
ERROR: Missing --plugin_dir option.
|
||||
#
|
||||
# Show the help.
|
||||
#
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
||||
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Enable or disable plugins.
|
||||
|
||||
Usage: mysql_plugin [options] <plugin> ENABLE|DISABLE
|
||||
|
||||
Options:
|
||||
-?, --help Display this help and exit.
|
||||
-b, --basedir=name The basedir for the server.
|
||||
-d, --datadir=name The datadir for the server.
|
||||
-p, --plugin-dir=name
|
||||
The plugin dir for the server.
|
||||
-i, --plugin-ini=name
|
||||
Read plugin information from configuration file specified
|
||||
instead of from <plugin-dir>/<plugin_name>.ini.
|
||||
-n, --no-defaults Do not read values from configuration file.
|
||||
-P, --print-defaults
|
||||
Show default values from configuration file.
|
||||
-m, --mysqld=name Path to mysqld executable. Example: /sbin/temp1/mysql/bin
|
||||
-f, --my-print-defaults=name
|
||||
Path to my_print_defaults executable. Example:
|
||||
/source/temp11/extra
|
||||
-v, --verbose More verbose output; you can use this multiple times to
|
||||
get even more verbose output.
|
||||
-V, --version Output version information and exit.
|
||||
|
||||
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
@ -44,9 +44,6 @@ The following options may be given as the first argument:
|
||||
Type of BINLOG_CHECKSUM_ALG. Include checksum for log
|
||||
events in the binary log. Possible values are NONE and
|
||||
CRC32; default is NONE.
|
||||
--binlog-dbug-fsync-sleep=#
|
||||
Extra sleep (in microseconds) to add to binlog fsync(),
|
||||
for debugging
|
||||
--binlog-direct-non-transactional-updates
|
||||
Causes updates to non-transactional engines using
|
||||
statement format to be written directly to binary log.
|
||||
@ -864,7 +861,6 @@ bind-address (No default value)
|
||||
binlog-annotate-rows-events FALSE
|
||||
binlog-cache-size 32768
|
||||
binlog-checksum NONE
|
||||
binlog-dbug-fsync-sleep 0
|
||||
binlog-direct-non-transactional-updates FALSE
|
||||
binlog-format STATEMENT
|
||||
binlog-optimize-thread-scheduling TRUE
|
||||
|
@ -1,7 +1,6 @@
|
||||
-1 before test
|
||||
<No error> before test
|
||||
SET GLOBAL max_connections = 1000;
|
||||
select 0 as "before_use_test" ;
|
||||
before_use_test
|
||||
0
|
||||
select otto from (select 1 as otto) as t1;
|
||||
otto
|
||||
1
|
||||
@ -25,27 +24,32 @@ mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' fai
|
||||
select otto from (select 1 as otto) as t1;
|
||||
otto
|
||||
1
|
||||
|
||||
select 0 as "after_successful_stmt_errno" ;
|
||||
after_successful_stmt_errno
|
||||
0
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_wrong_syntax_errno" ;
|
||||
after_wrong_syntax_errno
|
||||
1064
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_let_var_equal_value" ;
|
||||
after_let_var_equal_value
|
||||
1064
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
set @my_var= 'abc' ;
|
||||
|
||||
select 0 as "after_set_var_equal_value" ;
|
||||
after_set_var_equal_value
|
||||
0
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_disable_warnings_command" ;
|
||||
after_disable_warnings_command
|
||||
1064
|
||||
@ -53,6 +57,7 @@ drop table if exists t1 ;
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
drop table if exists t1 ;
|
||||
|
||||
select 0 as "after_disable_warnings" ;
|
||||
after_disable_warnings
|
||||
0
|
||||
@ -60,6 +65,7 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_minus_masked" ;
|
||||
after_minus_masked
|
||||
1146
|
||||
@ -67,6 +73,7 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_!_masked" ;
|
||||
after_!_masked
|
||||
1146
|
||||
@ -79,6 +86,7 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
prepare stmt from "select 3 from t1" ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_failing_prepare" ;
|
||||
after_failing_prepare
|
||||
1146
|
||||
@ -86,6 +94,7 @@ create table t1 ( f1 char(10));
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
prepare stmt from "select 3 from t1" ;
|
||||
|
||||
select 0 as "after_successful_prepare" ;
|
||||
after_successful_prepare
|
||||
0
|
||||
@ -93,6 +102,7 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
execute stmt;
|
||||
3
|
||||
|
||||
select 0 as "after_successful_execute" ;
|
||||
after_successful_execute
|
||||
0
|
||||
@ -101,6 +111,7 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
execute stmt;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_failing_execute" ;
|
||||
after_failing_execute
|
||||
1146
|
||||
@ -108,12 +119,14 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
execute __stmt_;
|
||||
ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE
|
||||
ER_UNKNOWN_STMT_HANDLER
|
||||
select 1243 as "after_failing_execute" ;
|
||||
after_failing_execute
|
||||
1243
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
deallocate prepare stmt;
|
||||
|
||||
select 0 as "after_successful_deallocate" ;
|
||||
after_successful_deallocate
|
||||
0
|
||||
@ -121,11 +134,13 @@ garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
deallocate prepare __stmt_;
|
||||
ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE
|
||||
ER_UNKNOWN_STMT_HANDLER
|
||||
select 1243 as "after_failing_deallocate" ;
|
||||
after_failing_deallocate
|
||||
1243
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_--disable_abort_on_error" ;
|
||||
after_--disable_abort_on_error
|
||||
1064
|
||||
@ -135,13 +150,19 @@ select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_!errno_masked_error" ;
|
||||
after_!errno_masked_error
|
||||
1146
|
||||
select 3 from t1;
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
is empty
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nonsense' at line 1
|
||||
is empty
|
||||
garbage ;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_--enable_abort_on_error" ;
|
||||
after_--enable_abort_on_error
|
||||
1064
|
||||
@ -149,6 +170,28 @@ select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 3 from t1;
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
|
||||
garbage;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
|
||||
select 2;
|
||||
select 3;
|
||||
3
|
||||
3
|
||||
select 5;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 7;
|
||||
7
|
||||
7
|
||||
mysqltest: At line 1: End of line junk detected: "OCNE"
|
||||
connect con1,localhost,root,,;
|
||||
select 5 from t1;
|
||||
lower
|
||||
case
|
||||
name
|
||||
abc
|
||||
xyz
|
||||
is empty
|
||||
is empty
|
||||
"Yes it's empty"
|
||||
hello
|
||||
hello
|
||||
;;;;;;;;
|
||||
@ -321,7 +364,7 @@ insert into t1 values ('$dollar');
|
||||
$dollar
|
||||
`select 42`
|
||||
drop table t1;
|
||||
mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
|
||||
mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
|
||||
@ -859,7 +902,7 @@ mysqltest: At line 1: Could not find column 'column_not_exists' in the result of
|
||||
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
|
||||
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
|
||||
value= No such row
|
||||
mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
|
||||
mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
|
||||
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES -><- NULL
|
||||
|
@ -1718,6 +1718,13 @@ a 1
|
||||
3 1
|
||||
2 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765255 58201:
|
||||
# VALGRIND/CRASH WHEN ORDERING BY MULTIPLE AGGREGATE FUNCTIONS
|
||||
#
|
||||
select 1 order by max(1) + min(1);
|
||||
1
|
||||
1
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY
|
||||
|
@ -2,7 +2,6 @@ call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB
|
||||
#
|
||||
# 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;
|
||||
@ -70,7 +69,6 @@ DROP TABLE t1;
|
||||
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
|
||||
|
@ -395,4 +395,39 @@ ORDER BY COLUMN_NAME;
|
||||
IS_NULLABLE COLUMN_NAME
|
||||
NO authentication_string
|
||||
NO plugin
|
||||
#
|
||||
# Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
|
||||
# .-> USING PASSWORD: NO
|
||||
#
|
||||
# shoud contain "using password=yes"
|
||||
ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: YES)
|
||||
# shoud contain "using password=no"
|
||||
ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: NO)
|
||||
#
|
||||
# Bug #12610784: SET PASSWORD INCORRECTLY KEEP AN OLD EMPTY PASSWORD
|
||||
#
|
||||
CREATE USER bug12610784@localhost;
|
||||
SET PASSWORD FOR bug12610784@localhost = PASSWORD('secret');
|
||||
ERROR 28000: Access denied for user 'bug12610784'@'localhost' (using password: NO)
|
||||
DROP USER bug12610784@localhost;
|
||||
#
|
||||
# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM
|
||||
# AUTHENTICATION SETTINGS
|
||||
#
|
||||
CREATE USER bug12818542@localhost
|
||||
IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
|
||||
CREATE USER bug12818542_dest@localhost
|
||||
IDENTIFIED BY 'bug12818542_dest_passwd';
|
||||
GRANT PROXY ON bug12818542_dest@localhost TO bug12818542@localhost;
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
bug12818542@localhost bug12818542_dest@localhost
|
||||
SET PASSWORD = PASSWORD('bruhaha');
|
||||
Warnings:
|
||||
Note 1699 SET PASSWORD has no significance for users authenticating via plugins
|
||||
SELECT USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
bug12818542@localhost bug12818542_dest@localhost
|
||||
DROP USER bug12818542@localhost;
|
||||
DROP USER bug12818542_dest@localhost;
|
||||
End of 5.5 tests
|
||||
|
38
mysql-test/r/secure_file_priv_win.result
Normal file
38
mysql-test/r/secure_file_priv_win.result
Normal file
@ -0,0 +1,38 @@
|
||||
CREATE TABLE t1 (c1 longtext);
|
||||
INSERT INTO t1 values ('a');
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp';
|
||||
show global variables like 'secure_file_priv';
|
||||
Variable_name Value
|
||||
secure_file_priv MYSQL_TMP_DIR/
|
||||
SELECT load_file('MYSQL_TMP_DIR\\B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR_UCASE/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR_LCASE/B11764517.tmp') AS x;
|
||||
x
|
||||
a
|
||||
|
||||
SELECT load_file('MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp') AS x;
|
||||
x
|
||||
NULL
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR\\B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR_UCASE/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1;
|
||||
LOAD DATA INFILE "MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp" into table t1;
|
||||
ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp';
|
||||
ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
|
||||
SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
|
||||
DROP TABLE t1;
|
@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
|
||||
delete from t1 where a+0=1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
update t1 set b="a" limit 1;
|
||||
update t1 set b="a" where b="b" limit 2;
|
||||
delete from t1 where b="test" limit 1;
|
||||
@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
|
||||
2 0
|
||||
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
|
||||
SELECT * from t1 order by a;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET SQL_BIG_SELECTS=1;
|
||||
SELECT * from t1 order by a;
|
||||
a b
|
||||
@ -52,7 +52,7 @@ a b
|
||||
5 a
|
||||
SET MAX_JOIN_SIZE=2;
|
||||
SELECT * from t1;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET MAX_JOIN_SIZE=DEFAULT;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
@ -82,12 +82,12 @@ insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
set local max_join_size=8;
|
||||
select * from (select * from t1) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select 1 union select 2 union select 3) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
drop table t1;
|
||||
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
|
||||
|
@ -460,57 +460,57 @@ insert into t2 values (1),(2);
|
||||
insert into t3 values (1,1),(2,2);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (3),(4);
|
||||
insert into t2 values (3),(4);
|
||||
insert into t3 values (3,3),(4,4);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=3;
|
||||
delete from t2 where b=3;
|
||||
delete from t3 where a=3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
truncate table t1;
|
||||
truncate table t2;
|
||||
truncate table t3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=5;
|
||||
delete from t2 where b=5;
|
||||
delete from t3 where a=5;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2, t3;
|
||||
create database mysqltest;
|
||||
show create database mysqltest;
|
||||
@ -662,7 +662,7 @@ DROP TABLE t1;
|
||||
flush tables;
|
||||
SHOW TABLE STATUS like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL # NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
Warnings:
|
||||
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||
show create table t1;
|
||||
@ -1334,7 +1334,7 @@ CREATE DATABASE `
|
||||
CREATE TABLE `<60>`.`<60>` (a int) ENGINE=Memory;
|
||||
SHOW TABLE STATUS FROM `<60>` LIKE '<27>';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
<EFBFBD> MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
<EFBFBD> MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
DROP DATABASE `<60>`;
|
||||
show columns from `#mysql50#????????`;
|
||||
Got one of the listed errors
|
||||
|
@ -1717,6 +1717,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12428824 - PARSER STACK OVERFLOW AND CRASH IN SP_ADD_USED_ROUTINE
|
||||
# WITH OBSCURE QUERY
|
||||
#
|
||||
SELECT very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
SELECT very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_func();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
CALL very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222225555555555555555555555555577777777777777777777777777777777777777777777777777777777777777777777777788888888999999999999999999999.simple_proc();
|
||||
ERROR 42000: Incorrect database name 'very_long_db_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222'
|
||||
SELECT db_name.very_long_fn_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_fn_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
CALL db_name.very_long_pr_name_111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999999999999999999();
|
||||
ERROR 42000: Identifier name 'very_long_pr_name_1111111111111111111111111111111111111111111111111111111111111111111111111222222222' is too long
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
|
||||
|
@ -592,3 +592,28 @@ ERROR 42000: alter routine command denied to user 'bug57061_user'@'localhost' fo
|
||||
# Connection 'default'.
|
||||
drop user bug57061_user@localhost;
|
||||
drop database mysqltest_db;
|
||||
#
|
||||
# Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEE
|
||||
# DEFINITION OF ANY ROUTINE.
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE PROCEDURE db1.p1() SELECT 1;
|
||||
CREATE USER user2@localhost IDENTIFIED BY '';
|
||||
GRANT SELECT(db) ON mysql.proc TO user2@localhost;
|
||||
# Connection con2 as user2
|
||||
# The statement below before disclosed info from body_utf8 column.
|
||||
SHOW CREATE PROCEDURE db1.p1;
|
||||
ERROR 42000: PROCEDURE p1 does not exist
|
||||
# Check that SHOW works with SELECT grant on whole table
|
||||
# Connection default
|
||||
GRANT SELECT ON mysql.proc TO user2@localhost;
|
||||
# Connection con2
|
||||
# This should work
|
||||
SHOW CREATE PROCEDURE db1.p1;
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
# Connection default
|
||||
DROP USER user2@localhost;
|
||||
DROP DATABASE db1;
|
||||
|
@ -7159,6 +7159,40 @@ init_connect
|
||||
SET @@GLOBAL.init_connect= @old_init_connect;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p5;
|
||||
#
|
||||
# Bug#11840395 (formerly known as bug#60347):
|
||||
# The string "versiondata" seems
|
||||
# to be 'leaking' into the schema name space
|
||||
#
|
||||
DROP DATABASE IF EXISTS mixedCaseDbName;
|
||||
CREATE DATABASE mixedCaseDbName;
|
||||
CREATE PROCEDURE mixedCaseDbName.tryMyProc() begin end|
|
||||
CREATE FUNCTION mixedCaseDbName.tryMyFunc() returns text begin return 'IT WORKS'; end
|
||||
|
|
||||
call mixedCaseDbName.tryMyProc();
|
||||
select mixedCaseDbName.tryMyFunc();
|
||||
mixedCaseDbName.tryMyFunc()
|
||||
IT WORKS
|
||||
DROP DATABASE mixedCaseDbName;
|
||||
#
|
||||
# Bug#11766594 59736: SELECT DISTINCT.. INCORRECT RESULT WITH DETERMINISTIC FUNCTION IN WHERE C
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY(b));
|
||||
CREATE TABLE t2 (c INT, d INT, KEY(c));
|
||||
INSERT INTO t1 VALUES (1,1),(1,1),(1,2);
|
||||
INSERT INTO t2 VALUES (1,1),(1,2);
|
||||
CREATE FUNCTION f1() RETURNS INT DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE a int;
|
||||
-- SQL statement inside
|
||||
SELECT 1 INTO a;
|
||||
RETURN a;
|
||||
END $
|
||||
SELECT COUNT(DISTINCT d) FROM t1, t2 WHERE a = c AND b = f1();
|
||||
COUNT(DISTINCT d)
|
||||
2
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1, t2;
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.1 tests
|
||||
# ------------------------------------------------------------------
|
||||
@ -7498,4 +7532,76 @@ CALL p1();
|
||||
DROP TABLE t1, t2, t3;
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
|
||||
# --
|
||||
# -- Bug#12652769 - 61470: case operator in stored routine retains old
|
||||
# -- value of input parameter
|
||||
# ---
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1 (s1 CHAR(5) CHARACTER SET utf8);
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
CREATE PROCEDURE p1(dt DATETIME, i INT)
|
||||
BEGIN
|
||||
SELECT
|
||||
CASE
|
||||
WHEN i = 1 THEN 2
|
||||
ELSE dt
|
||||
END AS x1;
|
||||
SELECT
|
||||
CASE _latin1'a'
|
||||
WHEN _utf8'a' THEN 'A'
|
||||
END AS x2;
|
||||
SELECT
|
||||
CASE _utf8'a'
|
||||
WHEN _latin1'a' THEN _utf8'A'
|
||||
END AS x3;
|
||||
SELECT
|
||||
CASE s1
|
||||
WHEN _latin1'a' THEN _latin1'b'
|
||||
ELSE _latin1'c'
|
||||
END AS x4
|
||||
FROM t1;
|
||||
END|
|
||||
|
||||
CALL p1('2011-04-03 05:14:10', 1);
|
||||
x1
|
||||
2
|
||||
x2
|
||||
A
|
||||
x3
|
||||
A
|
||||
x4
|
||||
b
|
||||
CALL p1('2011-04-03 05:14:11', 2);
|
||||
x1
|
||||
2011-04-03 05:14:11
|
||||
x2
|
||||
A
|
||||
x3
|
||||
A
|
||||
x4
|
||||
b
|
||||
CALL p1('2011-04-03 05:14:12', 2);
|
||||
x1
|
||||
2011-04-03 05:14:12
|
||||
x2
|
||||
A
|
||||
x3
|
||||
A
|
||||
x4
|
||||
b
|
||||
CALL p1('2011-04-03 05:14:13', 2);
|
||||
x1
|
||||
2011-04-03 05:14:13
|
||||
x2
|
||||
A
|
||||
x3
|
||||
A
|
||||
x4
|
||||
b
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
# End of 5.5 test
|
||||
|
@ -1,4 +1,4 @@
|
||||
Tests of syncronization of stored procedure execution.
|
||||
Tests of synchronization of stored procedure execution.
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
# Bug #30977 Concurrent statement using stored function and
|
||||
@ -92,4 +92,16 @@ COUNT(f1(a))
|
||||
DROP PROCEDURE p1;
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLES t0, t1;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
# test for bug#11756013
|
||||
#
|
||||
DROP SCHEMA IF EXISTS s1;
|
||||
CREATE SCHEMA s1;
|
||||
CREATE PROCEDURE s1.p1() BEGIN END;
|
||||
SET DEBUG_SYNC='before_db_dir_check SIGNAL check_db WAIT_FOR dropped_schema';
|
||||
CALL s1.p1;
|
||||
SET DEBUG_SYNC='now WAIT_FOR check_db';
|
||||
DROP SCHEMA s1;
|
||||
SET DEBUG_SYNC='now SIGNAL dropped_schema';
|
||||
ERROR 42000: Unknown database 's1'
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
@ -558,6 +558,52 @@ f1 bug13575(f1)
|
||||
3 ccc
|
||||
drop function bug13575|
|
||||
drop table t3|
|
||||
SELECT @@GLOBAL.storage_engine INTO @old_engine|
|
||||
SET @@GLOBAL.storage_engine=InnoDB|
|
||||
SET @@SESSION.storage_engine=InnoDB|
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
CREATE PROCEDURE bug11758414()
|
||||
BEGIN
|
||||
SET @@GLOBAL.storage_engine="MyISAM";
|
||||
SET @@SESSION.storage_engine="MyISAM";
|
||||
# show defaults at execution time / that setting them worked
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine';
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine';
|
||||
CREATE TABLE t1 (id int);
|
||||
CREATE TABLE t2 (id int) ENGINE=InnoDB;
|
||||
# show we're heeding the default (at run-time, not parse-time!)
|
||||
SHOW CREATE TABLE t1;
|
||||
# show that we didn't break explicit override with ENGINE=...
|
||||
SHOW CREATE TABLE t2;
|
||||
END;
|
||||
|
|
||||
CALL bug11758414|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
DROP PROCEDURE bug11758414|
|
||||
DROP TABLE t1, t2|
|
||||
SET @@GLOBAL.storage_engine=@old_engine|
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user