summaryrefslogtreecommitdiff
path: root/mysql-test/r/strict.result
diff options
context:
space:
mode:
authorunknown <gluh@eagle.intranet.mysql.r18.ru>2006-06-29 18:39:34 +0500
committerunknown <gluh@eagle.intranet.mysql.r18.ru>2006-06-29 18:39:34 +0500
commit8703b22e167c706d5a8c77a1e24948b4db3fafb3 (patch)
treee1df56628e6e5f088a1482f6457da748a9c1c141 /mysql-test/r/strict.result
parenta7f9f7ae743efca9b1f405773416d19f9ebaf3c2 (diff)
downloadmariadb-git-8703b22e167c706d5a8c77a1e24948b4db3fafb3.tar.gz
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 mysql-test/r/strict.result: test case mysql-test/t/strict.test: test case sql/handler.h: Table 'comment' is changed from char* to LEX_STRING sql/sql_show.cc: Table 'comment' is changed from char* to LEX_STRING sql/sql_table.cc: Table 'comment' is changed from char* to LEX_STRING sql/sql_yacc.yy: Table 'comment' is changed from char* to LEX_STRING sql/table.cc: Table 'comment' is changed from char* to LEX_STRING sql/table.h: Table 'comment' is changed from char* to LEX_STRING sql/unireg.cc: 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
Diffstat (limited to 'mysql-test/r/strict.result')
-rw-r--r--mysql-test/r/strict.result46
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 271cd7bf486..d0cf11d0511 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1298,3 +1298,49 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2,t1;
set @@sql_mode= @org_mode;
+set @@sql_mode='traditional';
+create table t1 (i int)
+comment '123456789*123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*123456789*';
+ERROR HY000: Too long comment for table 't1'
+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*');
+ERROR HY000: Too long comment for field 'i'
+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*');
+Warnings:
+Warning 1105 Unknown error
+select column_name, column_comment from information_schema.columns where
+table_schema = 'test' and table_name = 't1';
+column_name column_comment
+i 123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*
+ 123456789*123456789*123456789*123456789*
+drop table t1;
+set names utf8;
+create table t1 (i int)
+comment '123456789*123456789*123456789*123456789*123456789*123456789*';
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*'
+drop table t1;