1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-25152 Insert linebreaks in mysqldump --extended-insert

Currently, mysqldump --extended-insert outputs all rows on a single line,
which makes it difficult to use with various Unix command-line utilities
such as grep and diff.

We change mysqldump to emit a linebreak between each row, that would make
it easier to work with, without significantly affecting dump or restore
performance, or affecting compatibility.

Closes: #1865
This commit is contained in:
rmfalves
2021-06-06 15:09:36 +01:00
committed by Daniel Black
parent b36d6f92a8
commit 586d6a2520
7 changed files with 229 additions and 69 deletions

View File

@ -558,7 +558,8 @@ CREATE TABLE `a1\``b1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `a1\``b1` VALUES (1),(2);
INSERT INTO `a1\``b1` VALUES (1),
(2);
insert `a1\``b1` values (4),(5);
show create table `a1\``b1`;
Table Create Table
@ -587,7 +588,8 @@ CREATE TABLE "a1\""b1" (
"a" int(11) DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO "a1\""b1" VALUES (1),(2);
INSERT INTO "a1\""b1" VALUES (1),
(2);
insert "a1\""b1" values (4),(5);
show create table "a1\""b1";
Table Create Table
@ -603,11 +605,11 @@ set sql_mode=default;
create table t1 (a text);
select count(*) from t1;
count(*)
41
42
truncate table t1;
select count(*) from t1;
count(*)
41
42
truncate table t1;
select count(*) from t1;
count(*)
@ -619,7 +621,7 @@ count(*)
truncate table t1;
select count(*) from t1;
count(*)
41
42
truncate table t1;
select count(*) from t1;
count(*)