mysql 4.0.12 dump and databases with minus in names

mysql 4.0.12 dump and databases with minus in names

am 15.04.2003 23:34:59 von Arkadiusz Miskiewicz

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@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@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@m.gmane.org

Re: mysql 4.0.12 dump and databases with minus in names

am 16.04.2003 12:53:24 von Sinisa Milivojevic

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:
>=20

[skip]

> If I quote this (`test1-test`) then everything is fine.
>=20
> Fix is to quote database names, too.
>=20
> ps. If someone creates patch then please send it to me, too. Thanks.
> --=20
> Arkadiusz Mi=B6kiewicz CS at FoE, Wroclaw University of Technology=

> arekm@sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
>=20

Thank you for your report.

This is already fixed in 4.0.13 which should be out in 10 - 15 days.

--=20

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=3Dm=
smi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic >
/ /|_/ / // /\ \/ /_/ / /__ 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@m.gmane.org

Re: mysql 4.0.12 dump and databases with minus in names

am 17.04.2003 22:47:46 von Arkadiusz Miskiewicz

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

--
Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology
arekm@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@m.gmane.org

Re: mysql 4.0.12 dump and databases with minus in names

am 18.04.2003 13:19:33 von Sinisa Milivojevic

Arkadiusz Miskiewicz writes:
> On/Dnia Wed, Apr 16, 2003 at 01:53:24PM +0300, Sinisa Milivojevic wro=
te/napisa=B3(a)
> Great.
>=20
> There is also other separate problem. USE `quoted-database-name`;
> is not working in 4.0.12.=20
> You need to write that without quoting (end then it works even when
> there are minuses inside of name).
>=20
> Hope that's also fixed in 4.0.13.
>=20
> > / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic ..com>
>=20
> --=20
> Arkadiusz Mi=B6kiewicz CS at FoE, Wroclaw University of Technology=

> arekm@sse.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
>=20

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.=20

--=20

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=3Dm=
smi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic >
/ /|_/ / // /\ \/ /_/ / /__ 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@m.gmane.org