summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-11-22 21:33:15 +0100
committerunknown <serg@serg.mylan>2004-11-22 21:33:15 +0100
commit6627dc7d1bd399e6b2bdac02c6878435f1a96a5d (patch)
tree9fd3b9eb87ff64ffe7e7374609beb327e419a87d /sql/item_cmpfunc.cc
parent443143f334b7ea452ff60cccd046e4242849e31a (diff)
parentf57d5412e47aa85941ea03ec3e63b017dac8c1ba (diff)
downloadmariadb-git-6627dc7d1bd399e6b2bdac02c6878435f1a96a5d.tar.gz
merged
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union Docs/Support/texi2html: Auto merged client/mysqltest.c: Auto merged innobase/lock/lock0lock.c: Auto merged innobase/row/row0sel.c: Auto merged mysql-test/r/fulltext.result: Auto merged mysql-test/r/heap.result: Auto merged mysql-test/r/key.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/rpl000015.result: Auto merged mysql-test/r/rpl_log_pos.result: Auto merged mysql-test/r/rpl_rotate_logs.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/key.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/rpl000015.test: Auto merged mysql-test/t/rpl_log_pos.test: Auto merged mysql-test/t/rpl_rotate_logs.test: Auto merged mysql-test/t/subselect.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/handler.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_do.cc: Auto merged sql/sql_table.cc: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 4a4485ba2da..23bd1b503f7 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2429,11 +2429,12 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
return FALSE;
}
int error;
- if ((error=regcomp(&preg,res->c_ptr(),
- (cmp_collation.collation->state & MY_CS_BINSORT) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE,
- cmp_collation.collation)))
+ if ((error= regcomp(&preg,res->c_ptr(),
+ ((cmp_collation.collation->state & MY_CS_BINSORT) ||
+ (cmp_collation.collation->state & MY_CS_CSSORT)) ?
+ REG_EXTENDED | REG_NOSUB :
+ REG_EXTENDED | REG_NOSUB | REG_ICASE,
+ cmp_collation.collation)))
{
(void) regerror(error,&preg,buff,sizeof(buff));
my_error(ER_REGEXP_ERROR, MYF(0), buff);
@@ -2481,10 +2482,11 @@ longlong Item_func_regex::val_int()
regex_compiled=0;
}
if (regcomp(&preg,res2->c_ptr(),
- (cmp_collation.collation->state & MY_CS_BINSORT) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE,
- cmp_collation.collation))
+ ((cmp_collation.collation->state & MY_CS_BINSORT) ||
+ (cmp_collation.collation->state & MY_CS_CSSORT)) ?
+ REG_EXTENDED | REG_NOSUB :
+ REG_EXTENDED | REG_NOSUB | REG_ICASE,
+ cmp_collation.collation))
{
null_value=1;
return 0;