diff options
author | unknown <monty@mysql.com> | 2004-12-02 14:43:51 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-12-02 14:43:51 +0200 |
commit | 93cf297fcb932aaaf1c006d7066ec453c9a907cb (patch) | |
tree | 8f90ede7dbeae77977acb6dee6d00daeb9081399 /sql/set_var.cc | |
parent | b18b1be91323358b1078e5eb409b3c2042a54786 (diff) | |
download | mariadb-git-93cf297fcb932aaaf1c006d7066ec453c9a907cb.tar.gz |
Cleanups during review stage
Added auto-correct of field length for enum/set tables for ALTER TABLE
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
mysql-test/r/rpl_start_stop_slave.result:
Fixed wrong test
mysql-test/r/type_enum.result:
Added test for wrong enum/set length after alter table
mysql-test/t/ps.test:
removed empty line
mysql-test/t/type_enum.test:
Added test for wrong enum/set length after alter table
sql/field.cc:
Added auto-correct of field length for enum/set tables.
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
sql/item_cmpfunc.cc:
Simple optimization
sql/mysql_priv.h:
Made local function global
sql/set_var.cc:
Simple cleanup
sql/sql_table.cc:
Simple cleanups & optimizations
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 2031ac15412..79be4dc1c46 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -2725,24 +2725,23 @@ sys_var *find_sys_var(const char *str, uint length) int sql_set_variables(THD *thd, List<set_var_base> *var_list) { - int error= 0; + int error; List_iterator_fast<set_var_base> it(*var_list); DBUG_ENTER("sql_set_variables"); set_var_base *var; while ((var=it++)) { - if ((error=var->check(thd))) + if ((error= var->check(thd))) goto err; } - if (!thd->net.report_error) + if (!(error= test(thd->net.report_error))) { it.rewind(); while ((var= it++)) error|= var->update(thd); // Returns 0, -1 or 1 } - else - error= 1; + err: free_underlaid_joins(thd, &thd->lex->select_lex); DBUG_RETURN(error); |