summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2008-01-11 01:47:52 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2008-01-11 01:47:52 +0200
commit266fde77b283237fa2dd6db0f97fb68289fe0c21 (patch)
tree168dfb22329c2c89f90b021e60d0462b5a739d2d /mysql-test
parent674f0198c3c099a2e9ea899b46d9592d8844d499 (diff)
downloadmariadb-git-266fde77b283237fa2dd6db0f97fb68289fe0c21.tar.gz
Added --loose-skip-maria to MYSQLD_BOOTSTRAP_CMD to get bootstrap.test to work
Allow one to run bootstrap even if --skip-maria is used (needed for bootstrap.test) Fixed lots of compiler warnings NOTE: maria-big and maria-recover tests failes becasue of bugs in transaction log handling. Sanja knows about this and is working on it! mysql-test/mysql-test-run.pl: Added --loose-skip-maria to MYSQLD_BOOTSTRAP_CMD to get bootstrap.test to work mysql-test/r/maria-recovery.result: Updated results mysql-test/t/bootstrap.test: Removed not needed empty line mysql-test/t/change_user.test: Fixed results for 32 bit systems mysql-test/t/maria-big.test: Only run this when you use --big mysql-test/t/maria-recovery.test: Added test case for recovery with big blobs mysys/my_uuid.c: Fixed compiler warning sql/mysqld.cc: Allow one to run bootstrap even if --skip-maria is used (needed for bootstrap.test) sql/set_var.cc: Compare max_join_size with ULONG_MAX instead of HA_POS_ERROR as we set max_join_size to ULONG_MAX by default storage/maria/ma_bitmap.c: Added __attribute((unused)) to fix compiler warning storage/maria/ma_blockrec.c: Added casts to remove compiler warnings Change variable types to avoid compiler warnings storage/maria/ma_check.c: Added casts to remove compiler warnings storage/maria/ma_checkpoint.c: Change variable types to avoid compiler warnings storage/maria/ma_create.c: Change variable types to avoid compiler warnings storage/maria/ma_delete.c: Added casts to remove compiler warnings storage/maria/ma_key_recover.c: Added casts to remove compiler warnings storage/maria/ma_loghandler.c: Moved initiazation of prev_buffer first as this could otherwise not be set in case of errors storage/maria/ma_page.c: Added casts to remove compiler warnings storage/maria/ma_pagecache.c: Added __attribute((unused)) to fix compiler warning storage/maria/ma_pagecrc.c: Added #ifndef DBUG_OFF to remove compiler warning storage/maria/ma_recovery.c: Added casts to remove compiler warnings storage/maria/ma_write.c: Added casts to remove compiler warnings storage/maria/maria_chk.c: Split long string into two to avoid compiler warnings storage/myisam/ft_boolean_search.c: Added LINT_INIT() to remove compiler warning support-files/compiler_warnings.supp: Suppress wrong compiler warning unittest/mytap/tap.c: Fixed declaration to match prototypes to remove compiler warnings
Diffstat (limited to 'mysql-test')
-rwxr-xr-xmysql-test/mysql-test-run.pl11
-rw-r--r--mysql-test/r/maria-recovery.result77
-rw-r--r--mysql-test/t/bootstrap.test1
-rw-r--r--mysql-test/t/change_user.test5
-rw-r--r--mysql-test/t/maria-big.test4
-rw-r--r--mysql-test/t/maria-recovery.test36
6 files changed, 130 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 91defce8a86..cea37c5027a 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3106,8 +3106,8 @@ sub install_db ($$) {
mtr_report("Installing \u$type Database");
-
my $args;
+ my $cmd_args;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--bootstrap");
@@ -3120,6 +3120,12 @@ sub install_db ($$) {
mtr_add_arg($args, "--tmpdir=.");
mtr_add_arg($args, "--core-file");
+ #
+ # Setup args for bootstrap.test
+ #
+ mtr_init_args(\$cmd_args);
+ mtr_add_arg($cmd_args, "--loose-skip-maria");
+
if ( $opt_debug )
{
mtr_add_arg($args, "--debug=d:t:i:A,%s/log/bootstrap_%s.trace",
@@ -3142,7 +3148,8 @@ sub install_db ($$) {
# ----------------------------------------------------------------------
# export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
# ----------------------------------------------------------------------
- $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
+ $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args) .
+ " " . join(" ", @$cmd_args);
# ----------------------------------------------------------------------
# Create the bootstrap.sql file
diff --git a/mysql-test/r/maria-recovery.result b/mysql-test/r/maria-recovery.result
index 6f75443a02c..932a0aadde0 100644
--- a/mysql-test/r/maria-recovery.result
+++ b/mysql-test/r/maria-recovery.result
@@ -269,6 +269,83 @@ Checksum-check
ok
use mysqltest;
drop table t1;
+* TEST of recovery with blobs
+* shut down mysqld, removed logs, restarted it
+use mysqltest;
+set @@max_allowed_packet=32000000;
+create table t1 (a int, b longtext) engine=maria;
+* copied t1 for feeding_recovery
+insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");
+flush table t1;
+* copied t1 for comparison
+lock table t1 write;
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+update t1 set b=CONCAT(b,b);
+select a,length(b) from t1;
+a length(b)
+1 31457280
+2 20971520
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+update t1 set b=mid(b,1,length(b)/2);
+select a,length(b) from t1;
+a length(b)
+1 8
+2 5
+check table t1;
+Table Op Msg_type Msg_text
+mysqltest.t1 check status OK
+SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
+* crashing mysqld intentionally
+set global maria_checkpoint_interval=1;
+ERROR HY000: Lost connection to MySQL server during query
+* copied t1 back for feeding_recovery
+* recovery happens
+check table t1 extended;
+Table Op Msg_type Msg_text
+mysqltest.t1 check status OK
+* testing that checksum after recovery is as expected
+Checksum-check
+ok
+use mysqltest;
+drop table t1;
drop database mysqltest_for_feeding_recovery;
drop database mysqltest_for_comparison;
drop database mysqltest;
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
index 203ba9b2914..a6871733c94 100644
--- a/mysql-test/t/bootstrap.test
+++ b/mysql-test/t/bootstrap.test
@@ -5,7 +5,6 @@
drop table if exists t1;
--enable_warnings
-
#
# Check that --bootstrap reads from stdin
#
diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test
index aac0b3d018c..db003815862 100644
--- a/mysql-test/t/change_user.test
+++ b/mysql-test/t/change_user.test
@@ -1,13 +1,16 @@
#
# Bug#20023 mysql_change_user() resets the value of SQL_BIG_SELECTS
+# The replace's are here to fix things for 32 bit systems
#
--echo Bug#20023
SELECT @@session.sql_big_selects;
+--replace_result 4294967295 18446744073709551615
SELECT @@global.max_join_size;
--echo change_user
--change_user
SELECT @@session.sql_big_selects;
+--replace_result 4294967295 18446744073709551615
SELECT @@global.max_join_size;
SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default;
@@ -19,7 +22,9 @@ SET @@session.max_join_size = default;
--echo change_user
--change_user
SELECT @@session.sql_big_selects;
+--replace_result 4294967295 18446744073709551615
SELECT @@global.max_join_size;
+--replace_result 4294967295 18446744073709551615
SELECT @@session.max_join_size;
#
diff --git a/mysql-test/t/maria-big.test b/mysql-test/t/maria-big.test
index fd687bf925f..aac26ec2e60 100644
--- a/mysql-test/t/maria-big.test
+++ b/mysql-test/t/maria-big.test
@@ -1,5 +1,7 @@
# Test of scenarios potentially too big for --valgrind or --mem
--- source include/have_maria.inc
+--source include/have_maria.inc
+--source include/big_test.inc
+
enable_info;
set storage_engine=maria;
set global maria_log_file_size=4294967295;
diff --git a/mysql-test/t/maria-recovery.test b/mysql-test/t/maria-recovery.test
index f2d8d5b1e2d..51191bd09ee 100644
--- a/mysql-test/t/maria-recovery.test
+++ b/mysql-test/t/maria-recovery.test
@@ -234,6 +234,42 @@ let $mvr_crash_statement= set global maria_checkpoint_interval=1;
-- source include/maria_verify_recovery.inc
drop table t1;
+#
+# Test with big blobs
+#
+
+--echo * TEST of recovery with blobs
+-- source include/maria_empty_logs.inc
+set @@max_allowed_packet=32000000;
+create table t1 (a int, b longtext) engine=maria table_checksum=1;
+let $mms_tables=1;
+-- source include/maria_make_snapshot_for_feeding_recovery.inc
+insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");
+-- source include/maria_make_snapshot_for_comparison.inc
+lock table t1 write;
+let $loop=20;
+while ($loop)
+{
+ update t1 set b=CONCAT(b,b);
+ dec $loop;
+}
+select a,length(b) from t1;
+let $loop=22;
+while ($loop)
+{
+ update t1 set b=mid(b,1,length(b)/2);
+ dec $loop;
+}
+select a,length(b) from t1;
+check table t1;
+# we want recovery to run on the first snapshot made above
+let $mvr_restore_old_snapshot=1;
+let $mms_compare_physically=0;
+let $mvr_debug_option="+d,maria_flush_whole_log,maria_crash";
+let $mvr_crash_statement= set global maria_checkpoint_interval=1;
+-- source include/maria_verify_recovery.inc
+drop table t1;
+
# clean up everything
let $mms_purpose=feeding_recovery;
eval drop database mysqltest_for_$mms_purpose;