Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
727c1f62
Commit
727c1f62
authored
Oct 29, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4877 mysqldump dumps all data from a connect table
parent
89e71ffb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
client/mysqldump.c
client/mysqldump.c
+1
-0
storage/connect/mysql-test/connect/r/mysql.result
storage/connect/mysql-test/connect/r/mysql.result
+21
-0
storage/connect/mysql-test/connect/t/mysql.test
storage/connect/mysql-test/connect/t/mysql.test
+14
-0
No files found.
client/mysqldump.c
View file @
727c1f62
...
...
@@ -5144,6 +5144,7 @@ char check_if_ignore_table(const char *table_name, char *table_type)
if
(
!
opt_no_data
&&
(
!
my_strcasecmp
(
&
my_charset_latin1
,
table_type
,
"MRG_MyISAM"
)
||
!
strcmp
(
table_type
,
"MRG_ISAM"
)
||
!
strcmp
(
table_type
,
"CONNECT"
)
||
!
strcmp
(
table_type
,
"FEDERATED"
)))
result
=
IGNORE_DATA
;
}
...
...
storage/connect/mysql-test/connect/r/mysql.result
View file @
727c1f62
...
...
@@ -217,3 +217,24 @@ t2 CREATE TABLE `t2` (
SELECT * FROM t2;
a
DROP TABLE t2, t1;
#
# MDEV-4877 mysqldump dumps all data from a connect table
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (10),(20),(30);
CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://root@localhost:PORT/test/t1';
SELECT * FROM t2;
a
10
20
30
# Start of mysqldump ------
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='mysql://root@localhost:PORT/test/t1' `TABLE_TYPE`='MYSQL';
/*!40101 SET character_set_client = @saved_cs_client */;
# End of mysqldump ------
DROP TABLE t2;
DROP TABLE t1;
storage/connect/mysql-test/connect/t/mysql.test
View file @
727c1f62
...
...
@@ -420,3 +420,17 @@ DROP TABLE t2, t1;
# TODO: add test for YEAR
# TODO: add tests for fractional seconds
--
echo
#
--
echo
# MDEV-4877 mysqldump dumps all data from a connect table
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
10
),(
20
),(
30
);
--
replace_result
$PORT
PORT
--
eval
CREATE
TABLE
t2
ENGINE
=
CONNECT
TABLE_TYPE
=
MYSQL
CONNECTION
=
'mysql://root@localhost:$PORT/test/t1'
SELECT
*
FROM
t2
;
--
echo
# Start of mysqldump ------
--
replace_result
$PORT
PORT
--
exec
$MYSQL_DUMP
--
compact
test
t2
--
echo
# End of mysqldump ------
DROP
TABLE
t2
;
DROP
TABLE
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment