BUG: SHOW CREATE DATABASE doesn"t respect SQL_QUOTE_SHOW_CREATE

BUG: SHOW CREATE DATABASE doesn"t respect SQL_QUOTE_SHOW_CREATE

am 07.10.2002 03:55:33 von Paul DuBois

SHOW CREATE TABLE respects the value of the SQL_QUOTE_SHOW_CREATE variable.

SHOW CREATE DATABASE doesn't.

How-to-repeat:

Show a table and a database:

mysql> SHOW CREATE TABLE t;
+-------+--------------------------------------------------- -----------------------------------------------------+
| Table | Create Table
|
+-------+--------------------------------------------------- -----------------------------------------------------+
| t | CREATE TABLE `t` (
`i` int(11) default NULL,
`j` int(11) default NULL
) TYPE=MyISAM CHARSET=latin1 |
+-------+--------------------------------------------------- -----------------------------------------------------+
1 row in set (0.00 sec)

mysql> SHOW CREATE DATABASE test;
+----------+------------------------+
| Database | Create Database |
+----------+------------------------+
| test | CREATE DATABASE `test` |
+----------+------------------------+
1 row in set (0.01 sec)

Both show the quotes, because SQL_QUOTE_SHOW_CREATE is 1 by default.

Now turn the variable off:

mysql> SET SQL_QUOTE_SHOW_CREATE = 0;
Query OK, 0 rows affected (0.00 sec)


Then re-run the SHOW statements:

mysql> SHOW CREATE TABLE t;
+-------+--------------------------------------------------- -----------------------------------------------+
| Table | Create Table
|
+-------+--------------------------------------------------- -----------------------------------------------+
| t | CREATE TABLE t (
i int(11) default NULL,
j int(11) default NULL
) TYPE=MyISAM CHARSET=latin1 |
+-------+--------------------------------------------------- -----------------------------------------------+
1 row in set (0.00 sec)

mysql> SHOW CREATE DATABASE test;
+----------+------------------------+
| Database | Create Database |
+----------+------------------------+
| test | CREATE DATABASE `test` |
+----------+------------------------+
1 row in set (0.00 sec)


SHOW CREATE TABLE doesn't show the quotes (correct), but SHOW
CREATE DATABASE still shows them (incorrect).

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12648@lists.mysql.com
To unsubscribe, e-mail

Re: BUG: SHOW CREATE DATABASE doesn"t respect SQL_QUOTE_SHOW_CREATE

am 07.10.2002 12:03:40 von Alexander Barkov

Hi!

This is my fault. I'll this this asap.


Paul DuBois wrote:
> SHOW CREATE TABLE respects the value of the SQL_QUOTE_SHOW_CREATE variable.
>
> SHOW CREATE DATABASE doesn't.
>
> How-to-repeat:
>
> Show a table and a database:
>
> mysql> SHOW CREATE TABLE t;
> +-------+--------------------------------------------------- -----------------------------------------------------+
>
> | Table | Create Table |
> +-------+--------------------------------------------------- -----------------------------------------------------+
>
> | t | CREATE TABLE `t` (
> `i` int(11) default NULL,
> `j` int(11) default NULL
> ) TYPE=MyISAM CHARSET=latin1 |
> +-------+--------------------------------------------------- -----------------------------------------------------+
>
> 1 row in set (0.00 sec)
>
> mysql> SHOW CREATE DATABASE test;
> +----------+------------------------+
> | Database | Create Database |
> +----------+------------------------+
> | test | CREATE DATABASE `test` |
> +----------+------------------------+
> 1 row in set (0.01 sec)
>
> Both show the quotes, because SQL_QUOTE_SHOW_CREATE is 1 by default.
>
> Now turn the variable off:
>
> mysql> SET SQL_QUOTE_SHOW_CREATE = 0;
> Query OK, 0 rows affected (0.00 sec)
>
>
> Then re-run the SHOW statements:
>
> mysql> SHOW CREATE TABLE t;
> +-------+--------------------------------------------------- -----------------------------------------------+
>
> | Table | Create Table |
> +-------+--------------------------------------------------- -----------------------------------------------+
>
> | t | CREATE TABLE t (
> i int(11) default NULL,
> j int(11) default NULL
> ) TYPE=MyISAM CHARSET=latin1 |
> +-------+--------------------------------------------------- -----------------------------------------------+
>
> 1 row in set (0.00 sec)
>
> mysql> SHOW CREATE DATABASE test;
> +----------+------------------------+
> | Database | Create Database |
> +----------+------------------------+
> | test | CREATE DATABASE `test` |
> +----------+------------------------+
> 1 row in set (0.00 sec)
>
>
> SHOW CREATE TABLE doesn't show the quotes (correct), but SHOW
> CREATE DATABASE still shows them (incorrect).
>
>


