MDEV-29736 mysqldump sets system_versioning_insert_history=1 twice and doesn't restore previous value
This commit is contained in:
parent
73b2a326d2
commit
a6f9694650
@ -4329,7 +4329,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
||||
|
||||
if (versioned && !opt_xml && opt_dump_history)
|
||||
{
|
||||
fprintf(md_result_file,"/*!101100 SET system_versioning_insert_history=1 */;\n");
|
||||
fprintf(md_result_file,"/*!101100 SET @old_system_versioning_insert_history=@@session.system_versioning_insert_history, @@session.system_versioning_insert_history=1 */;\n");
|
||||
check_io(md_result_file);
|
||||
}
|
||||
if (opt_lock)
|
||||
@ -4631,7 +4631,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
||||
}
|
||||
if (versioned && !opt_xml && opt_dump_history)
|
||||
{
|
||||
fprintf(md_result_file,"/*!101100 SET system_versioning_insert_history=1 */;\n");
|
||||
fprintf(md_result_file,"/*!101100 SET system_versioning_insert_history=@old_system_versioning_insert_history */;\n");
|
||||
check_io(md_result_file);
|
||||
}
|
||||
mysql_free_result(res);
|
||||
|
@ -93,10 +93,10 @@ CREATE TABLE `t1` (
|
||||
`x` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!101100 SET system_versioning_insert_history=1 */;
|
||||
/*!101100 SET @old_system_versioning_insert_history=@@session.system_versioning_insert_history, @@session.system_versioning_insert_history=1 */;
|
||||
INSERT INTO `t1` (`x`, row_start, row_end) VALUES (1,'2010-10-10 10:10:10.101010','2011-11-11 11:11:11.111111'),
|
||||
(2,'2010-10-10 10:10:10.101010','2038-01-19 03:14:07.999999');
|
||||
/*!101100 SET system_versioning_insert_history=1 */;
|
||||
/*!101100 SET system_versioning_insert_history=@old_system_versioning_insert_history */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `t2` (
|
||||
@ -106,10 +106,10 @@ CREATE TABLE `t2` (
|
||||
PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!101100 SET system_versioning_insert_history=1 */;
|
||||
/*!101100 SET @old_system_versioning_insert_history=@@session.system_versioning_insert_history, @@session.system_versioning_insert_history=1 */;
|
||||
INSERT INTO `t2` (`x`, `row_start`, `row_end`) VALUES (1,'2010-10-10 10:10:10.101010','2011-11-11 11:11:11.111111'),
|
||||
(2,'2010-10-10 10:10:10.101010','2038-01-19 03:14:07.999999');
|
||||
/*!101100 SET system_versioning_insert_history=1 */;
|
||||
/*!101100 SET system_versioning_insert_history=@old_system_versioning_insert_history */;
|
||||
mysqldump: --dump-history can't be used with --as-of.
|
||||
mysqldump: --dump-history can't be used with --replace.
|
||||
mysqldump: --xml can't be used with --dump-history.
|
||||
|
Loading…
x
Reference in New Issue
Block a user