diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-15 11:19:39 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-15 11:19:39 +0200 |
commit | 30b2c64c4e87f8924fe817f5c607ae90a990e9e5 (patch) | |
tree | f3382ec7abe5bc7179288e01c3ad4f2dfab99a1f | |
parent | 665a31af2b7d0ecd66d5e54ed0544b5db3892732 (diff) | |
download | mariadb-git-30b2c64c4e87f8924fe817f5c607ae90a990e9e5.tar.gz |
compiler warnings
-rw-r--r-- | sql/sql_show.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2717fdb325f..46cc157061d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -7837,16 +7837,22 @@ int make_schema_select(THD *thd, SELECT_LEX *sel, We have to make non const db_name & table_name because of lower_case_table_names */ - thd->make_lex_string(&db, INFORMATION_SCHEMA_NAME.str, - INFORMATION_SCHEMA_NAME.length); - thd->make_lex_string(&table, schema_table->table_name, - strlen(schema_table->table_name)); - if (schema_table->old_format(thd, schema_table) || /* Handle old syntax */ - !sel->add_table_to_list(thd, new Table_ident(thd, db, table, 0), + if (!thd->make_lex_string(&db, INFORMATION_SCHEMA_NAME.str, + INFORMATION_SCHEMA_NAME.length)) + DBUG_RETURN(1); + + if (!thd->make_lex_string(&table, schema_table->table_name, + strlen(schema_table->table_name))) + DBUG_RETURN(1); + + if (schema_table->old_format(thd, schema_table)) + + DBUG_RETURN(1); + + if (!sel->add_table_to_list(thd, new Table_ident(thd, db, table, 0), 0, 0, TL_READ, MDL_SHARED_READ)) - { DBUG_RETURN(1); - } + DBUG_RETURN(0); } |