Commit b51ea57e authored by Jacob Mathew's avatar Jacob Mathew

Adding support for auto_increment in the partition engine.

Contains Spiral patches:
- Spiral Patch 022: 022_mariadb-10.2.0.auto_increment.diff          MDEV-7720
- Spiral Patch 030: 030_mariadb-10.2.0.partition_auto_inc_init.diff MDEV-7726

These patches have the following differences compared to the original patches:
- Added the new #defines for the feature in ha_spider.h instead of in handler.h
  because these #defines are needed by Spider and are not needed by the server.
- Added a test case.
- Added test result changes resulting from a bug that was fixed by these
  patches.
parent ff809568
......@@ -246,7 +246,8 @@ ha_partition::ha_partition(handlerton *hton, TABLE_SHARE *share) :
handler(hton, share), m_pre_calling(FALSE), m_pre_call_use_parallel(FALSE),
bulk_access_started(FALSE), bulk_access_executing(FALSE),
bulk_access_pre_called(FALSE), bulk_access_info_first(NULL),
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL)
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL),
m_need_info_for_auto_inc(FALSE)
{
DBUG_ENTER("ha_partition::ha_partition(table)");
ft_first = NULL;
......@@ -272,7 +273,8 @@ ha_partition::ha_partition(handlerton *hton, partition_info *part_info) :
handler(hton, NULL), m_pre_calling(FALSE), m_pre_call_use_parallel(FALSE),
bulk_access_started(FALSE), bulk_access_executing(FALSE),
bulk_access_pre_called(FALSE), bulk_access_info_first(NULL),
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL)
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL),
m_need_info_for_auto_inc(FALSE)
{
DBUG_ENTER("ha_partition::ha_partition(part_info)");
DBUG_ASSERT(part_info);
......@@ -305,7 +307,8 @@ ha_partition::ha_partition(handlerton *hton, TABLE_SHARE *share,
handler(hton, share), m_pre_calling(FALSE), m_pre_call_use_parallel(FALSE),
bulk_access_started(FALSE), bulk_access_executing(FALSE),
bulk_access_pre_called(FALSE), bulk_access_info_first(NULL),
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL)
bulk_access_info_current(NULL), bulk_access_info_exec_tgt(NULL),
m_need_info_for_auto_inc(FALSE)
{
DBUG_ENTER("ha_partition::ha_partition(clone)");
ft_first = NULL;
......@@ -4302,7 +4305,8 @@ int ha_partition::write_row(uchar * buf)
if (m_pre_calling ||
!bulk_access_executing || !bulk_access_info_exec_tgt->called)
{
if (!part_share->auto_inc_initialized &&
if ((need_info_for_auto_inc() ||
!part_share->auto_inc_initialized) &&
!table_share->next_number_keypart)
{
/*
......@@ -4518,7 +4522,8 @@ int ha_partition::update_row(const uchar *old_data, uchar *new_data)
bitmap_is_set(table->write_set,
table->found_next_number_field->field_index))
{
if (!part_share->auto_inc_initialized)
if (need_info_for_auto_inc() ||
!part_share->auto_inc_initialized)
info(HA_STATUS_AUTO);
set_auto_increment_if_higher(table->found_next_number_field);
}
......@@ -8745,7 +8750,7 @@ int ha_partition::info(uint flag)
DBUG_PRINT("info", ("HA_STATUS_AUTO 1 stats.auto_increment_value=%llu",
stats.auto_increment_value));
}
else if (part_share->auto_inc_initialized)
else if (!m_need_info_for_auto_inc && part_share->auto_inc_initialized)
{
lock_auto_increment();
stats.auto_increment_value= part_share->next_auto_inc_val;
......@@ -8757,7 +8762,7 @@ int ha_partition::info(uint flag)
{
lock_auto_increment();
/* to avoid two concurrent initializations, check again when locked */
if (part_share->auto_inc_initialized)
if (!m_need_info_for_auto_inc && part_share->auto_inc_initialized)
{
stats.auto_increment_value= part_share->next_auto_inc_val;
DBUG_PRINT("info", ("HA_STATUS_AUTO 3 stats.auto_increment_value=%llu",
......@@ -8792,13 +8797,15 @@ int ha_partition::info(uint flag)
{
set_if_bigger(part_share->next_auto_inc_val,
auto_increment_value);
part_share->auto_inc_initialized= true;
if (can_use_for_auto_inc_init())
part_share->auto_inc_initialized= true;
DBUG_PRINT("info", ("initializing next_auto_inc_val to %lu",
(ulong) part_share->next_auto_inc_val));
}
}
unlock_auto_increment();
}
m_need_info_for_auto_inc= FALSE;
}
if (flag & HA_STATUS_VARIABLE)
{
......@@ -10787,6 +10794,60 @@ int ha_partition::cmp_ref(const uchar *ref1, const uchar *ref2)
****************************************************************************/
/**
Determine whether a partition needs auto-increment initialization.
@return
TRUE A partition needs auto-increment initialization
FALSE No partition needs auto-increment initialization
m_need_info_for_auto_inc is set to match the return value.
*/
bool ha_partition::need_info_for_auto_inc()
{
handler **file= m_file;
DBUG_ENTER("ha_partition::need_info_for_auto_inc");
do
{
if ((*file)->need_info_for_auto_inc())
{
m_need_info_for_auto_inc= TRUE;
DBUG_RETURN(TRUE);
}
} while (*(++file));
m_need_info_for_auto_inc= FALSE;
DBUG_RETURN(FALSE);
}
/**
Determine if all partitions can use the current auto-increment value for
auto-increment initialization.
@return
TRUE All partitions can use the current auto-increment
value for auto-increment initialization
FALSE All partitions cannot use the current
auto-increment value for auto-increment
initialization
*/
bool ha_partition::can_use_for_auto_inc_init()
{
handler **file= m_file;
DBUG_ENTER("ha_partition::can_use_for_auto_inc_init");
do
{
if (!(*file)->can_use_for_auto_inc_init())
DBUG_RETURN(FALSE);
} while (*(++file));
DBUG_RETURN(TRUE);
}
int ha_partition::reset_auto_increment(ulonglong value)
{
handler **file= m_file;
......
......@@ -1173,6 +1173,9 @@ class ha_partition :public handler
auto_increment_column_changed
-------------------------------------------------------------------------
*/
bool m_need_info_for_auto_inc;
virtual bool need_info_for_auto_inc();
virtual bool can_use_for_auto_inc_init();
virtual void get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong nb_desired_values,
ulonglong *first_value,
......
......@@ -3350,6 +3350,8 @@ class handler :public Sql_alloc
virtual void try_semi_consistent_read(bool) {}
virtual void unlock_row() {}
virtual int start_stmt(THD *thd, thr_lock_type lock_type) {return 0;}
virtual bool need_info_for_auto_inc() { return 0; }
virtual bool can_use_for_auto_inc_init() { return 1; }
virtual void get_auto_increment(ulonglong offset, ulonglong increment,
ulonglong nb_desired_values,
ulonglong *first_value,
......
......@@ -23,6 +23,8 @@
#if MYSQL_VERSION_ID >= 100203
#define HANDLER_HAS_TOP_TABLE_FIELDS
#define HANDLER_HAS_NEED_INFO_FOR_AUTO_INC
#define HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT
#define PARTITION_HAS_EXTRA_ATTACH_CHILDREN
#define PARTITION_HAS_GET_CHILD_HANDLERS
#define PARTITION_HAS_EXTRA_ATTACH_CHILDREN
......
--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
--let $OUTPUT_CHILD_GROUP2= $OUTPUT_CHILD_GROUP2_BACKUP
--let $USE_GENERAL_LOG= $USE_GENERAL_LOG_BACKUP
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_init.inc
--enable_result_log
--enable_query_log
--enable_warnings
--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
let $MASTER_1_COMMENT_2_1=
COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"';
let $MASTER_1_AUTO_INCREMENT_2_1=
AUTO_INCREMENT=20;
let $MASTER_1_AUTO_INCREMENT1=
ALTER TABLE tbl_a AUTO_INCREMENT=30;
let $MASTER_1_AUTO_INCREMENT2=
ALTER TABLE tbl_a AUTO_INCREMENT=10;
let $CHILD2_1_CHARSET_AUTO_INCREMENT=
AUTO_INCREMENT=20;
--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
let $CHILD2_1_DROP_TABLES=
DROP TABLE IF EXISTS tbl_a;
--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
let $CHILD2_1_CREATE_TABLES=
CREATE TABLE tbl_a (
col_a INT NOT NULL AUTO_INCREMENT,
col_b VARCHAR(20) DEFAULT 'def',
col_c INT NOT NULL DEFAULT 10,
PRIMARY KEY(col_a)
) $CHILD2_1_ENGINE $CHILD2_1_CHARSET_AUTO_INCREMENT $CHILD2_1_CHARSET;
--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
let $CHILD2_1_SELECT_TABLES=
SELECT col_a, col_b, col_c FROM tbl_a ORDER BY col_a;
let $CHILD2_1_SELECT_ARGUMENT1=
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
--let $OUTPUT_CHILD_GROUP2_BACKUP= $OUTPUT_CHILD_GROUP2
--let $OUTPUT_CHILD_GROUP2= 1
--let $USE_GENERAL_LOG_BACKUP= $USE_GENERAL_LOG
--let $USE_GENERAL_LOG= 1
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
drop and create databases
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
DROP DATABASE IF EXISTS auto_test_remote;
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
test select 1
connection master_1;
SELECT 1;
1
1
connection child2_1;
SELECT 1;
1
1
create table select test
connection child2_1;
CHILD2_1_DROP_TABLES
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
DROP TABLE IF EXISTS tbl_a;
CREATE TABLE tbl_a (
col_a INT NOT NULL AUTO_INCREMENT,
col_b VARCHAR(20) DEFAULT 'defg',
col_c INT NOT NULL DEFAULT 100,
PRIMARY KEY(col_a)
) MASTER_1_ENGINE MASTER_1_AUTO_INCREMENT_2_1 MASTER_1_COMMENT_2_1
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` int(11) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` int(11) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
ALTER TABLE tbl_a MODIFY col_c MEDIUMINT NOT NULL DEFAULT 100;
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
RENAME TABLE tbl_a TO tbl_x;
SHOW CREATE TABLE tbl_x;
Table Create Table
tbl_x CREATE TABLE `tbl_x` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
RENAME TABLE tbl_x TO tbl_a;
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
MASTER_1_AUTO_INCREMENT1
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=30 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
MASTER_1_AUTO_INCREMENT2
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
Table Create Table
tbl_a CREATE TABLE `tbl_a` (
`col_a` int(11) NOT NULL AUTO_INCREMENT,
`col_b` varchar(20) DEFAULT 'defg',
`col_c` mediumint(9) NOT NULL DEFAULT 100,
PRIMARY KEY (`col_a`)
) ENGINE=SPIDER AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COMMENT='database "auto_test_remote", table "tbl_a", srv "s_2_1", aim "0"'
select test
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
SELECT * FROM tbl_a;
col_a col_b col_c
1 def 10
2 def 10
3 def 10
4 def 10
connection child2_1;
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
argument
select `col_a`,`col_b`,`col_c` from `auto_test_remote`.`tbl_a`
SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
SELECT col_a, col_b, col_c FROM tbl_a ORDER BY col_a;
col_a col_b col_c
1 def 10
2 def 10
3 def 10
4 def 10
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
for master_1
for child2
child2_1
child2_2
child2_3
for child3
child3_1
child3_2
child3_3
end of test
......@@ -85,10 +85,10 @@ MASTER_1_AUTO_INCREMENT_OFFSET3
INSERT INTO t1 (id) VALUES (null);
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
778
1555
SELECT MAX(id) FROM t1;
MAX(id)
1554
1555
MASTER_1_AUTO_INCREMENT_OFFSET4
INSERT INTO t2 (id) VALUES (null);
SELECT LAST_INSERT_ID();
......@@ -101,36 +101,36 @@ MASTER_1_AUTO_INCREMENT_OFFSET3
INSERT INTO t1 () VALUES (),(),(),();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
1555
2332
SELECT id FROM t1 ORDER BY id;
id
777
778
1554
1555
2331
2332
3109
3886
4663
MASTER_1_AUTO_INCREMENT_OFFSET4
INSERT INTO t2 () VALUES (),(),(),();
SELECT LAST_INSERT_ID();
LAST_INSERT_ID()
3108
5439
SELECT id FROM t2 ORDER BY id;
id
777
778
1554
1555
2331
2332
3108
3109
3885
3886
4662
4663
5439
6216
6993
7770
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
INSERT INTO t1 () VALUES (),(),(),();
......
--source ../include/auto_increment_init_test_init.inc
--echo
--echo drop and create databases
--connection master_1
--disable_warnings
DROP DATABASE IF EXISTS auto_test_local;
CREATE DATABASE auto_test_local;
USE auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
if ($USE_GENERAL_LOG)
{
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
}
DROP DATABASE IF EXISTS auto_test_remote;
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
}
--enable_warnings
--echo
--echo test select 1
--connection master_1
SELECT 1;
if ($USE_CHILD_GROUP2)
{
if (!$OUTPUT_CHILD_GROUP2)
{
--disable_query_log
--disable_result_log
}
--connection child2_1
SELECT 1;
if (!$OUTPUT_CHILD_GROUP2)
{
--enable_query_log
--enable_result_log
}
}
--echo
--echo create table select test
if ($USE_CHILD_GROUP2)
{
if (!$OUTPUT_CHILD_GROUP2)
{
--disable_query_log
--disable_result_log
}
--connection child2_1
if ($OUTPUT_CHILD_GROUP2)
{
--disable_query_log
echo CHILD2_1_DROP_TABLES;
echo CHILD2_1_CREATE_TABLES;
}
--disable_warnings
eval $CHILD2_1_DROP_TABLES;
--enable_warnings
eval $CHILD2_1_CREATE_TABLES;
if ($OUTPUT_CHILD_GROUP2)
{
--enable_query_log
}
if ($USE_GENERAL_LOG)
{
TRUNCATE TABLE mysql.general_log;
}
if (!$OUTPUT_CHILD_GROUP2)
{
--enable_query_log
--enable_result_log
}
}
--connection master_1
--disable_warnings
DROP TABLE IF EXISTS tbl_a;
--enable_warnings
--disable_query_log
echo CREATE TABLE tbl_a (
col_a INT NOT NULL AUTO_INCREMENT,
col_b VARCHAR(20) DEFAULT 'defg',
col_c INT NOT NULL DEFAULT 100,
PRIMARY KEY(col_a)
) MASTER_1_ENGINE MASTER_1_AUTO_INCREMENT_2_1 MASTER_1_COMMENT_2_1;
eval CREATE TABLE tbl_a (
col_a INT NOT NULL AUTO_INCREMENT,
col_b VARCHAR(20) DEFAULT 'defg',
col_c INT NOT NULL DEFAULT 100,
PRIMARY KEY(col_a)
) $MASTER_1_ENGINE $MASTER_1_AUTO_INCREMENT_2_1 $MASTER_1_COMMENT_2_1;
--enable_query_log
SHOW CREATE TABLE tbl_a;
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
ALTER TABLE tbl_a MODIFY col_c MEDIUMINT NOT NULL DEFAULT 100;
SHOW CREATE TABLE tbl_a;
RENAME TABLE tbl_a TO tbl_x;
SHOW CREATE TABLE tbl_x;
RENAME TABLE tbl_x TO tbl_a;
SHOW CREATE TABLE tbl_a;
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
--disable_query_log
echo MASTER_1_AUTO_INCREMENT1;
eval $MASTER_1_AUTO_INCREMENT1;
--enable_query_log
SHOW CREATE TABLE tbl_a;
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
--disable_query_log
echo MASTER_1_AUTO_INCREMENT2;
eval $MASTER_1_AUTO_INCREMENT2;
--enable_query_log
SHOW CREATE TABLE tbl_a;
INSERT INTO tbl_a () VALUES ();
SHOW CREATE TABLE tbl_a;
--echo
--echo select test
if ($USE_CHILD_GROUP2)
{
if (!$OUTPUT_CHILD_GROUP2)
{
--disable_query_log
--disable_result_log
}
--connection child2_1
if ($USE_GENERAL_LOG)
{
TRUNCATE TABLE mysql.general_log;
}
if (!$OUTPUT_CHILD_GROUP2)
{
--enable_query_log
--enable_result_log
}
}
--connection master_1
SELECT * FROM tbl_a;
if ($USE_CHILD_GROUP2)
{
if (!$OUTPUT_CHILD_GROUP2)
{
--disable_query_log
--disable_result_log
}
--connection child2_1
if ($USE_GENERAL_LOG)
{
eval $CHILD2_1_SELECT_ARGUMENT1;
}
eval $CHILD2_1_SELECT_TABLES;
if (!$OUTPUT_CHILD_GROUP2)
{
--enable_query_log
--enable_result_log
}
}
--echo
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
if ($USE_CHILD_GROUP2)
{
--connection child2_1
DROP DATABASE IF EXISTS auto_test_remote;
if ($USE_GENERAL_LOG)
{
SET GLOBAL log_output = @old_log_output;
}
}
--enable_warnings
--source ../include/auto_increment_init_test_deinit.inc
--echo
--echo end of test
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