diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-04-08 16:51:26 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-04-08 16:51:26 +0200 |
commit | 2c4ca510507a8055cdb58d9c0631f5d630e55d90 (patch) | |
tree | 638f44865386631837ba11df359423bbc7d0d615 /mysql-test/t | |
parent | 7674605d7940b428a8bbfe23fd0ef497e99c60c1 (diff) | |
download | mariadb-git-2c4ca510507a8055cdb58d9c0631f5d630e55d90.tar.gz |
Check warnings in servers error log as part of test case
BitKeeper/deleted/.del-rpl_bug33931-slave.opt:
Delete: mysql-test/suite/rpl/t/rpl_bug33931-slave.opt
mysql-test/include/default_mysqld.cnf:
Set a default name for "log-bin"
mysql-test/mysql-test-run.pl:
Check for warnings in mysqld error log files after each testcase,
using SQL
mysql-test/lib/mtr_cases.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_match.pm:
Make mtr_match into a perl module
mysql-test/lib/mtr_report.pm:
Make mtr_match into a perl module
Print warnings if testcase failed from warnings
mysql-test/r/information_schema.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/mysql_upgrade.result:
Update result, mysql_upgrade will check _all_ databases
mysql-test/r/mysqlcheck.result:
Update result, mysql_upgrade should check _all_ databases
mysql-test/r/sp-destruct.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp-error.result:
Backup and restore mysql.proc table
mysql-test/r/sp-security.result:
Be more selective which databases and tables are select in the queries
mysql-test/r/sp.result:
Be more selective which databases and tables are select in the queries
mysql-test/suite/rpl/r/rpl_bug33931.result:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/r/rpl_idempotency.result:
Add supression
Add master-slave-end.inc
mysql-test/suite/rpl/t/rpl_bug33931.test:
Move the setting of debug flag into the test file instead of in -slave.opt
Add supression
mysql-test/suite/rpl/t/rpl_idempotency.test:
Add supression
Add master-slave-end.inc
mysql-test/t/information_schema.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-destruct.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp-error.test:
Backup and restore mysql.proc table
mysql-test/t/sp-security.test:
Be more selective which databases and tables are select in the queries
mysql-test/t/sp.test:
Be more selective which databases and tables are select in the queries
mysql-test/include/check-warnings.test:
New BitKeeper file ``mysql-test/include/check-warnings.test''
mysql-test/include/mtr_warnings.sql:
New BitKeeper file ``mysql-test/include/mtr_warnings.sql''
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/information_schema.test | 36 | ||||
-rw-r--r-- | mysql-test/t/sp-destruct.test | 4 | ||||
-rw-r--r-- | mysql-test/t/sp-error.test | 10 | ||||
-rw-r--r-- | mysql-test/t/sp-security.test | 4 | ||||
-rw-r--r-- | mysql-test/t/sp.test | 8 |
5 files changed, 38 insertions, 24 deletions
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index bb9cb127d07..699d3af6709 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -37,7 +37,11 @@ create table t3(a int, KEY a_data (a)); create table mysqltest.t4(a int); create table t5 (id int auto_increment primary key); insert into t5 values (10); -create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status'; +create view v1 (c) as + SELECT table_name FROM information_schema.TABLES + WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND + table_name<>'ndb_binlog_index' AND + table_name<>'ndb_apply_status'; select * from v1; select c,table_name from v1 @@ -133,25 +137,25 @@ delimiter ;| # Bug#7222 information_schema: errors in "routines" # select parameter_style, sql_data_access, dtd_identifier -from information_schema.routines; +from information_schema.routines where routine_schema='test'; --replace_column 5 # 6 # -show procedure status; +show procedure status where db='test'; --replace_column 5 # 6 # -show function status; +show function status where db='test'; select a.ROUTINE_NAME from information_schema.ROUTINES a, information_schema.SCHEMATA b where -a.ROUTINE_SCHEMA = b.SCHEMA_NAME; +a.ROUTINE_SCHEMA = b.SCHEMA_NAME AND b.SCHEMA_NAME='test'; --replace_column 3 # explain select a.ROUTINE_NAME from information_schema.ROUTINES a, information_schema.SCHEMATA b where a.ROUTINE_SCHEMA = b.SCHEMA_NAME; select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, -mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; -select count(*) from information_schema.ROUTINES; +mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) AND a.ROUTINE_SCHEMA='test' order by 1; +select count(*) from information_schema.ROUTINES where routine_schema='test'; -create view v1 as select routine_schema, routine_name from information_schema.routines +create view v1 as select routine_schema, routine_name from information_schema.routines where routine_schema='test' order by routine_schema, routine_name; select * from v1; drop view v1; @@ -528,7 +532,7 @@ flush privileges; # Bug #9404 information_schema: Weird error messages # with SELECT SUM() ... GROUP BY queries # -SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; +SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; # @@ -557,7 +561,7 @@ begin end| delimiter ;| show triggers; -select * from information_schema.triggers; +select * from information_schema.triggers where trigger_schema in ('mysql', 'information_schema', 'test', 'mysqltest'); drop trigger trg1; drop trigger trg2; @@ -727,7 +731,7 @@ BEGIN SELECT 'foo' FROM DUAL; END | delimiter ;| -select ROUTINE_NAME from routines; +select ROUTINE_NAME from routines where ROUTINE_SCHEMA='information_schema'; # # Bug #10734 Grant of privileges other than 'select' and 'create view' should fail on schema # @@ -827,7 +831,7 @@ use mysql; INSERT INTO `proc` VALUES ('test','','PROCEDURE','','SQL','CONTAINS_SQL', 'NO','DEFINER','','','BEGIN\r\n \r\nEND','root@%','2006-03-02 18:40:03', '2006-03-02 18:40:03','','','utf8','utf8_general_ci','utf8_general_ci','n/a'); -select routine_name from information_schema.routines; +select routine_name from information_schema.routines where ROUTINE_SCHEMA='test'; delete from proc where name=''; use test; @@ -874,13 +878,13 @@ CREATE USER mysql_bug20230@localhost; GRANT EXECUTE ON PROCEDURE p1 TO mysql_bug20230@localhost; GRANT EXECUTE ON FUNCTION f1 TO mysql_bug20230@localhost; -SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES; +SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='test'; SHOW CREATE PROCEDURE p1; SHOW CREATE FUNCTION f1; connect (conn1, localhost, mysql_bug20230,,); -SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES; +SELECT ROUTINE_NAME, ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='test'; SHOW CREATE PROCEDURE p1; SHOW CREATE FUNCTION f1; CALL p1(); @@ -931,10 +935,10 @@ SELECT t.table_name, c1.column_name # INFORMARTION_SCHEMA.TABLES # -SELECT MAX(table_name) FROM information_schema.tables; +SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'); SELECT table_name from information_schema.tables WHERE table_name=(SELECT MAX(table_name) - FROM information_schema.tables); + FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test')); # # Bug #23037: Bug in field "Default" of query "SHOW COLUMNS FROM table" # diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test index ae2bb9f7ea3..14c38a2fdb4 100644 --- a/mysql-test/t/sp-destruct.test +++ b/mysql-test/t/sp-destruct.test @@ -153,5 +153,5 @@ drop function bug14233_1; drop function bug14233_2; drop procedure bug14233_3; # Assert: These should show nothing. -show procedure status; -show function status; +show procedure status where db=DATABASE(); +show function status where db=DATABASE(); diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 6896a1ab832..1faa524f8d3 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -6,6 +6,10 @@ drop table if exists t1, t2; --enable_warnings +# Backup the mysql.proc table +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval SELECT * FROM mysql.proc INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/proc.txt'; + # Make sure we don't have any procedures left. delete from mysql.proc; @@ -2421,3 +2425,9 @@ delimiter ;$$ #--enable_warnings #create procedure bugNNNN... #create function bugNNNN... + +# +# CLEANUP and RESTORE +# +LOAD DATA INFILE '../../tmp/proc.txt' INTO TABLE mysql.proc; +remove_file $MYSQLTEST_VARDIR/tmp/proc.txt; diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test index 91de14116d4..b372c05b6e3 100644 --- a/mysql-test/t/sp-security.test +++ b/mysql-test/t/sp-security.test @@ -243,11 +243,11 @@ disconnect con2user1; disconnect con3anon; disconnect con4user2; use test; -select type,db,name from mysql.proc; +select type,db,name from mysql.proc where db like 'db%'; drop database db1_secret; drop database db2; # Make sure the routines are gone -select type,db,name from mysql.proc; +select type,db,name from mysql.proc where db like 'db%'; # Get rid of the users delete from mysql.user where user='user1' or user='user2'; delete from mysql.user where user='' and host='%'; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 464530bec00..ac90217f891 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -1540,7 +1540,7 @@ begin end| show create procedure opp| --replace_column 4 'root@localhost' 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00' -show procedure status like '%p%'| +show procedure status where name like '%p%' and db='test'| # This isn't the fastest way in the world to compute prime numbers, so # don't be too ambitious. ;-) @@ -1558,7 +1558,7 @@ drop table t3| drop procedure opp| drop procedure ip| --replace_column 4 'root@localhost' 5 '0000-00-00 00:00:00' 6 '0000-00-00 00:00:00' -show procedure status like '%p%'| +show procedure status where name like '%p%' and db='test'| # Fibonacci, for recursion test. (Yet Another Numerical series :) @@ -2280,7 +2280,7 @@ drop procedure if exists bug2267_1| --enable_warnings create procedure bug2267_1() begin - show procedure status; + show procedure status where db='test'; end| --disable_warnings @@ -2288,7 +2288,7 @@ drop procedure if exists bug2267_2| --enable_warnings create procedure bug2267_2() begin - show function status; + show function status where db='test'; end| --disable_warnings |