diff options
author | monty@mysql.com <> | 2006-05-05 20:08:40 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2006-05-05 20:08:40 +0300 |
commit | 8c7783c1e03d4c6ac6addc0eaf3d8bbe26f6e7ec (patch) | |
tree | d106da477f33eec83b9b2457a6a1f6c03d5855bb /mysql-test | |
parent | 69d0960d60b891e2c317a0d6da9e764a084e6bfb (diff) | |
download | mariadb-git-8c7783c1e03d4c6ac6addc0eaf3d8bbe26f6e7ec.tar.gz |
Don't use row level logging on optimize or repair table.
(Fixes core dump in rpl_failed_optimize.test)
Ensure we end active transcations if we do an admin command (like optimize, repair etc)
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_failed_optimize.test | 5 | ||||
-rw-r--r-- | mysql-test/lib/mtr_report.pl | 6 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 4 | ||||
-rw-r--r-- | mysql-test/r/exampledb.result | 2 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 7 | ||||
-rw-r--r-- | mysql-test/r/rpl_failed_optimize.result | 5 | ||||
-rw-r--r-- | mysql-test/t/exampledb.test | 4 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 10 |
8 files changed, 39 insertions, 4 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test index 598f9746fab..0c537ee188d 100644 --- a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test +++ b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test @@ -17,3 +17,8 @@ OPTIMIZE TABLE non_existing; sync_slave_with_master; # End of 4.1 tests + +connection master; +select * from t1; +commit; +drop table t1; diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 56601d9236a..f2da89355f7 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -218,7 +218,8 @@ sub mtr_report_stats ($) { # We report different types of problems in order foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x", "InnoDB: Warning", "missing DBUG_RETURN", - "mysqld: Warning") + "mysqld: Warning", + "Attempting backtrace", "Assertion .* failed" ) { foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") ) { @@ -232,7 +233,8 @@ sub mtr_report_stats ($) { # Skip some non fatal warnings from the log files if ( /Warning:\s+Table:.* on (delete|rename)/ or /Warning:\s+Setting lower_case_table_names=2/ or - /Warning:\s+One can only use the --user.*root/ ) + /Warning:\s+One can only use the --user.*root/ or + /InnoDB: Warning: we did not need to do crash recovery/) { next; # Skip these lines } diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 24e88d1e5e3..f56099f3a49 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1073,13 +1073,13 @@ report_stats () { # $RM -f $MY_LOG_DIR/warnings $MY_LOG_DIR/warnings.tmp # Remove some non fatal warnings from the log files - $SED -e 's!Warning: Table:.* on delete!!g' -e 's!Warning: Setting lower_case_table_names=2!!g' -e 's!Warning: One can only use the --user.*root!!g' \ + $SED -e 's!Warning: Table:.* on delete!!g' -e 's!Warning: Setting lower_case_table_names=2!!g' -e 's!Warning: One can only use the --user.*root!!g' -e 's|InnoDB: Warning: we did not need to do crash recovery||g' \ $MY_LOG_DIR/*.err \ | $SED -e 's!Warning: Table:.* on rename!!g' \ > $MY_LOG_DIR/warnings.tmp # Find errors - for i in "^Warning:" "^Error:" "^==.* at 0x" "InnoDB: Warning" "missing DBUG_RETURN" "mysqld: Warning" + for i in "^Warning:" "^Error:" "^==.* at 0x" "InnoDB: Warning" "missing DBUG_RETURN" "mysqld: Warning" "Attempting backtrace" "Assertion .* failed" do if $GREP "$i" $MY_LOG_DIR/warnings.tmp >> $MY_LOG_DIR/warnings then diff --git a/mysql-test/r/exampledb.result b/mysql-test/r/exampledb.result index 9bfb77c1c0b..6eea24e2e1f 100644 --- a/mysql-test/r/exampledb.result +++ b/mysql-test/r/exampledb.result @@ -1,3 +1,5 @@ +drop database if exists events_test; +drop database if exists events_test2; drop table if exists t1; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 03e9525c977..7ae87e42b8c 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3457,3 +3457,10 @@ a drop table t2, t1; create table t1 (g geometry not null, spatial gk(g)) engine=innodb; ERROR HY000: The used table type doesn't support SPATIAL indexes +CREATE TABLE t1 ( a int ) ENGINE=innodb; +BEGIN; +INSERT INTO t1 VALUES (1); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index fd711f89222..ec0b3856ae7 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -18,3 +18,8 @@ Table Op Msg_type Msg_text test.non_existing optimize error Table 'test.non_existing' doesn't exist Warnings: Error 1146 Table 'test.non_existing' doesn't exist +select * from t1; +a +1 +commit; +drop table t1; diff --git a/mysql-test/t/exampledb.test b/mysql-test/t/exampledb.test index 946d25325dc..fbb2a18f344 100644 --- a/mysql-test/t/exampledb.test +++ b/mysql-test/t/exampledb.test @@ -5,6 +5,10 @@ -- source include/have_exampledb.inc --disable_warnings +# Clean up if event's test fails +drop database if exists events_test; +drop database if exists events_test2; + drop table if exists t1; --enable_warnings diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 820c7872b73..92e060eed92 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2500,3 +2500,13 @@ drop table t2, t1; # --error ER_TABLE_CANT_HANDLE_SPKEYS create table t1 (g geometry not null, spatial gk(g)) engine=innodb; + +# +# Test optimize on table with open transaction +# + +CREATE TABLE t1 ( a int ) ENGINE=innodb; +BEGIN; +INSERT INTO t1 VALUES (1); +OPTIMIZE TABLE t1; +DROP TABLE t1; |