diff options
author | vicentiu <vicentiu@mariadb.org> | 2017-01-06 17:09:59 +0200 |
---|---|---|
committer | vicentiu <vicentiu@mariadb.org> | 2017-01-06 17:09:59 +0200 |
commit | e9aed131ead9e102c8948ebadc421960399722d4 (patch) | |
tree | ae8f4ee4ee7f7e915121ff2c73c88c20781c45ed /sql/event_db_repository.cc | |
parent | e4978d26b79120c58706e57fc66e4de1ec4b230c (diff) | |
parent | ae1b3d1991b679bb38095711de27934d7683deda (diff) | |
download | mariadb-git-e9aed131ead9e102c8948ebadc421960399722d4.tar.gz |
Merge remote-tracking branch 'origin/5.5' into 10.0
Diffstat (limited to 'sql/event_db_repository.cc')
-rw-r--r-- | sql/event_db_repository.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 6785b46d0da..66606b18c49 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -18,6 +18,7 @@ #include "sql_priv.h" #include "unireg.h" #include "sql_base.h" // close_thread_tables +#include "sql_parse.h" #include "event_db_repository.h" #include "key.h" // key_copy #include "sql_db.h" // get_default_db_collation @@ -704,19 +705,17 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, restore_record(table, s->default_values); // Get default values for fields - if (system_charset_info->cset-> - numchars(system_charset_info, parse_data->dbname.str, - parse_data->dbname.str + parse_data->dbname.length) > - table->field[ET_FIELD_DB]->char_length()) + if (check_string_char_length(&parse_data->dbname, 0, + table->field[ET_FIELD_DB]->char_length(), + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->dbname.str); goto end; } - if (system_charset_info->cset-> - numchars(system_charset_info, parse_data->name.str, - parse_data->name.str + parse_data->name.length) > - table->field[ET_FIELD_NAME]->char_length()) + if (check_string_char_length(&parse_data->name, 0, + table->field[ET_FIELD_NAME]->char_length(), + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->name.str); goto end; |