Bug #7509 | Wrong column type for a table column created from SP variable | ||
---|---|---|---|
Submitted: | 23 Dec 2004 15:45 | Modified: | 21 Nov 2005 8:53 |
Reporter: | Anindhya Sharma | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S1 (Critical) |
Version: | 5.0.13 | OS: | Any (any) |
Assigned to: | Alexander Nozdrin | CPU Architecture: | Any |
[23 Dec 2004 15:45]
Anindhya Sharma
[23 Dec 2004 16:53]
MySQL Verification Team
I was able reproduce it only if default-character-set is multi-byte, like utf8, sjis.
[23 Dec 2004 17:21]
Anindhya Sharma
I am using utf8 as the default-character-set.
[27 May 2005 14:59]
Per-Erik Martin
The original problem is no longer repeatable. Instead an instance of the general problem of DDL in SPs. (Lowering priority to the same as the other bugs of this type, since it's not a crashing bug.)
[27 May 2005 15:03]
Anindhya Sharma
Hi Per-Erick, Did you have the character set as multi-byte in your tests when you were trying to reproduce the original problem? Please note that the problem is only seen in that case. Regards, Anindhya
[13 Sep 2005 16:08]
MySQL Verification Team
I wasn't able repeat initial problem using 5.0.13, but I found another problem. If table is created via SP column 'name' is created as mediumtext, but in the SP body it's defined as varchar(128). mysql> call gentable(); Query OK, 0 rows affected (0.02 sec) mysql> show create table proctbl; +---------+-------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------+-------------------------------------------------------------------------------------------------------------------------------------+ | proctbl | CREATE TABLE `proctbl` ( `num` int(11) NOT NULL, `name` mediumtext, PRIMARY KEY (`num`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 | +---------+-------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)
[21 Nov 2005 8:53]
Alexander Nozdrin
mysql> delimiter | mysql> CREATE PROCEDURE p1() -> BEGIN -> CREATE TABLE t1(col1 INT PRIMARY KEY, col2 VARCHAR(128)); -> END| Query OK, 0 rows affected (0.00 sec) mysql> delimiter ; mysql> call p1(); Query OK, 0 rows affected (0.00 sec) mysql> show create table t1; +-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | t1 | CREATE TABLE `t1` ( `col1` int(11) NOT NULL, `col2` varchar(128) default NULL, PRIMARY KEY (`col1`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> select version(); +-------------------------------+ | version() | +-------------------------------+ | 5.0.17-valgrind-max-debug-log | +-------------------------------+ 1 row in set (0.00 sec)