@@ -1913,6 +1913,19 @@ static int add_subpartition_by(File fptr)
1913
1913
return err + add_partition_by (fptr);
1914
1914
}
1915
1915
1916
+ static int add_name_string (File fptr, const char *name)
1917
+ {
1918
+ int err;
1919
+ String name_string (" " , 0 , system_charset_info);
1920
+ THD *thd= current_thd;
1921
+ ulonglong save_options= thd->variables .option_bits ;
1922
+ thd->variables .option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
1923
+ append_identifier (thd, &name_string, name, strlen (name));
1924
+ thd->variables .option_bits = save_options;
1925
+ err= add_string_object (fptr, &name_string);
1926
+ return err;
1927
+ }
1928
+
1916
1929
static int add_part_field_list (File fptr, List<char > field_list)
1917
1930
{
1918
1931
uint i, num_fields;
@@ -1924,15 +1937,7 @@ static int add_part_field_list(File fptr, List<char> field_list)
1924
1937
err+= add_begin_parenthesis (fptr);
1925
1938
while (i < num_fields)
1926
1939
{
1927
- const char *field_str= part_it++;
1928
- String field_string (" " , 0 , system_charset_info);
1929
- THD *thd= current_thd;
1930
- ulonglong save_options= thd->variables .option_bits ;
1931
- thd->variables .option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
1932
- append_identifier (thd, &field_string, field_str,
1933
- strlen (field_str));
1934
- thd->variables .option_bits = save_options;
1935
- err+= add_string_object (fptr, &field_string);
1940
+ err+= add_name_string (fptr, part_it++);
1936
1941
if (i != (num_fields-1 ))
1937
1942
err+= add_comma (fptr);
1938
1943
i++;
@@ -1941,20 +1946,6 @@ static int add_part_field_list(File fptr, List<char> field_list)
1941
1946
return err;
1942
1947
}
1943
1948
1944
- static int add_name_string (File fptr, const char *name)
1945
- {
1946
- int err;
1947
- String name_string (" " , 0 , system_charset_info);
1948
- THD *thd= current_thd;
1949
- ulonglong save_options= thd->variables .option_bits ;
1950
- thd->variables .option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
1951
- append_identifier (thd, &name_string, name,
1952
- strlen (name));
1953
- thd->variables .option_bits = save_options;
1954
- err= add_string_object (fptr, &name_string);
1955
- return err;
1956
- }
1957
-
1958
1949
static int add_int (File fptr, longlong number)
1959
1950
{
1960
1951
char buff[32 ];
0 commit comments