diff options
author | Michael Widenius <monty@mariadb.org> | 2017-06-18 12:28:40 +0300 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-08-24 01:05:53 +0200 |
commit | cc77f9882dcaa4e02196bb3847cd66f2943eb4c6 (patch) | |
tree | e394e188978a41d0c4eca65aafe917310315c9e1 /sql/sql_show.cc | |
parent | 874e4e473acc7087fc8e375e9de2b5d1e846b7e9 (diff) | |
download | mariadb-git-cc77f9882dcaa4e02196bb3847cd66f2943eb4c6.tar.gz |
Changed KEY names to use LEX_CSTRING
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6d9f3f23138..68ded844938 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2169,7 +2169,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet, bool found_primary=0; packet->append(STRING_WITH_LEN(",\n ")); - if (i == primary_key && !strcmp(key_info->name, primary_key_name)) + if (i == primary_key && !strcmp(key_info->name.str, primary_key_name)) { found_primary=1; /* @@ -2188,7 +2188,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet, packet->append(STRING_WITH_LEN("KEY ")); if (!found_primary) - append_identifier(thd, packet, key_info->name, strlen(key_info->name)); + append_identifier(thd, packet, key_info->name.str, key_info->name.length); packet->append(STRING_WITH_LEN(" (")); @@ -6235,7 +6235,7 @@ static int get_schema_stat_record(THD *thd, TABLE_LIST *tables, table->field[3]->store((longlong) ((key_info->flags & HA_NOSAME) ? 0 : 1), TRUE); table->field[4]->store(db_name->str, db_name->length, cs); - table->field[5]->store(key_info->name, strlen(key_info->name), cs); + table->field[5]->store(key_info->name.str, key_info->name.length, cs); table->field[6]->store((longlong) (j+1), TRUE); str= (key_part->field ? &key_part->field->field_name : &unknown); @@ -6483,17 +6483,17 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables, if (i != primary_key && !(key_info->flags & HA_NOSAME)) continue; - if (i == primary_key && !strcmp(key_info->name, primary_key_name)) + if (i == primary_key && !strcmp(key_info->name.str, primary_key_name)) { - if (store_constraints(thd, table, db_name, table_name, key_info->name, - strlen(key_info->name), + if (store_constraints(thd, table, db_name, table_name, + key_info->name.str, key_info->name.length, STRING_WITH_LEN("PRIMARY KEY"))) DBUG_RETURN(1); } else if (key_info->flags & HA_NOSAME) { - if (store_constraints(thd, table, db_name, table_name, key_info->name, - strlen(key_info->name), + if (store_constraints(thd, table, db_name, table_name, + key_info->name.str, key_info->name.length, STRING_WITH_LEN("UNIQUE"))) DBUG_RETURN(1); } @@ -6689,8 +6689,7 @@ static int get_schema_key_column_usage_record(THD *thd, f_idx++; restore_record(table, s->default_values); store_key_column_usage(table, db_name, table_name, - key_info->name, - strlen(key_info->name), + key_info->name.str, key_info->name.length, key_part->field->field_name.str, key_part->field->field_name.length, (longlong) f_idx); |