Bug #88772 mysqldbcopy copying constraint fails with hyphenated database name
| Submitted: | 6 Dec 2017 4:59 | Modified: | 6 Dec 2017 6:33 |
|---|---|---|---|
| Reporter: | William Mowrey | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Utilities | Severity: | S3 (Non-critical) |
| Version: | 1.6.5 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[6 Dec 2017 4:59]
William Mowrey
[6 Dec 2017 6:33]
MySQL Verification Team
Hello William Mowrey, Thank you for the report. Thanks, Umesh
[6 Dec 2017 6:34]
MySQL Verification Team
--
CREATE DATABASE gseq;
use gseq;
CREATE TABLE parent (
id INT NOT NULL,
PRIMARY KEY (id)
) ENGINE=INNODB;
CREATE TABLE child (
id INT,
parent_id INT,
INDEX par_ind (parent_id),
FOREIGN KEY (parent_id)
REFERENCES parent(id)
ON DELETE CASCADE
) ENGINE=INNODB;
mysqldbcopy --source=ushastry@hod03.no.oracle.com:3308 --destination=ushastry@hod03.no.oracle.com:3308 '`gseq`':'`gseq-db-10`'
Launching console ...
Welcome to the MySQL Utilities Client (mysqluc) version 1.6.5
Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.
This is a release of dual licensed MySQL Utilities. For the avoidance of
doubt, this particular copy of the software is released
under the version 2 of the GNU General Public License.
MySQL Utilities is brought to you by Oracle.
Type 'help' for a list of commands or press TAB twice for list of utilities.
mysqluc> mysqldbcopy --source=ushastry@hod03.no.oracle.com:3308 --destination=ushastry@hod03.no.oracle.com:3308 '`gseq`':'`gseq-db-10`'
WARNING: Using a password on the command line interface can be insecure.
# Source on hod03.no.oracle.com: ... connected.
# Destination on hod03.no.oracle.com: ... connected.
# Copying database gseq renamed as gseq-db-10
# Copying TABLE gseq.child
# Copying TABLE gseq.parent
ERROR: Unable to execute constraint query
ALTER TABLE gseq-db-10.child add CONSTRAINT `child_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES `gseq-db-10`.`parent`
(`id`)
ON UPDATE RESTRICT
ON DELETE CASCADE
. Error: Query failed. 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the righ
t syntax to use near '-db-10.child add CONSTRAINT `child_ibfk_1`
FOREIGN KEY (`parent_id`)
REFERENCES ' at line 1
Execution of utility: 'mysqldbcopy --source=ushastry@hod03.no.oracle.com:3308 --destination=ushastry@hod03.no.oracle.com:3308 `gseq`:`gseq-db-10`' end
ed with return code '1' but no error message was streamed to the standard error, please review the output from its execution.
mysqluc>
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.