mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
126c1228f5
Will in future changeset (soon) av versioning of status variables (number of rows) and index Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Removed some not needed variables (as noticed by Guilhem) include/maria.h: Added prototypes for maria_chk_init_for_check(), maria_versioning() and maria_ignore_trids() include/my_base.h: Add new error HA_ERR_ROW_NOT_VISIBLE include/myisamchk.h: Added variables for checking visibility of rows during maria_chk include/thr_lock.h: Changed argument type from int to my_bool for get_status Added variable allow_multiple_concurrent_insert, to signal if table supports multiple concurrent inserts mysql-test/r/maria-page-checksum.result: Added missing drop table mysql-test/t/maria-page-checksum.test: Added missing drop table mysys/my_handler.c: Added new error messages mysys/thr_lock.c: Added support for multiple concurrent inserts, if table handler supports it sql/sql_yacc.yy: Added LOCK TABLE table_name WRITE CONCURRENT This was added (temporarly?) to be able to check versioning with Maria storage/csv/ha_tina.cc: Updated parameter for get_status storage/maria/ha_maria.cc: Added calls to maria_chk_init_status() Fixed call to ma_control_file_open() storage/maria/ma_blockrec.c: Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings Changed back some 'header' parameters to const char* Removed some casts Added support for versioning: - If info->row_flag & ROW_FLAG_TRANSID is set, store transaction id together with the row - When reading rows, check if rows are visible. Give error if not - When scanning table, ignore not visible rows - Added function parameters to some functions, to be able to call _ma_compact_block_page() with different parameters depending of if the page is a HEAD or TAIL page - _ma_compact_block_page() deletes transaction id's that are visible by all running transactions - Added functions for thr_lock() to enable multiple concurrent inserts - Added helper function 'mysql_versioning()' to enable/disable versioning - Added helper function maria_ignore_trids(), used by maria_chk and maria_pack to see all rows. storage/maria/ma_blockrec.h: Updated parameters for some functions. Added new functions to read/store state with thr_lock storage/maria/ma_check.c: Enable handling of transaction id's in rows Give a readable error if a table contains a transation id that makes rows not visible storage/maria/ma_control_file.c: Added option to not give warning if control file doesn't exists. storage/maria/ma_control_file.h: Updated parameter lists for ma_control_file_open() storage/maria/ma_delete.c: Removed not used variable (suggestion by Guilhem) storage/maria/ma_locking.c: Changed type of argument from int -> my_bool storage/maria/ma_open.c: Removed not used variables 'key_write_undo_lsn' and 'key_delete_undo_lsn' Added new thr_lock interface functions for BLOCK_RECORD to enable multiple concurrent insert storage/maria/ma_test1.c: Added option --versioning (-C) to check versioning storage/maria/ma_test2.c: Added option -C to check versioning storage/maria/ma_test_recovery: Forward argumetns to ma_test_recovery.pl storage/maria/ma_write.c: Removed not used variable key_write_undo_lsn storage/maria/maria_chk.c: Always read control file (if exist) at start Initialize checking of tables by calling maria_chk_init_for_check() In verbose mode and in case of error, print max found transaction id storage/maria/maria_def.h: Added Trid to MARIA_ROW to be able to check transaction id for found row Moved 'base_length' from MARIA_ROW to MARIA_HA to be able to handle different base length (with and without TRANSID) without if's Added default row_flag to MARIA_HA for the same reason Changed LEX_STRING -> LEX_CUSTRING to avoid casts in ma_blockrec.c Removed not needed variables key_write_undo_lsn and key_delete_undo_lsn Added prototypes for new functions and fixed those that had changed storage/maria/maria_pack.c: Ensure we can read all rows from the file, independent of the used transaction id storage/maria/maria_read_log.c: Updated arguments to ma_control_file_open() storage/maria/trnman.c: If we have only one transaction, fixed that min_read_from contains current transaction Fixed that trnman_can_read_from() returns that row is readable if it was written by current transaction storage/maria/unittest/ma_control_file-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_all-t: Added test of versioning Removed printing of one extra space storage/maria/unittest/ma_test_loghandler-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_first_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_max_lsn-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multigroup-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_multithread-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_noflush-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_nologs-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_pagecache-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_loghandler_purge-t.c: Updated arguments to ma_control_file_open() storage/maria/unittest/ma_test_recovery.expected: Updated file with result from new tests storage/maria/unittest/ma_test_recovery.pl: Added options --abort-on-error and --verbose In case of --verbose, print all excuted shell commands Added test of versioning storage/myisam/mi_locking.c: Updated type of parameter storage/myisam/myisamdef.h: Updated type of parameter mysql-test/r/maria-mvcc.result: New BitKeeper file ``mysql-test/r/maria-mvcc.result'' mysql-test/t/maria-mvcc.test: New BitKeeper file ``mysql-test/t/maria-mvcc.test''
1051 lines
37 KiB
Text
1051 lines
37 KiB
Text
-- source include/have_maria.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
select @@global.maria_page_checksum;
|
|
|
|
--echo # iteration 1
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 2
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 3
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 4
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 5
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 6
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 7
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 8
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 9
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 10
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 11
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 12
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 13
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 14
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 15
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 16
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 17
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 18
|
|
set global maria_page_checksum = 0 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 19
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 20
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 21
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 22
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 23
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 24
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 25
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 26
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 27
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 28
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 29
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 30
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 31
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 32
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 33
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 0 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 34
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 engine=maria ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 35
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=0 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|
|
|
|
--echo # iteration 36
|
|
set global maria_page_checksum = 1 ;
|
|
create table t1(a int) engine=maria PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
set global maria_page_checksum = 1 ;
|
|
alter table t1 PAGE_CHECKSUM=1 ;
|
|
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
|
|
--exec $MARIA_CHK -dv $MYSQLTEST_VARDIR/master-data/test/t1 >$MYSQLTEST_VARDIR/tmp/mariachk.txt
|
|
perl;
|
|
use strict;
|
|
use warnings;
|
|
my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/mariachk.txt";
|
|
open(FILE, "<", $fname) or die;
|
|
my @content= grep(/Page checksums are used/, <FILE>);
|
|
print @content ? $content[0] : "Page checksums are not used\n";
|
|
close FILE;
|
|
EOF
|
|
drop table t1;
|