2002-12-30 01:46:48 +04:00
|
|
|
stop slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
start slave;
|
Fix multiple test suite failures in Buildbot due to races in the test cases or missing server features not properly checked
mysql-test/r/func_misc.result:
Move test that requires query cache from main.func_misc to main.query_cache.
mysql-test/r/mysqltest.result:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/r/query_cache.result:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/r/query_cache_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/sp_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/udf.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/udf_query_cache.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/variables.result:
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
Fix race where result file may show state "cleaning up" in the small window
between setting COMMAND to 'Sleep' and clearing STATE.
mysql-test/suite/rpl/r/rpl_temporary.result:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/suite/rpl/t/rpl_temporary.test:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/t/func_misc.test:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/t/mysqltest.test:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/t/query_cache.test:
Move test that requires query cache to main.query_cache.
mysql-test/t/query_cache_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/sp_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/udf.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache-master.opt:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/variables.test:
Move test that requires query cache from main.variables to main.query_cache.
tests/mysql_client_test.c:
In tests that require query cache, skip the test if query cache not available.
Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee
that the server we run against was compiled with same preprocessor #define as
the mysql_client_test program (and since it is trivial to check dynamically).
2010-01-11 14:15:28 +01:00
|
|
|
SET sql_log_bin = 0;
|
|
|
|
SET sql_log_bin = 1;
|
2003-02-21 23:38:56 +01:00
|
|
|
reset master;
|
2009-05-23 00:29:41 +01:00
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
CREATE TEMPORARY TABLE t1 (a char(1));
|
|
|
|
INSERT INTO t1 VALUES ('a');
|
|
|
|
include/stop_slave.inc
|
|
|
|
include/start_slave.inc
|
|
|
|
INSERT INTO t1 VALUES ('b');
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam;
|
|
|
|
INSERT INTO `t1` set `a`=128,`b`='128';
|
|
|
|
Warnings:
|
|
|
|
Warning 1264 Out of range value for column 'a' at row 1
|
|
|
|
Warning 1265 Data truncated for column 'b' at row 1
|
|
|
|
include/stop_slave.inc
|
|
|
|
include/start_slave.inc
|
|
|
|
INSERT INTO `t1` set `a`=128,`b`='128';
|
|
|
|
Warnings:
|
|
|
|
Warning 1264 Out of range value for column 'a' at row 1
|
|
|
|
Warning 1265 Data truncated for column 'b' at row 1
|
|
|
|
DROP TABLE t1;
|
2004-03-27 01:07:09 +01:00
|
|
|
SET @save_select_limit=@@session.sql_select_limit;
|
|
|
|
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
|
2005-03-23 19:18:25 +01:00
|
|
|
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
2004-03-27 01:07:09 +01:00
|
|
|
SELECT @@session.sql_select_limit = @save_select_limit;
|
|
|
|
@@session.sql_select_limit = @save_select_limit
|
|
|
|
1
|
|
|
|
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
|
2005-03-23 19:18:25 +01:00
|
|
|
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
2004-03-27 01:07:09 +01:00
|
|
|
SELECT @@session.sql_select_limit = @save_select_limit;
|
|
|
|
@@session.sql_select_limit = @save_select_limit
|
|
|
|
1
|
2009-12-17 16:34:11 +02:00
|
|
|
SET @save_conn_id= connection_id();
|
2004-03-26 19:25:22 +01:00
|
|
|
SET @@session.pseudo_thread_id=100;
|
|
|
|
SET @@session.pseudo_thread_id=connection_id();
|
2009-12-17 16:34:11 +02:00
|
|
|
SET @@session.pseudo_thread_id=@save_conn_id;
|
2004-03-26 19:25:22 +01:00
|
|
|
SET @@session.sql_log_bin=0;
|
|
|
|
SET @@session.sql_log_bin=1;
|
2003-01-06 01:48:59 +02:00
|
|
|
drop table if exists t1,t2;
|
2002-12-30 01:46:48 +04:00
|
|
|
create table t1(f int);
|
|
|
|
create table t2(f int);
|
|
|
|
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
2008-10-07 19:54:12 +03:00
|
|
|
SELECT COUNT(*) FROM t1;
|
|
|
|
COUNT(*)
|
|
|
|
10
|
2006-02-08 17:09:57 +01:00
|
|
|
create temporary table t3(f int);
|
2002-12-30 01:46:48 +04:00
|
|
|
insert into t3 select * from t1 where f<6;
|
2006-02-08 17:09:57 +01:00
|
|
|
create temporary table t3(f int);
|
2002-12-30 01:46:48 +04:00
|
|
|
insert into t2 select count(*) from t3;
|
|
|
|
insert into t3 select * from t1 where f>=4;
|
|
|
|
drop temporary table t3;
|
|
|
|
insert into t2 select count(*) from t3;
|
|
|
|
drop temporary table t3;
|
2006-02-08 13:08:19 +01:00
|
|
|
select * from t2 ORDER BY f;
|
2002-12-30 01:46:48 +04:00
|
|
|
f
|
|
|
|
5
|
|
|
|
7
|
2003-01-06 01:48:59 +02:00
|
|
|
drop table t1, t2;
|
2002-12-30 01:46:48 +04:00
|
|
|
use test;
|
|
|
|
SET TIMESTAMP=1040323920;
|
|
|
|
create table t1(f int);
|
|
|
|
SET TIMESTAMP=1040323931;
|
|
|
|
create table t2(f int);
|
|
|
|
SET TIMESTAMP=1040323938;
|
|
|
|
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
|
|
SET TIMESTAMP=1040323945;
|
|
|
|
SET @@session.pseudo_thread_id=1;
|
2006-02-08 17:09:57 +01:00
|
|
|
create temporary table t3(f int);
|
2002-12-30 01:46:48 +04:00
|
|
|
SET TIMESTAMP=1040323952;
|
|
|
|
SET @@session.pseudo_thread_id=1;
|
|
|
|
insert into t3 select * from t1 where f<6;
|
|
|
|
SET TIMESTAMP=1040324145;
|
|
|
|
SET @@session.pseudo_thread_id=2;
|
2006-02-08 17:09:57 +01:00
|
|
|
create temporary table t3(f int);
|
2002-12-30 01:46:48 +04:00
|
|
|
SET TIMESTAMP=1040324186;
|
|
|
|
SET @@session.pseudo_thread_id=1;
|
|
|
|
insert into t2 select count(*) from t3;
|
|
|
|
SET TIMESTAMP=1040324200;
|
|
|
|
SET @@session.pseudo_thread_id=2;
|
|
|
|
insert into t3 select * from t1 where f>=4;
|
|
|
|
SET TIMESTAMP=1040324211;
|
|
|
|
SET @@session.pseudo_thread_id=1;
|
|
|
|
drop temporary table t3;
|
|
|
|
SET TIMESTAMP=1040324219;
|
|
|
|
SET @@session.pseudo_thread_id=2;
|
|
|
|
insert into t2 select count(*) from t3;
|
|
|
|
SET TIMESTAMP=1040324224;
|
|
|
|
SET @@session.pseudo_thread_id=2;
|
|
|
|
drop temporary table t3;
|
2006-02-08 13:08:19 +01:00
|
|
|
select * from t2 ORDER BY f;
|
2002-12-30 01:46:48 +04:00
|
|
|
f
|
|
|
|
5
|
|
|
|
7
|
2003-01-06 01:48:59 +02:00
|
|
|
drop table t1,t2;
|
2006-02-08 17:09:57 +01:00
|
|
|
create temporary table t3 (f int);
|
2006-04-07 20:44:37 +03:00
|
|
|
create temporary table t4 (f int);
|
|
|
|
create table t5 (f int);
|
2008-07-18 11:20:55 +03:00
|
|
|
stop slave;
|
2006-04-07 20:44:37 +03:00
|
|
|
insert into t5 select * from t4;
|
2008-07-18 11:20:55 +03:00
|
|
|
start slave;
|
2006-04-07 20:44:37 +03:00
|
|
|
select * from t5 /* must be 1 after reconnection */;
|
|
|
|
f
|
|
|
|
drop temporary table t4;
|
|
|
|
drop table t5;
|
2006-05-29 18:01:58 +03:00
|
|
|
set @@session.pseudo_thread_id=100;
|
2006-04-23 19:59:43 +03:00
|
|
|
create temporary table t101 (id int);
|
|
|
|
create temporary table t102 (id int);
|
2006-05-29 18:01:58 +03:00
|
|
|
set @@session.pseudo_thread_id=200;
|
2006-04-23 19:59:43 +03:00
|
|
|
create temporary table t201 (id int);
|
2006-05-29 18:01:58 +03:00
|
|
|
create temporary table `t``201` (id int);
|
|
|
|
create temporary table `#sql_not_user_table202` (id int);
|
|
|
|
set @@session.pseudo_thread_id=300;
|
|
|
|
create temporary table t301 (id int);
|
|
|
|
create temporary table t302 (id int);
|
|
|
|
create temporary table `#sql_not_user_table303` (id int);
|
2006-04-23 19:59:43 +03:00
|
|
|
create table t1(f int);
|
|
|
|
insert into t1 values (1);
|
|
|
|
select * from t1 /* must be 1 */;
|
|
|
|
f
|
|
|
|
1
|
|
|
|
drop table t1;
|
2006-07-09 00:29:33 +03:00
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
drop table t1;
|
Fix multiple test suite failures in Buildbot due to races in the test cases or missing server features not properly checked
mysql-test/r/func_misc.result:
Move test that requires query cache from main.func_misc to main.query_cache.
mysql-test/r/mysqltest.result:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/r/query_cache.result:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/r/query_cache_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/sp_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/udf.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/udf_query_cache.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/variables.result:
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
Fix race where result file may show state "cleaning up" in the small window
between setting COMMAND to 'Sleep' and clearing STATE.
mysql-test/suite/rpl/r/rpl_temporary.result:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/suite/rpl/t/rpl_temporary.test:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/t/func_misc.test:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/t/mysqltest.test:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/t/query_cache.test:
Move test that requires query cache to main.query_cache.
mysql-test/t/query_cache_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/sp_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/udf.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache-master.opt:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/variables.test:
Move test that requires query cache from main.variables to main.query_cache.
tests/mysql_client_test.c:
In tests that require query cache, skip the test if query cache not available.
Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee
that the server we run against was compiled with same preprocessor #define as
the mysql_client_test program (and since it is trivial to check dynamically).
2010-01-11 14:15:28 +01:00
|
|
|
SET sql_log_bin = 0;
|
|
|
|
SET sql_log_bin = 1;
|
2009-03-27 12:20:37 +01:00
|
|
|
-- Bug#43748
|
|
|
|
-- make a user on the slave that can list but not kill system threads.
|
2009-03-25 17:42:34 +01:00
|
|
|
FLUSH PRIVILEGES;
|
2009-03-27 12:20:37 +01:00
|
|
|
GRANT USAGE ON *.* TO user43748@127.0.0.1 IDENTIFIED BY 'meow';
|
|
|
|
GRANT PROCESS ON *.* TO user43748@127.0.0.1;
|
|
|
|
-- try to KILL system-thread as that non-privileged user (on slave).
|
|
|
|
SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1;
|
|
|
|
KILL @id;
|
|
|
|
Got one of the listed errors
|
|
|
|
-- throw out test-user on slave.
|
2009-03-25 17:42:34 +01:00
|
|
|
DROP USER user43748@127.0.0.1;
|
2009-03-27 12:20:37 +01:00
|
|
|
-- done. back to master.
|
|
|
|
End of 5.1 tests
|