1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13089 identifier quoting in partitioning

don't print partitioning expression as it was entered by the user,
use Item::print() according to the sql_mode and sql_quote_show_create
This commit is contained in:
Sergei Golubchik
2017-06-27 20:46:45 +02:00
parent 504eff0ca1
commit 785e2248bd
140 changed files with 12910 additions and 12831 deletions

View File

@ -6921,8 +6921,9 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
/* Partition expression */
if (part_info->part_expr)
{
table->field[9]->store(part_info->part_func_string,
part_info->part_func_len, cs);
StringBuffer<STRING_BUFFER_USUAL_SIZE> str(cs);
part_info->part_expr->print_for_table_def(&str);
table->field[9]->store(str.ptr(), str.length(), str.charset());
}
else if (part_info->list_of_part_fields)
{
@ -6947,8 +6948,9 @@ static int get_schema_partitions_record(THD *thd, TABLE_LIST *tables,
/* Subpartition expression */
if (part_info->subpart_expr)
{
table->field[10]->store(part_info->subpart_func_string,
part_info->subpart_func_len, cs);
StringBuffer<STRING_BUFFER_USUAL_SIZE> str(cs);
part_info->subpart_expr->print_for_table_def(&str);
table->field[10]->store(str.ptr(), str.length(), str.charset());
}
else if (part_info->list_of_subpart_fields)
{