mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix for bug#13934 Silent truncation of table comments
Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols Table 'comment' is changed from char* to LEX_STRING
This commit is contained in:
@@ -1155,3 +1155,42 @@ create table t2 select date from t1;
|
||||
show create table t2;
|
||||
drop table t2,t1;
|
||||
set @@sql_mode= @org_mode;
|
||||
|
||||
#
|
||||
# Bug #13934 Silent truncation of table comments
|
||||
#
|
||||
set @@sql_mode='traditional';
|
||||
--error 1105
|
||||
create table t1 (i int)
|
||||
comment '123456789*123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*123456789*';
|
||||
--error 1105
|
||||
create table t1 (
|
||||
i int comment
|
||||
'123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*');
|
||||
set @@sql_mode= @org_mode;
|
||||
create table t1
|
||||
(i int comment
|
||||
'123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*
|
||||
123456789*123456789*123456789*123456789*');
|
||||
|
||||
select column_name, column_comment from information_schema.columns where
|
||||
table_schema = 'test' and table_name = 't1';
|
||||
drop table t1;
|
||||
|
||||
set names utf8;
|
||||
create table t1 (i int)
|
||||
comment '123456789*123456789*123456789*123456789*123456789*123456789*';
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user