Commit f6b0514c authored by andrew's avatar andrew

Merge latest mariadb trunk

parents 574590d9 a1a49ec9
......@@ -5,6 +5,18 @@ include/master-slave.inc
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
[on slave]
include/stop_slave.inc
set @save_relay_log_purge=@@global.relay_log_purge;
set @@global.relay_log_purge=0;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
select @@global.relay_log_purge;
@@global.relay_log_purge
0
set @@global.relay_log_purge=1;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
select @@global.relay_log_purge;
@@global.relay_log_purge
1
set @@global.relay_log_purge=@save_relay_log_purge;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
include/start_slave.inc
==== Do replication as new user ====
......
......@@ -2,7 +2,7 @@
#
# Verify that a slave without replication privileges has
# Slave_IO_Running = No
#
# Check that relay_log_status doesn't change by CHANGE MASTER
# ==== Method ====
#
# We do the following steps:
......@@ -28,6 +28,17 @@ GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
--echo [on slave]
sync_slave_with_master;
source include/stop_slave.inc;
# Test that relay_log_purge doesn't change because of CHANGE MASTER
set @save_relay_log_purge=@@global.relay_log_purge;
set @@global.relay_log_purge=0;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
select @@global.relay_log_purge;
set @@global.relay_log_purge=1;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
select @@global.relay_log_purge;
set @@global.relay_log_purge=@save_relay_log_purge;
CHANGE MASTER TO master_user='rpl', master_password='rpl';
source include/start_slave.inc;
......
......@@ -5054,7 +5054,7 @@ int THD::decide_logging_format(TABLE_LIST *tables)
DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx",
table->table_name, flags));
if (table->table->no_replicate && !table->table->s->is_gtid_slave_pos)
if (table->table->no_replicate)
{
/*
The statement uses a table that is not replicated.
......
......@@ -3555,7 +3555,8 @@ int select_insert::prepare2(void)
{
DBUG_ENTER("select_insert::prepare2");
if (thd->lex->current_select->options & OPTION_BUFFER_RESULT &&
thd->locked_tables_mode <= LTM_LOCK_TABLES)
thd->locked_tables_mode <= LTM_LOCK_TABLES &&
!thd->lex->describe)
table->file->ha_start_bulk_insert((ha_rows) 0);
DBUG_RETURN(0);
}
......
......@@ -3444,7 +3444,6 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
}
if (need_relay_log_purge)
{
relay_log_purge= 1;
THD_STAGE_INFO(thd, stage_purging_old_relay_logs);
if (purge_relay_logs(&mi->rli, thd,
0 /* not only reset, but also reinit */,
......@@ -3458,7 +3457,6 @@ bool change_master(THD* thd, Master_info* mi, bool *master_info_added)
else
{
const char* msg;
relay_log_purge= 0;
/* Relay log is already initialized */
if (init_relay_log_pos(&mi->rli,
mi->rli.group_relay_log_name,
......
......@@ -315,8 +315,6 @@ TABLE_SHARE *alloc_table_share(const char *db, const char *table_name,
strmov(share->path.str, path);
share->normalized_path.str= share->path.str;
share->normalized_path.length= path_length;
/* TEMPORARY FIX: if true, this means this is mysql.gtid_slave_pos table */
share->is_gtid_slave_pos= FALSE;
share->table_category= get_table_category(& share->db, & share->table_name);
share->open_errno= ENOENT;
share->cached_row_logging_check= -1;
......
......@@ -660,8 +660,6 @@ struct TABLE_SHARE
LEX_STRING normalized_path; /* unpack_filename(path) */
LEX_STRING connect_string;
bool is_gtid_slave_pos;
/*
Set of keys in use, implemented as a Bitmap.
Excludes keys disabled by ALTER TABLE ... DISABLE KEYS.
......
CREATE TABLE t1 (i INT) ENGINE=TokuDB;
EXPLAIN INSERT INTO t1 SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1 Using temporary
INSERT INTO t1 SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (i INT) ENGINE=TokuDB;
EXPLAIN INSERT INTO t1 SELECT * FROM t1;
--connect con1,localhost,root,,test
INSERT INTO t1 SELECT * FROM t1;
--connection default
--disconnect con1
DROP TABLE t1;
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