diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/include/im_check_os.inc | 7 | ||||
-rw-r--r-- | mysql-test/include/system_db_struct.inc | 2 | ||||
-rw-r--r-- | mysql-test/lib/init_db.sql | 4 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 3 | ||||
-rw-r--r-- | mysql-test/r/connect.result | 6 | ||||
-rw-r--r-- | mysql-test/r/csv.result | 17 | ||||
-rw-r--r-- | mysql-test/r/im_utils.result | 2 | ||||
-rw-r--r-- | mysql-test/r/information_schema.result | 6 | ||||
-rw-r--r-- | mysql-test/r/log_tables.result | 54 | ||||
-rw-r--r-- | mysql-test/r/mysqlcheck.result | 8 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 24 | ||||
-rw-r--r-- | mysql-test/r/system_mysql_db.result | 27 | ||||
-rw-r--r-- | mysql-test/t/connect.test | 4 | ||||
-rw-r--r-- | mysql-test/t/csv.test | 36 | ||||
-rw-r--r-- | mysql-test/t/information_schema.test | 4 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 146 | ||||
-rw-r--r-- | mysql-test/t/mysqlcheck.test | 4 | ||||
-rw-r--r-- | mysql-test/t/show_check.test | 4 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db.test | 4 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix.test | 9 |
20 files changed, 361 insertions, 10 deletions
diff --git a/mysql-test/include/im_check_os.inc b/mysql-test/include/im_check_os.inc index 9465115feb5..33105f79d52 100644 --- a/mysql-test/include/im_check_os.inc +++ b/mysql-test/include/im_check_os.inc @@ -3,5 +3,12 @@ --source include/not_windows.inc +# check that CSV engine was compiled in, as IM the test suite uses +# logs tables-specific option and the option is not present if CSV +# (and => the log tables) are not in. +# NOTE: In future we should remove this check and make the test suite +# to pass correct opyions to IM depending on the CSV presence +--source include/have_csv.inc + --connection default --disconnect dflt_server_con diff --git a/mysql-test/include/system_db_struct.inc b/mysql-test/include/system_db_struct.inc index 9e8886377fc..4c80161bb85 100644 --- a/mysql-test/include/system_db_struct.inc +++ b/mysql-test/include/system_db_struct.inc @@ -13,3 +13,5 @@ show create table columns_priv; show create table procs_priv; show create table proc; show create table event; +show create table general_log; +show create table slow_log; diff --git a/mysql-test/lib/init_db.sql b/mysql-test/lib/init_db.sql index ef6383f6680..cef7933d808 100644 --- a/mysql-test/lib/init_db.sql +++ b/mysql-test/lib/init_db.sql @@ -570,6 +570,10 @@ CREATE TABLE proc ( ) character set utf8 comment='Stored Procedures'; +CREATE PROCEDURE create_log_tables() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment='General log'; CREATE TABLE slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment='Slow log'; END IF; END; +CALL create_log_tables(); +DROP PROCEDURE create_log_tables; + CREATE TABLE event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 756e8c83953..1f996a68a9b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -909,6 +909,7 @@ sub command_line_setup () { path_datadir => "$opt_vardir/im_mysqld_1.data", path_sock => "$sockdir/mysqld_1.sock", path_pid => "$opt_vardir/run/mysqld_1.pid", + old_log_format => 1 }; $instance_manager->{'instances'}->[1]= @@ -919,6 +920,7 @@ sub command_line_setup () { path_sock => "$sockdir/mysqld_2.sock", path_pid => "$opt_vardir/run/mysqld_2.pid", nonguarded => 1, + old_log_format => 1 }; if ( $opt_extern ) @@ -1825,6 +1827,7 @@ EOF ; print OUT "nonguarded\n" if $instance->{'nonguarded'}; + print OUT "old-log-format\n" if $instance->{'old_log_format'}; print OUT "\n"; } diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index ed017641aa9..862260346f5 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -5,6 +5,7 @@ columns_priv db event func +general_log help_category help_keyword help_relation @@ -13,6 +14,7 @@ host plugin proc procs_priv +slow_log tables_priv time_zone time_zone_leap_second @@ -34,6 +36,7 @@ columns_priv db event func +general_log help_category help_keyword help_relation @@ -42,6 +45,7 @@ host plugin proc procs_priv +slow_log tables_priv time_zone time_zone_leap_second @@ -71,6 +75,7 @@ columns_priv db event func +general_log help_category help_keyword help_relation @@ -79,6 +84,7 @@ host plugin proc procs_priv +slow_log tables_priv time_zone time_zone_leap_second diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index 3c87c1f4b92..6f58fdfe54a 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -4976,6 +4976,23 @@ c1 4 5 DROP TABLE bug14672; +CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV; +LOCK TABLES test_concurrent_insert READ LOCAL; +INSERT INTO test_concurrent_insert VALUES (1); +SELECT * FROM test_concurrent_insert; +val +1 +SELECT * FROM test_concurrent_insert; +val +UNLOCK TABLES; +LOCK TABLES test_concurrent_insert WRITE; +INSERT INTO test_concurrent_insert VALUES (2); +SELECT * FROM test_concurrent_insert; +val +1 +2 +UNLOCK TABLES; +DROP TABLE test_concurrent_insert; create table t1 (a int) engine=csv; insert t1 values (1); delete from t1; diff --git a/mysql-test/r/im_utils.result b/mysql-test/r/im_utils.result index fbfaeaebcac..e204affc8ec 100644 --- a/mysql-test/r/im_utils.result +++ b/mysql-test/r/im_utils.result @@ -21,6 +21,7 @@ skip-stack-trace VALUE skip-innodb VALUE skip-bdb VALUE skip-ndbcluster VALUE +old-log-format VALUE SHOW INSTANCE OPTIONS mysqld2; option_name value instance_name VALUE @@ -41,6 +42,7 @@ skip-stack-trace VALUE skip-innodb VALUE skip-bdb VALUE skip-ndbcluster VALUE +old-log-format VALUE START INSTANCE mysqld2; STOP INSTANCE mysqld2; SHOW mysqld1 LOG FILES; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 651dc3fdc96..8778ded244f 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -62,6 +62,7 @@ columns_priv db event func +general_log help_category help_keyword help_relation @@ -70,6 +71,7 @@ host plugin proc procs_priv +slow_log tables_priv time_zone time_zone_leap_second @@ -732,7 +734,7 @@ CREATE TABLE t_crashme ( f1 BIGINT); CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1; CREATE VIEW a2 AS SELECT t_CRASHME FROM a1; count(*) -107 +109 drop view a2, a1; drop table t_crashme; select table_schema,table_name, column_name from @@ -816,7 +818,7 @@ SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHE table_schema count(*) cluster_replication 1 information_schema 19 -mysql 19 +mysql 21 create table t1 (i int, j int); create trigger trg1 before insert on t1 for each row begin diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result new file mode 100644 index 00000000000..caaf0367bb7 --- /dev/null +++ b/mysql-test/r/log_tables.result @@ -0,0 +1,54 @@ +use mysql; +truncate table general_log; +select * from general_log; +event_time user_host thread_id server_id command_type argument +TIMESTAMP root[root] @ localhost [] 1 1 Query select * from general_log +truncate table slow_log; +select * from slow_log; +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +truncate table general_log; +select * from general_log where argument like '%general_log%'; +event_time user_host thread_id server_id command_type argument +TIMESTAMP root[root] @ localhost [] 1 1 Query select * from general_log where argument like '%general_log%' +create table join_test (verbose_comment varchar (80), command_type varchar(64)); +insert into join_test values ("User performed a usual SQL query", "Query"); +insert into join_test values ("New DB connection was registered", "Connect"); +insert into join_test values ("Get the table info", "Field List"); +select verbose_comment, user_host, argument +from mysql.general_log join join_test +on (mysql.general_log.command_type = join_test.command_type); +verbose_comment user_host argument +User performed a usual SQL query root[root] @ localhost [] select * from general_log where argument like '%general_log%' +User performed a usual SQL query root[root] @ localhost [] create table join_test (verbose_comment varchar (80), command_type varchar(64)) +User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("User performed a usual SQL query", "Query") +User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("New DB connection was registered", "Connect") +User performed a usual SQL query root[root] @ localhost [] insert into join_test values ("Get the table info", "Field List") +User performed a usual SQL query root[root] @ localhost [] select verbose_comment, user_host, argument +from mysql.general_log join join_test +on (mysql.general_log.command_type = join_test.command_type) +drop table join_test; +flush logs; +lock tables mysql.general_log WRITE; +ERROR HY000: You can't write-lock a log table. Only read access is possible. +lock tables mysql.slow_log WRITE; +ERROR HY000: You can't write-lock a log table. Only read access is possible. +lock tables mysql.general_log READ; +ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL instead. +lock tables mysql.slow_log READ; +ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL instead. +lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL; +unlock tables; +lock tables mysql.general_log READ LOCAL; + flush logs; +unlock tables; +select "Mark that we woke up from flush logs in the test" + as "test passed"; +test passed +Mark that we woke up from flush logs in the test +lock tables mysql.general_log READ LOCAL; + truncate mysql.general_log; +unlock tables; +select "Mark that we woke up from TRUNCATE in the test" + as "test passed"; +test passed +Mark that we woke up from TRUNCATE in the test diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index e6251dd9422..bd4bbc15a4f 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -3,6 +3,8 @@ mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.general_log +note : The storage engine for the table doesn't support optimize mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK @@ -11,6 +13,8 @@ mysql.host OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK +mysql.slow_log +note : The storage engine for the table doesn't support optimize mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK @@ -22,6 +26,8 @@ mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK +mysql.general_log +note : The storage engine for the table doesn't support optimize mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK @@ -30,6 +36,8 @@ mysql.host OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK +mysql.slow_log +note : The storage engine for the table doesn't support optimize mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index a78230e63eb..960c389eee2 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -147,10 +147,14 @@ drop table t1; flush tables; show open tables; Database Table In_use Name_locked +mysql general_log 1 0 +mysql slow_log 1 0 create table t1(n int); insert into t1 values (1); show open tables; Database Table In_use Name_locked +mysql general_log 1 0 +mysql slow_log 1 0 test t1 0 0 drop table t1; create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed; @@ -564,20 +568,24 @@ SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone 1 SHOW OPEN TABLES; Database Table In_use Name_locked -mysql db 0 0 +mysql proc 0 0 test urkunde 0 0 mysql time_zone 0 0 -mysql user 0 0 +mysql db 0 0 test txt1 0 0 -mysql proc 0 0 +mysql slow_log 1 0 test tyt2 0 0 +mysql general_log 1 0 +mysql user 0 0 mysql time_zone_name 0 0 SHOW OPEN TABLES FROM mysql; Database Table In_use Name_locked -mysql db 0 0 +mysql proc 0 0 mysql time_zone 0 0 +mysql db 0 0 +mysql slow_log 1 0 +mysql general_log 1 0 mysql user 0 0 -mysql proc 0 0 mysql time_zone_name 0 0 SHOW OPEN TABLES FROM mysql LIKE 'u%'; Database Table In_use Name_locked @@ -590,12 +598,16 @@ test tyt2 0 0 mysql time_zone_name 0 0 SHOW OPEN TABLES LIKE '%o%'; Database Table In_use Name_locked -mysql time_zone 0 0 mysql proc 0 0 +mysql time_zone 0 0 +mysql slow_log 1 0 +mysql general_log 1 0 mysql time_zone_name 0 0 FLUSH TABLES; SHOW OPEN TABLES; Database Table In_use Name_locked +mysql general_log 1 0 +mysql slow_log 1 0 DROP TABLE txt1; DROP TABLE tyt2; DROP TABLE urkunde; diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index 2e4e2dc10ea..e3abd7f5200 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -5,6 +5,7 @@ columns_priv db event func +general_log help_category help_keyword help_relation @@ -13,6 +14,7 @@ host plugin proc procs_priv +slow_log tables_priv time_zone time_zone_leap_second @@ -184,6 +186,31 @@ proc CREATE TABLE `proc` ( `comment` char(64) character set utf8 collate utf8_bin NOT NULL default '', PRIMARY KEY (`db`,`name`,`type`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +show create table general_log; +Table Create Table +general_log CREATE TABLE `general_log` ( + `event_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `user_host` mediumtext, + `thread_id` int(11) default NULL, + `server_id` int(11) default NULL, + `command_type` varchar(64) default NULL, + `argument` mediumtext +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log' +show create table slow_log; +Table Create Table +slow_log CREATE TABLE `slow_log` ( + `start_time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `user_host` mediumtext NOT NULL, + `query_time` time NOT NULL, + `lock_time` time NOT NULL, + `rows_sent` int(11) NOT NULL, + `rows_examined` int(11) NOT NULL, + `db` varchar(512) default NULL, + `last_insert_id` int(11) default NULL, + `insert_id` int(11) default NULL, + `server_id` int(11) default NULL, + `sql_text` mediumtext NOT NULL +) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' show create table event; Table Create Table event CREATE TABLE `event` ( diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index fef9d4552e6..5ee3d64e56f 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -5,6 +5,10 @@ # This test makes no sense with the embedded server --source include/not_embedded.inc +# check that CSV engine was compiled in, as the test relies on the presence +# of the log tables (which are CSV-based). By connect mysql; show tables; +--source include/have_csv.inc + --disable_warnings drop table if exists t1,t2; --enable_warnings diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index a028f6ced6d..6f0f42f109c 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -2,7 +2,7 @@ # Test for the CSV engine # --- source include/have_csv.inc +--source include/have_csv.inc # # Simple select test @@ -1354,6 +1354,40 @@ DROP TABLE bug14672; # End of 4.1 tests # +# Test CONCURRENT INSERT (5.1) +# + +CREATE TABLE test_concurrent_insert ( val integer ) ENGINE = CSV; + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +connection con1; +# obtain TL_READ lock on the table +LOCK TABLES test_concurrent_insert READ LOCAL; + +connection con2; +# should pass despite of the lock +INSERT INTO test_concurrent_insert VALUES (1); +SELECT * FROM test_concurrent_insert; + +connection con1; +# first connection should not notice the changes +SELECT * FROM test_concurrent_insert; + +UNLOCK TABLES; + +# Now check that we see our own changes + +LOCK TABLES test_concurrent_insert WRITE; +INSERT INTO test_concurrent_insert VALUES (2); +SELECT * FROM test_concurrent_insert; +UNLOCK TABLES; + +# cleanup +DROP TABLE test_concurrent_insert; + +# # BUG#13406 - incorrect amount of "records deleted" # diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 2f91f27ac79..7f61b4f080a 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1,6 +1,10 @@ # This test uses grants, which can't get tested for embedded server -- source include/not_embedded.inc +# check that CSV engine was compiled in, as the result of the test +# depends on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + # Test for information_schema.schemata & # show databases diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test new file mode 100644 index 00000000000..a9e161f644c --- /dev/null +++ b/mysql-test/t/log_tables.test @@ -0,0 +1,146 @@ +# +# Basic log tables test +# + +# check that CSV engine was compiled in +--source include/have_csv.inc + +use mysql; + +# +# Check that log tables work and we can do basic selects. This also +# tests truncate, which works in a special mode with the log tables +# + +truncate table general_log; +--replace_column 1 TIMESTAMP +select * from general_log; +truncate table slow_log; +--replace_column 1 TIMESTAMP +select * from slow_log; + +# +# We want to check that a record newly written to a log table shows up for +# the query: since log tables use concurrent insert machinery and log tables +# are always locked by artificial THD, this feature requires additional +# check in ha_tina::write_row. This simple test should prove that the +# log table flag in the table handler is triggered and working. +# + +truncate table general_log; +--replace_column 1 TIMESTAMP +select * from general_log where argument like '%general_log%'; + + +# +# Check some basic queries interfering with the log tables. +# In our test we'll use a tbale with verbose comments to the short +# command type names, used in the tables +# + +create table join_test (verbose_comment varchar (80), command_type varchar(64)); + +insert into join_test values ("User performed a usual SQL query", "Query"); +insert into join_test values ("New DB connection was registered", "Connect"); +insert into join_test values ("Get the table info", "Field List"); + +select verbose_comment, user_host, argument + from mysql.general_log join join_test + on (mysql.general_log.command_type = join_test.command_type); + +drop table join_test; + +# +# check that flush of the log table work fine +# + +flush logs; + +# +# check locking of the log tables +# + +--error 1532 +lock tables mysql.general_log WRITE; + +--error 1532 +lock tables mysql.slow_log WRITE; + +# +# This attemts to get TL_READ_NO_INSERT lock, which is incompatible with +# TL_WRITE_CONCURRENT_INSERT. This should fail. We issue this error as log +# tables are always opened and locked by the logger. +# + +--error 1533 +lock tables mysql.general_log READ; + +--error 1533 +lock tables mysql.slow_log READ; + +# +# This call should result in TL_READ lock on the log table. This is ok and +# should pass. +# + +lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL; + +unlock tables; + +# +# check that FLUSH LOGS waits for all readers of the log table to vanish +# + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +connection con1; + +lock tables mysql.general_log READ LOCAL; + +connection con2; + +# this should wait for log tables to unlock +send flush logs; + +connection con1; + +unlock tables; + +# this connection should be alive by the time +connection con2; + +reap; + +select "Mark that we woke up from flush logs in the test" + as "test passed"; + +# +# perform the same check for TRUNCATE: it should also wait for readers +# to disappear +# + +connection con1; + +lock tables mysql.general_log READ LOCAL; + +connection con2; + +# this should wait for log tables to unlock +send truncate mysql.general_log; + +connection con1; + +unlock tables; + +# this connection should be alive by the time +connection con2; + +reap; + +select "Mark that we woke up from TRUNCATE in the test" + as "test passed"; + +disconnect con2; +disconnect con1; + diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test index bc88be001ab..167ef435bee 100644 --- a/mysql-test/t/mysqlcheck.test +++ b/mysql-test/t/mysqlcheck.test @@ -1,6 +1,10 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# check that CSV engine was compiled in, as the result of the test +# depends on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + # # Bug #13783 mysqlcheck tries to optimize and analyze information_schema # diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 32cd9d7db39..7ffafe1374a 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -2,6 +2,10 @@ # embedded server testing -- source include/not_embedded.inc +# check that CSV engine was compiled in, as the result of the test +# depends on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + # # Test of some show commands # diff --git a/mysql-test/t/system_mysql_db.test b/mysql-test/t/system_mysql_db.test index 27c17da2731..e3d58ab7139 100644 --- a/mysql-test/t/system_mysql_db.test +++ b/mysql-test/t/system_mysql_db.test @@ -2,6 +2,10 @@ # This test must examine integrity of system database "mysql" # +# check that CSV engine was compiled in, as the result of the test +# depends on the presence of the log tables (which are CSV-based). +--source include/have_csv.inc + # First delete some tables maybe left over from previous tests --disable_warnings drop table if exists t1,t1aa,t2aa; diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix.test index 7974b2fd62d..11ed48011d7 100644 --- a/mysql-test/t/system_mysql_db_fix.test +++ b/mysql-test/t/system_mysql_db_fix.test @@ -1,6 +1,10 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# check that CSV engine was compiled in, as the test relies on the presence +# of the log tables (which are CSV-based) +--source include/have_csv.inc + # # This is the test for mysql_fix_privilege_tables # @@ -85,7 +89,10 @@ INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N',' -- disable_query_log -DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, event; +DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, +procs_priv, help_category, help_keyword, help_relation, help_topic, proc, +time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, +time_zone_transition_type, general_log, slow_log, event; -- enable_query_log |