mysql 4.0.12 dump and databases with minus in names
Seems that mysqldump doesn't quote database names which is bad because I
can create database with minus inside name like
test1-test:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.12-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database `test1-test2`
-> ;
Query OK, 1 row affected (0.00 sec)
mysql> show databases;
+-------------+
| Database |
+-------------+
| mysql |
| test1-test2 |
+-------------+
2 rows in set (0.00 sec)
mysql>
and now mysqldump:
[root [at] maja root]# mysqldump --opt --quote-names --all-databases -u arekm -p > result.txt
Enter password:
in result.txt
--
-- Current Database: test1-test2
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ test1-test2;
USE test1-test2;
let's try this:
mysql> CREATE DATABASE /*!32312 IF NOT EXISTS*/ test1-test2;
ERROR 1064: Something is wrong in your syntax obok '-test2' w linii 1
If I quote this (`test1-test`) then everything is fine.
Fix is to quote database names, too.
ps. If someone creates patch then please send it to me, too. Thanks.
--
Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology
arekm [at] sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs [at] m.gmane.org
Re: mysql 4.0.12 dump and databases with minus in names
Arkadiusz Miskiewicz writes:
> Seems that mysqldump doesn't quote database names which is bad becaus=
e I
> can create database with minus inside name like
> test1-test:
>
[skip]
> If I quote this (`test1-test`) then everything is fine.
>
> Fix is to quote database names, too.
>
> ps. If someone creates patch then please send it to me, too. Thanks.
> --
> Arkadiusz Mi=B6kiewicz CS at FoE, Wroclaw University of Technology=
> arekm [at] sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
>
Thank you for your report.
This is already fixed in 4.0.13 which should be out in 10 - 15 days.
--
Regards,
--
For technical support contracts, go to https://order.mysql.com/?ref=3Dm=
smi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa [at] mysql.com=
>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs [at] m.gmane.org
Re: mysql 4.0.12 dump and databases with minus in names
On/Dnia Wed, Apr 16, 2003 at 01:53:24PM +0300, Sinisa Milivojevic wrote/napisał(a)
> > If I quote this (`test1-test`) then everything is fine.
> > Fix is to quote database names, too.
>
> This is already fixed in 4.0.13 which should be out in 10 - 15 days.
Great.
There is also other separate problem. USE `quoted-database-name`;
is not working in 4.0.12.
You need to write that without quoting (end then it works even when
there are minuses inside of name).
Hope that's also fixed in 4.0.13.
> / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa [at] mysql.com>
--
Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology
arekm [at] sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs [at] m.gmane.org
Re: mysql 4.0.12 dump and databases with minus in names
Arkadiusz Miskiewicz writes:
> On/Dnia Wed, Apr 16, 2003 at 01:53:24PM +0300, Sinisa Milivojevic wro=
te/napisa=B3(a)
> Great.
>
> There is also other separate problem. USE `quoted-database-name`;
> is not working in 4.0.12.
> You need to write that without quoting (end then it works even when
> there are minuses inside of name).
>
> Hope that's also fixed in 4.0.13.
>
> > / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa [at] mysql=
..com>
>
> --
> Arkadiusz Mi=B6kiewicz CS at FoE, Wroclaw University of Technology=
> arekm [at] sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
>
Changing database does not support backticks, but I have added it
right now.
Whether it will make into 4.0.13 or will be moved to 4.1 is yet to be
seen.
--
Regards,
--
For technical support contracts, go to https://order.mysql.com/?ref=3Dm=
smi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sinisa [at] mysql.com=
>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs [at] m.gmane.org