diff options
author | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-29 18:39:34 +0500 |
---|---|---|
committer | unknown <gluh@eagle.intranet.mysql.r18.ru> | 2006-06-29 18:39:34 +0500 |
commit | 8703b22e167c706d5a8c77a1e24948b4db3fafb3 (patch) | |
tree | e1df56628e6e5f088a1482f6457da748a9c1c141 /sql/table.cc | |
parent | a7f9f7ae743efca9b1f405773416d19f9ebaf3c2 (diff) | |
download | mariadb-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 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 9ec9463c33c..1cace0d864d 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -410,7 +410,9 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat, int_length= uint2korr(head+274); share->null_fields= uint2korr(head+282); com_length= uint2korr(head+284); - share->comment= strdup_root(&outparam->mem_root, (char*) head+47); + share->comment.length= (int) (head[46]); + share->comment.str= strmake_root(&outparam->mem_root, (char*) head+47, + share->comment.length); DBUG_PRINT("info",("i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d", interval_count,interval_parts, share->keys,n_length,int_length, com_length)); |