Christophe DIARRA <[EMAIL PROTECTED]> wrote:
>
> First, sorry, if my problem is know or documented. I have made a rapid
> search on the MySQL site, but without success.
>
> Here is my problem : the following 'create table' command refuses to
> execute on 4.1.1, if -1 is not put between a quottation mark:
>
> create table testTable (name varchar(10), age smallint default -1);
>
> If the value -1 is changed into '-1', the command works. Is this the
> correct behaviour in 4.1.1 ?
>
> An application here (written by a colleague) was using numbers
> without quotation marks as default values in the create command. The
> application worked untill today. Before he updates the code, I would like
> to have more precisions.
>
> Following is the output of the create commande with a 4.1.1 and a 4.0.3
> MySQL server.
>
> mysql> select version();
> +----------------------+
> | version() |
> +----------------------+
> | 4.1.1-alpha-standard |
> +----------------------+
> 1 row in set (0.00 sec)
>
> mysql> create table testTable (name varchar(10), age smallint default -1);
> ERROR 1064 (42000): You have an error in your SQL syntax. Check the
> manual that corresponds to your MySQL server version for the right syntax
> to use near '-1)' at line 1
>
> mysql> select version();
> +----------------+
> | version() |
> +----------------+
> | 4.0.3-beta-max |
> +----------------+
> mysql> create table testTable (name varchar(10), age smallint default -1);
> Query OK, 0 rows affected (0.01 sec)
>
> Does somebody have the same problem ? Any idea ?
>
Thank you for bug report! It was entered to the bug database:
http://bugs.mysql.com/bug.php?id=2075
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]