Commit d4f0686c authored by Sergei Golubchik's avatar Sergei Golubchik

5.6.34-79.1

parent d9787aa2
SET(TOKUDB_VERSION 5.6.33-79.0) SET(TOKUDB_VERSION 5.6.34-79.1)
# PerconaFT only supports x86-64 and cmake-2.8.9+ # PerconaFT only supports x86-64 and cmake-2.8.9+
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
NOT CMAKE_VERSION VERSION_LESS "2.8.9") NOT CMAKE_VERSION VERSION_LESS "2.8.9")
......
...@@ -3695,6 +3695,8 @@ int ha_tokudb::do_uniqueness_checks(uchar* record, DB_TXN* txn, THD* thd) { ...@@ -3695,6 +3695,8 @@ int ha_tokudb::do_uniqueness_checks(uchar* record, DB_TXN* txn, THD* thd) {
// first do uniqueness checks // first do uniqueness checks
// //
if (share->has_unique_keys && do_unique_checks(thd, in_rpl_write_rows)) { if (share->has_unique_keys && do_unique_checks(thd, in_rpl_write_rows)) {
DBUG_EXECUTE_IF("tokudb_crash_if_rpl_does_uniqueness_check",
DBUG_ASSERT(0););
for (uint keynr = 0; keynr < table_share->keys; keynr++) { for (uint keynr = 0; keynr < table_share->keys; keynr++) {
bool is_unique_key = (table->key_info[keynr].flags & HA_NOSAME) || (keynr == primary_key); bool is_unique_key = (table->key_info[keynr].flags & HA_NOSAME) || (keynr == primary_key);
bool is_unique = false; bool is_unique = false;
...@@ -5915,6 +5917,7 @@ int ha_tokudb::rnd_pos(uchar * buf, uchar * pos) { ...@@ -5915,6 +5917,7 @@ int ha_tokudb::rnd_pos(uchar * buf, uchar * pos) {
// test rpl slave by inducing a delay before the point query // test rpl slave by inducing a delay before the point query
THD *thd = ha_thd(); THD *thd = ha_thd();
if (thd->slave_thread && (in_rpl_delete_rows || in_rpl_update_rows)) { if (thd->slave_thread && (in_rpl_delete_rows || in_rpl_update_rows)) {
DBUG_EXECUTE_IF("tokudb_crash_if_rpl_looks_up_row", DBUG_ASSERT(0););
uint64_t delay_ms = tokudb::sysvars::rpl_lookup_rows_delay(thd); uint64_t delay_ms = tokudb::sysvars::rpl_lookup_rows_delay(thd);
if (delay_ms) if (delay_ms)
usleep(delay_ms * 1000); usleep(delay_ms * 1000);
......
SET @default_storage_engine_old = @@session.default_storage_engine;
SET SESSION default_storage_engine = TOKUDB;
FLUSH INDEX_STATISTICS;
FLUSH TABLE_STATISTICS;
SET @userstat_old= @@userstat;
SET GLOBAL userstat=ON;
CREATE TABLE t1 (id int(10), PRIMARY KEY (id));
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SELECT COUNT(*) FROM t1;
COUNT(*)
10
SELECT ROWS_READ FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
10
SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
10
FLUSH TABLE_STATISTICS;
SELECT ROWS_READ FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
10
FLUSH INDEX_STATISTICS;
SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
SELECT COUNT(*) FROM t1;
COUNT(*)
10
SELECT ROWS_READ FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
10
SELECT ROWS_READ FROM INFORMATION_SCHEMA.INDEX_STATISTICS WHERE TABLE_NAME='t1';
ROWS_READ
10
DROP TABLE t1;
CREATE TABLE t2 (c1 INT UNSIGNED);
ALTER TABLE t2 MODIFY c1 FLOAT;
SELECT * FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t2';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
DROP TABLE t2;
CREATE TABLE t2 (c1 INT UNSIGNED) ENGINE=InnoDB;
ALTER TABLE t2 MODIFY c1 FLOAT;
SELECT * FROM INFORMATION_SCHEMA.TABLE_STATISTICS WHERE TABLE_NAME='t2';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
DROP TABLE t2;
SET GLOBAL userstat= @userstat_old;
SET SESSION default_storage_engine = @default_storage_engine_old;
--source include/have_tokudb.inc
SET @default_storage_engine_old = @@session.default_storage_engine;
SET SESSION default_storage_engine = TOKUDB;
--source include/percona_table_index_statistics.inc
SET SESSION default_storage_engine = @default_storage_engine_old;
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
call mtr.add_suppression(".*read free replication is disabled for TokuDB table.*continue with rows lookup");
CREATE TABLE t1 (id int(11) NOT NULL, pid int(11), PRIMARY KEY (id)) ENGINE=TokuDB
PARTITION BY RANGE (id)
(PARTITION p_1 VALUES LESS THAN (10) ENGINE = TokuDB,
PARTITION p_2 VALUES LESS THAN (20) ENGINE = TokuDB,
PARTITION p_all VALUES LESS THAN MAXVALUE ENGINE = TokuDB);
insert into t1 values (1, 1), (2, 2), (3, 3), (11, 11), (12, 12), (13, 13);
CREATE TABLE t2 (id int(11) NOT NULL, pid int(11), key idx_1(id)) ENGINE=TokuDB
PARTITION BY RANGE (id)
(PARTITION p_1 VALUES LESS THAN (10) ENGINE = TokuDB,
PARTITION p_2 VALUES LESS THAN (20) ENGINE = TokuDB,
PARTITION p_all VALUES LESS THAN MAXVALUE ENGINE = TokuDB);
insert into t2 values (1, 1), (2, 2), (3, 3), (11, 11), (12, 12), (13, 13);
include/stop_slave.inc
set global debug= "+d,tokudb_crash_if_rpl_looks_up_row,tokudb_crash_if_rpl_does_uniqueness_check";
include/start_slave.inc
insert into t1 values(21, 21);
delete from t1 where id = 11;
update t1 set pid = 2 where id = 1;
include/diff_tables.inc [master:test.t1, slave:test.t1]
insert into t2 values(21, 21);
delete from t2 where id = 11;
update t2 set pid = 2 where id = 1;
include/diff_tables.inc [master:test.t2, slave:test.t2]
drop table t1;
drop table t2;
include/stop_slave.inc
set global debug= "-d,tokudb_crash_if_rpl_looks_up_row,tokudb_crash_if_rpl_does_uniqueness_check";
set global debug= @saved_debug;
include/start_slave.inc
include/rpl_end.inc
--read-only=ON --loose-tokudb-rpl-unique-checks=OFF --loose-tokudb-rpl-lookup-rows=OFF
# test tokudb read free replication feature with partition table
--source include/have_debug.inc
--source include/have_tokudb.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
call mtr.add_suppression(".*read free replication is disabled for TokuDB table.*continue with rows lookup");
connection master;
# partition table with explicit PK
CREATE TABLE t1 (id int(11) NOT NULL, pid int(11), PRIMARY KEY (id)) ENGINE=TokuDB
PARTITION BY RANGE (id)
(PARTITION p_1 VALUES LESS THAN (10) ENGINE = TokuDB,
PARTITION p_2 VALUES LESS THAN (20) ENGINE = TokuDB,
PARTITION p_all VALUES LESS THAN MAXVALUE ENGINE = TokuDB);
insert into t1 values (1, 1), (2, 2), (3, 3), (11, 11), (12, 12), (13, 13);
# partition table without explicit PK
CREATE TABLE t2 (id int(11) NOT NULL, pid int(11), key idx_1(id)) ENGINE=TokuDB
PARTITION BY RANGE (id)
(PARTITION p_1 VALUES LESS THAN (10) ENGINE = TokuDB,
PARTITION p_2 VALUES LESS THAN (20) ENGINE = TokuDB,
PARTITION p_all VALUES LESS THAN MAXVALUE ENGINE = TokuDB);
insert into t2 values (1, 1), (2, 2), (3, 3), (11, 11), (12, 12), (13, 13);
--sync_slave_with_master
# set tokudb rfr crash/assert conditions if we enter lookup code
# to make sure no unique checks or row lookups is invoked
connection slave;
--source include/stop_slave.inc
let $saved_debug = `select @@debug`;
set global debug= "+d,tokudb_crash_if_rpl_looks_up_row,tokudb_crash_if_rpl_does_uniqueness_check";
--source include/start_slave.inc
connection master;
insert into t1 values(21, 21);
delete from t1 where id = 11;
update t1 set pid = 2 where id = 1;
sync_slave_with_master;
connection master;
--let $diff_tables= master:test.t1, slave:test.t1
--source include/diff_tables.inc
# print rfr disabled warning in errlog
connection master;
insert into t2 values(21, 21);
delete from t2 where id = 11;
update t2 set pid = 2 where id = 1;
sync_slave_with_master;
--let $diff_tables= master:test.t2, slave:test.t2
--source include/diff_tables.inc
connection master;
drop table t1;
drop table t2;
sync_slave_with_master;
connection slave;
--source include/stop_slave.inc
set global debug= "-d,tokudb_crash_if_rpl_looks_up_row,tokudb_crash_if_rpl_does_uniqueness_check";
set global debug= @saved_debug;
--source include/start_slave.inc
--source include/rpl_end.inc
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment