Skip to content

Commit

Permalink
MariaRocks port: get rocksdb.checksum_table to work
Browse files Browse the repository at this point in the history
MariaDB has a different checksumming algorithm. Old one
can be used by setting @@old=1
  • Loading branch information
spetrunia committed Dec 3, 2016
1 parent 8018bb7 commit 00e3869
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/rocksdb/mysql-test/rocksdb/r/checksum_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ col1 varchar(10),
col2 tinyint,
col3 double
) engine=rocksdb;
# MariaDB has changed the checksumming algorithm
# Enable the old algorithm:
set @tmp_old=@@old;
set old=1;
checksum table t1;
Table Checksum
test.t1 0
Expand All @@ -84,4 +88,5 @@ insert into t1 values (6, '', NULL, 2.78);
checksum table t1;
Table Checksum
test.t1 3183101003
set old=@tmp_old;
drop table t1;
8 changes: 8 additions & 0 deletions storage/rocksdb/mysql-test/rocksdb/t/checksum_table.test
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ create table t1 (
col3 double
) engine=rocksdb;

--echo # MariaDB has changed the checksumming algorithm
--echo # Enable the old algorithm:
set @tmp_old=@@old;
set old=1;


checksum table t1;

insert into t1 values (1, NULL, NULL, NULL);
Expand All @@ -72,5 +78,7 @@ insert into t1 values (5, 'xxxYYYzzzT', NULL, 2.78);
insert into t1 values (6, '', NULL, 2.78);
checksum table t1;

set old=@tmp_old;

drop table t1;

0 comments on commit 00e3869

Please sign in to comment.