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/item_cmpfunc.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/item_cmpfunc.cc')
-rw-r--r-- | sql/item_cmpfunc.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 4970517de87..c7481192be8 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -2365,10 +2365,10 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } int error; if ((error= regcomp(&preg,res->c_ptr(), - ((cmp_collation.collation->state & MY_CS_BINSORT) || - (cmp_collation.collation->state & MY_CS_CSSORT)) ? + ((cmp_collation.collation->state & + (MY_CS_BINSORT | MY_CS_CSSORT)) ? REG_EXTENDED | REG_NOSUB : - REG_EXTENDED | REG_NOSUB | REG_ICASE, + REG_EXTENDED | REG_NOSUB | REG_ICASE), cmp_collation.collation))) { (void) regerror(error,&preg,buff,sizeof(buff)); @@ -2417,10 +2417,10 @@ longlong Item_func_regex::val_int() regex_compiled=0; } if (regcomp(&preg,res2->c_ptr(), - ((cmp_collation.collation->state & MY_CS_BINSORT) || - (cmp_collation.collation->state & MY_CS_CSSORT)) ? + ((cmp_collation.collation->state & + (MY_CS_BINSORT | MY_CS_CSSORT)) ? REG_EXTENDED | REG_NOSUB : - REG_EXTENDED | REG_NOSUB | REG_ICASE, + REG_EXTENDED | REG_NOSUB | REG_ICASE), cmp_collation.collation)) { null_value=1; |