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:
@@ -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 &
|
||||
|
||||
Reference in New Issue
Block a user