summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-07-28 16:10:14 +0300
committerunknown <monty@mysql.com>2005-07-28 16:10:14 +0300
commit79f75d8fad96e7b1da588eb850a25f9e9697ac2e (patch)
treeaf22629d2c36ae4196e6f23584c4cecc393b874e /sql/sql_show.cc
parent520ebda4f22a4471ddedddf1a63561787f31c409 (diff)
downloadmariadb-git-79f75d8fad96e7b1da588eb850a25f9e9697ac2e.tar.gz
Cleanups during review of new code
Ensure mysql_close() is called if mysql_set_character_set() fails libmysql/libmysql.c: Indentation cleanup mysql-test/r/select.result: Fix bad merge & align code with 4.1 mysql-test/r/type_newdecimal.result: Added test of extreme case mysql-test/t/select.test: Fix bad merge & align code with 4.1 mysql-test/t/type_newdecimal.test: Added test of extreme case mysys/charset.c: Removed not used variable mysys/default.c: Simplify code sql-common/client.c: Ensure mysql_close() is called if mysql_set_character_set() fails sql/log.cc: strmov(strmov()) -> strxmov() sql/sp.cc: Indentation fixes sql/sql_acl.cc: Indentation fixes sql/sql_base.cc: Added commments Moved variable to inner block sql/sql_show.cc: Simple optimization (removed loop variable) sql/sql_trigger.cc: strmov(strmov()) -> strxmov() strings/decimal.c: Indentation fixes
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6989eacf334..b9ab93cd66f 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3543,9 +3543,8 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
if (table_list->schema_table_reformed) // show command
{
SELECT_LEX *sel= lex->current_select;
- uint i= 0;
Item *item;
- Field_translator *transl;
+ Field_translator *transl, *org_transl;
if (table_list->field_translation)
{
@@ -3566,16 +3565,17 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
{
DBUG_RETURN(1);
}
- while ((item= it++))
+ for (org_transl= transl; (item= it++); transl++)
{
- char *name= item->name;
- transl[i].item= item;
- if (!item->fixed && item->fix_fields(thd, &transl[i].item))
+ transl->item= item;
+ transl->name= item->name;
+ if (!item->fixed && item->fix_fields(thd, &transl->item))
+ {
DBUG_RETURN(1);
- transl[i++].name= name;
+ }
}
- table_list->field_translation= transl;
- table_list->field_translation_end= transl + sel->item_list.elements;
+ table_list->field_translation= org_transl;
+ table_list->field_translation_end= transl;
}
DBUG_RETURN(0);