diff options
author | unknown <mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-04-10 13:48:58 -0400 |
---|---|---|
committer | unknown <mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-04-10 13:48:58 -0400 |
commit | 42d7e8c08770dc87c20a61d7dc0f49649ef28704 (patch) | |
tree | 2ebeada669ea1a82c5fcb8c90497f7bf13acc11d /sql/partition_info.cc | |
parent | a514095a5d306fead8d22d03a39c83db18d98ef8 (diff) | |
download | mariadb-git-42d7e8c08770dc87c20a61d7dc0f49649ef28704.tar.gz |
BUG#18750: Various problems with partition names, quotation marks
mysql-test/r/partition.result:
Added new test cases
mysql-test/t/partition.test:
Added new test cases
sql/partition_info.cc:
Check partition names that they don't have trailing spaces
sql/share/errmsg.txt:
Added error code for wrong partition names
sql/sql_partition.cc:
New method to add partition name strings, ignore OPTION_SHOW_QUOTE_CREATE
sql/sql_show.cc:
require_quotes had a bug with identifiers that consisted of only digits,
these are allowed identifiers but must be quoted and require_quote didn't
tell this.
sql/sql_yacc.yy:
Partition names should identifers and not ident_or_text
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index ad0aa053ae2..e2bf37d6ef3 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -696,6 +696,12 @@ bool partition_info::check_partition_info(handlerton **eng_type, partition_element *part_elem= part_it++; if (!is_sub_partitioned()) { + if (check_table_name(part_elem->partition_name, + strlen(part_elem->partition_name))) + { + my_error(ER_WRONG_PARTITION_NAME, MYF(0)); + goto end; + } if (part_elem->engine_type == NULL) part_elem->engine_type= default_engine_type; DBUG_PRINT("info", ("engine = %d", @@ -709,6 +715,12 @@ bool partition_info::check_partition_info(handlerton **eng_type, do { part_elem= sub_it++; + if (check_table_name(part_elem->partition_name, + strlen(part_elem->partition_name))) + { + my_error(ER_WRONG_PARTITION_NAME, MYF(0)); + goto end; + } if (part_elem->engine_type == NULL) part_elem->engine_type= default_engine_type; DBUG_PRINT("info", ("engine = %u", |