--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Barkov
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Izhevsk, Russia
<___/ www.mysql.com +7-902-856-80-21


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12649@lists.mysql.com
To unsubscribe, e-mail

Re: BUG: SHOW CREATE DATABASE doesn"t respect SQL_QUOTE_SHOW_CREATE

am 07.10.2002 12:22:51 von Alexander Barkov

Alexander Barkov wrote:
> Hi!
>
> This is my fault. I'll this this asap.
>

I mean, I'll FIX this asap :)

> Paul DuBois wrote:
>
>> SHOW CREATE TABLE respects the value of the SQL_QUOTE_SHOW_CREATE
>> variable.
>>
>> SHOW CREATE DATABASE doesn't.
>>
>> How-to-repeat:
>>
>> Show a table and a database:
>>
>> mysql> SHOW CREATE TABLE t;
>> +-------+--------------------------------------------------- -----------------------------------------------------+
>>
>> | Table | Create Table |
>> +-------+--------------------------------------------------- -----------------------------------------------------+
>>
>> | t | CREATE TABLE `t` (
>> `i` int(11) default NULL,
>> `j` int(11) default NULL
>> ) TYPE=MyISAM CHARSET=latin1 |
>> +-------+--------------------------------------------------- -----------------------------------------------------+
>>
>> 1 row in set (0.00 sec)
>>
>> mysql> SHOW CREATE DATABASE test;
>> +----------+------------------------+
>> | Database | Create Database |
>> +----------+------------------------+
>> | test | CREATE DATABASE `test` |
>> +----------+------------------------+
>> 1 row in set (0.01 sec)
>>
>> Both show the quotes, because SQL_QUOTE_SHOW_CREATE is 1 by default.
>>
>> Now turn the variable off:
>>
>> mysql> SET SQL_QUOTE_SHOW_CREATE = 0;
>> Query OK, 0 rows affected (0.00 sec)
>>
>>
>> Then re-run the SHOW statements:
>>
>> mysql> SHOW CREATE TABLE t;
>> +-------+--------------------------------------------------- -----------------------------------------------+
>>
>> | Table | Create Table |
>> +-------+--------------------------------------------------- -----------------------------------------------+
>>
>> | t | CREATE TABLE t (
>> i int(11) default NULL,
>> j int(11) default NULL
>> ) TYPE=MyISAM CHARSET=latin1 |
>> +-------+--------------------------------------------------- -----------------------------------------------+
>>
>> 1 row in set (0.00 sec)
>>
>> mysql> SHOW CREATE DATABASE test;
>> +----------+------------------------+
>> | Database | Create Database |
>> +----------+------------------------+
>> | test | CREATE DATABASE `test` |
>> +----------+------------------------+
>> 1 row in set (0.00 sec)
>>
>>
>> SHOW CREATE TABLE doesn't show the quotes (correct), but SHOW
>> CREATE DATABASE still shows them (incorrect).
>>
>>
>
>


--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Barkov
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Izhevsk, Russia
<___/ www.mysql.com +7-902-856-80-21


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12650@lists.mysql.com
To unsubscribe, e-mail

BUG: SHOW CREATE DATABASE doesn"t respect SQL_QUOTE_SHOW_CREATE

am 07.10.2002 20:06:34 von Michael Widenius

Hi!

>>>>> "Paul" == Paul DuBois writes:

Paul> SHOW CREATE TABLE respects the value of the SQL_QUOTE_SHOW_CREATE variable.
Paul> SHOW CREATE DATABASE doesn't.

This is because we wanted to have an option to get CREATE TABLE
compatible with other databases.

CREATE DATABASE doesn't have to be compatible (as this isn't a SQL
standard command) and thus its better to always quite the result to
avoid bugs for strange database names.

I agree that that this neads to be document...

Regards,
Monty

--
For technical support contracts, goto https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Michael Widenius
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO
/_/ /_/\_, /___/\___\_\___/ Helsinki, Finland
<___/ www.mysql.com


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread12659@lists.mysql.com
To unsubscribe, e-mail