未验证 提交 4b49a19d 编写于 作者: L lylth 提交者: GitHub

fix(sql): fix crash when executing sql statement (#212) (#267)

Co-authored-by: Nmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
上级 30fb299c
......@@ -5222,18 +5222,19 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables,
table->field[18]->store((longlong) file->checksum(), TRUE);
table->field[18]->set_notnull();
}
//STONEDB UPGRADE BEGIN
uint length = (uint) strlen(share->comment.str);
char* comment=(length > 64000 - 3)?(char*)(share->comment.str):share->comment.str;
//char *comment = show_table->file->update_table_comment(share->comment.str);
//STONEDB UPGRADE BEGIN
char* comment=share->comment.str;
if (comment)
{
table->field[20]->store(comment,
(comment == share->comment.str ? share->comment.length : strlen(comment)), cs);
table->field[20]->store(comment, (comment == share->comment.str ? share->comment.length : strlen(comment)), cs);
if (comment != share->comment.str)
my_free(comment);
{
my_free(comment);
}
}
//END
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册