1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +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


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
This commit is contained in:
unknown
2006-06-29 18:39:34 +05:00
parent a7f9f7ae74
commit 8703b22e16
9 changed files with 150 additions and 15 deletions

View File

@@ -3598,8 +3598,11 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
goto err;
}
create_info->db_type=new_db_type;
if (!create_info->comment)
create_info->comment= table->s->comment;
if (!create_info->comment.str)
{
create_info->comment.str= table->s->comment.str;
create_info->comment.length= table->s->comment.length;
}
table->file->update_create_info(create_info);
if ((create_info->table_options &