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

Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  c-520ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug13520


sql/sql_partition.cc:
  Auto merged
mysql-test/r/partition.result:
  SCCS merged
mysql-test/t/partition.test:
  SCCS merged
This commit is contained in:
unknown
2006-04-01 00:59:25 -05:00
3 changed files with 43 additions and 2 deletions

View File

@ -1508,6 +1508,11 @@ static int add_write(File fptr, const char *buf, uint len)
return 1;
}
static int add_string_object(File fptr, String *string)
{
return add_write(fptr, string->ptr(), string->length());
}
static int add_string(File fptr, const char *string)
{
return add_write(fptr, string, strlen(string));
@ -1594,7 +1599,14 @@ static int add_key_partition(File fptr, List<char> field_list)
while (i < no_fields)
{
const char *field_str= part_it++;
err+= add_string(fptr, field_str);
String field_string("", 0, system_charset_info);
THD *thd= current_thd;
ulonglong save_options= thd->options;
thd->options= 0;
append_identifier(thd, &field_string, field_str,
strlen(field_str));
thd->options= save_options;
err+= add_string_object(fptr, &field_string);
if (i != (no_fields-1))
err+= add_comma(fptr);
i++;
@ -1664,7 +1676,7 @@ static int add_partition_options(File fptr, partition_element *p_elem)
err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE,
p_elem->index_file_name);
if (p_elem->part_comment)
err+= add_keyword_string(fptr, "COMMENT", FALSE, p_elem->part_comment);
err+= add_keyword_string(fptr, "COMMENT", TRUE, p_elem->part_comment);
return err + add_engine(fptr,p_elem->engine_type);
}