diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-06-28 12:50:18 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-07-05 17:15:58 +0200 |
commit | 504eff0ca13ef93fa46f919e1fb60b58ac9a34eb (patch) | |
tree | a5ab20f0d611b8635ba557d343292cb6caa7db8d /storage/spider | |
parent | 03c52e964f6ed16b02d01f37428cdd987bba0e92 (diff) | |
download | mariadb-git-504eff0ca13ef93fa46f919e1fb60b58ac9a34eb.tar.gz |
cleanup: generate_partition_syntax()
Don't write to a temporary file, use String.
Remove strange one-liner "helpers", use String methods.
Don't use current_thd, don't allocate memory for 1-byte strings, etc.
Diffstat (limited to 'storage/spider')
-rw-r--r-- | storage/spider/spd_table.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 56931f47f24..e980a42eef0 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -8573,7 +8573,7 @@ int spider_discover_table_structure( } #ifdef SPIDER_HAS_DISCOVER_TABLE_STRUCTURE_COMMENT if (!(part_syntax = generate_partition_syntax(thd, part_info, &part_syntax_len, - FALSE, TRUE, info, NULL, NULL))) + TRUE, info, NULL))) #else if (!(part_syntax = generate_partition_syntax(part_info, &part_syntax_len, FALSE, TRUE, info, NULL))) @@ -8586,7 +8586,6 @@ int spider_discover_table_structure( DBUG_RETURN(HA_ERR_OUT_OF_MEM); } str.q_append(part_syntax, part_syntax_len); - my_free(part_syntax, MYF(0)); } #endif DBUG_PRINT("info",("spider str=%s", str.c_ptr_safe())); |