mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
BUG#4788 - show create table provides incorrect statement.
Added code to adjust the field_length of user variables in dependence on the field type. Aded new constants for numeric field widths.
This commit is contained in:
@@ -335,3 +335,22 @@ show global variables like 'log_warnings';
|
||||
set global log_warnings = @tstlw;
|
||||
show global variables like 'log_warnings';
|
||||
|
||||
#
|
||||
# BUG#4788 show create table provides incorrect statement
|
||||
#
|
||||
# What default width have numeric types?
|
||||
create table t1 (
|
||||
c1 tinyint,
|
||||
c2 smallint,
|
||||
c3 mediumint,
|
||||
c4 int,
|
||||
c5 bigint);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
#
|
||||
# What types and widths have variables?
|
||||
set @arg00= 8, @arg01= 8.8, @arg02= 'a string';
|
||||
create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user