1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-09 08:01:34 +03:00
trnman_get_state/trnman_set_state renamed to trnman_get/set_flags
TRN::state - to TRN::flags accordingly
This commit is contained in:
Sergei Golubchik
2009-01-16 17:18:17 +01:00
20 changed files with 287 additions and 18 deletions

View File

@@ -1,3 +1,4 @@
set global max_allowed_packet=400000000;
set storage_engine=maria;
affected rows: 0
set global maria_log_file_size=4294967295;
@@ -61,8 +62,6 @@ count(*)
affected rows: 1
drop table t1, t2;
affected rows: 0
set @@max_allowed_packet=400000000;
affected rows: 0
create table t1 (a int, b longtext);
affected rows: 0
insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");

View File

@@ -4,7 +4,6 @@ create database mysqltest;
use mysqltest;
* TEST of recovery with blobs
* shut down mysqld, removed logs, restarted it
set @@max_allowed_packet=32000000;
create table t1 (a int, b longtext) engine=maria table_checksum=1;
* copied t1 for feeding_recovery
insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");

View File

@@ -25,5 +25,43 @@ Checksum-check
ok
use mysqltest;
drop table t1;
* TEST of logging of BLOBs
CREATE TABLE `t1` (
`blob` blob,
`blob_key` blob
) ENGINE=maria ROW_FORMAT=page
;
* copied t1 for feeding_recovery
* compared t1 to old version
set global maria_checkpoint_interval=0;
INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
INSERT INTO `t1` VALUES (repeat('C',65535),NULL);
INSERT INTO `t1` VALUES (NULL,repeat('D',65535));
INSERT INTO `t1` VALUES (repeat('E',65535),repeat('F',16111));
INSERT INTO `t1` VALUES (repeat('G',65535),repeat('H',65535));
INSERT INTO `t1` VALUES (repeat('I',5198),repeat('J',65535));
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
flush table t1;
* copied t1 for comparison
* compared t1 to old version
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
* compared t1 to old version
use mysqltest;
drop table t1;
drop database mysqltest_for_comparison;
drop database mysqltest;

View File

@@ -2,6 +2,11 @@
--source include/have_maria.inc
--source include/big_test.inc
set global max_allowed_packet=400000000;
# need new session to use setting above
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root;
enable_info;
set storage_engine=maria;
set global maria_log_file_size=4294967295;
@@ -38,7 +43,6 @@ drop table t1, t2;
# Test creating a really big blob (up to 16M)
#
set @@max_allowed_packet=400000000;
create table t1 (a int, b longtext);
insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321");

View File

@@ -1 +1 @@
--skip-stack-trace --skip-core-file
--skip-stack-trace --skip-core-file --max_allowed_packet=32000000

View File

@@ -33,7 +33,6 @@ use mysqltest;
--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

View File

@@ -1 +1 @@
--skip-stack-trace --skip-core-file --maria-log-dir-path=../tmp
--skip-stack-trace --skip-core-file --loose-maria-log-dir-path=$MYSQLTEST_VARDIR/tmp

View File

@@ -39,7 +39,6 @@ let $mvr_restore_old_snapshot=0;
# UNDO phase prevents physical comparison, normally,
# so we'll only use checksums to compare.
let $mms_compare_physically=0;
let $mvr_crash_statement= set global maria_checkpoint_interval=1;
create table t1(a int primary key) engine=maria;
insert into t1 values(1);
-- source include/maria_make_snapshot_for_comparison.inc
@@ -65,6 +64,30 @@ drop table t1;
# before checkpoint happens, test should still pass (though it won't
# reproduce the conditions of the bug).
# Test for BUG#41493 Maria: two recovery failures (wrong logging of BLOB pages)
--echo * TEST of logging of BLOBs
let $mvr_restore_old_snapshot=1;
let $mms_compare_physically=1;
CREATE TABLE `t1` (
`blob` blob,
`blob_key` blob
) ENGINE=maria ROW_FORMAT=page
;
-- source include/maria_make_snapshot_for_feeding_recovery.inc
set global maria_checkpoint_interval=0; # no checkpoints
INSERT INTO `t1` VALUES (NULL,repeat('A',5198));
INSERT INTO `t1` VALUES (NULL,repeat('B',65535));
INSERT INTO `t1` VALUES (repeat('K',5198),repeat('L',2325));
INSERT INTO `t1` VALUES (repeat('C',65535),NULL);
INSERT INTO `t1` VALUES (NULL,repeat('D',65535));
INSERT INTO `t1` VALUES (repeat('E',65535),repeat('F',16111));
INSERT INTO `t1` VALUES (repeat('G',65535),repeat('H',65535));
INSERT INTO `t1` VALUES (repeat('I',5198),repeat('J',65535));
check table t1 extended;
-- source include/maria_make_snapshot_for_comparison.inc
-- source include/maria_verify_recovery.inc
drop table t1;
# clean up everything
let $mms_purpose=comparison;
eval drop database mysqltest_for_$mms_purpose;