summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_regexp.result
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-10-05 12:15:11 +0500
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-10-05 12:15:11 +0500
commit64b19133820078a555e73ed1ff429984e82d1041 (patch)
treea8f229ad3a0b54c8e87866f471532633a263af0e /mysql-test/r/func_regexp.result
parent4e331363cf9603cfd46c18d272985695b486911f (diff)
downloadmariadb-git-64b19133820078a555e73ed1ff429984e82d1041.tar.gz
Bug#31081 server crash in regexp function
Problem: The "regex" library written by Henry Spencer does not support tricky character sets like UCS2. Fix: convert tricky character sets to UTF8 before calling regex functions. mysql-test/r/ctype_uca.result: Adding tests mysql-test/r/ctype_ucs.result: Adding tests mysql-test/r/ctype_utf8.result: Adding tests mysql-test/r/func_regexp.result: Adding tests mysql-test/t/ctype_uca.test: Adding tests mysql-test/t/ctype_ucs.test: Adding tests mysql-test/t/ctype_utf8.test: Adding tests mysql-test/t/func_regexp.test: Adding tests sql/item_cmpfunc.cc: - Adding new method Item_func_regex::regcomp() to share more code between fix_fields() and val_int() - Adding conversion from ASCII-incompatible charsets like UCS2 to UTF8, because the "regexp" does not support these charsets - Additional optimization: calculate flags for regcomp only once in fix_fields, instead of every regcomp() sql/item_cmpfunc.h: Adding prototypes for new members and methods mysql-test/include/ctype_regex.inc: New BitKeeper file ``mysql-test/include/ctype_regex.inc'' Moving common regular expression tests into a separate file and uncluding it into func_regexp and into many ctype_xxx tests.
Diffstat (limited to 'mysql-test/r/func_regexp.result')
-rw-r--r--mysql-test/r/func_regexp.result14
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/r/func_regexp.result b/mysql-test/r/func_regexp.result
index 584c8a9b820..752ec3a5810 100644
--- a/mysql-test/r/func_regexp.result
+++ b/mysql-test/r/func_regexp.result
@@ -1,5 +1,17 @@
drop table if exists t1;
-create table t1 (s1 char(64),s2 char(64));
+set names latin1;
+drop table if exists t1;
+create table t1 as
+select repeat(' ', 64) as s1, repeat(' ',64) as s2
+union
+select null, null;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `s1` varchar(64) default NULL,
+ `s2` varchar(64) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+delete from t1;
insert into t1 values('aaa','aaa');
insert into t1 values('aaa|qqq','qqq');
insert into t1 values('gheis','^[^a-dXYZ]+$');