insert into my_t values('aaa','aaa'),('aaa|qqq','qqq'),('gheis','^[^a-dXYZ]+\$'),('aab','^aa?b'),('Baaan','^Ba*n'),('aaa','qqq|aaa'),('qqq','qqq|aaa'),('bbb','qqq|aaa'),('bbb','qqq'),('aaa','aba'),(null,'abc'),('def',null),(null,null),('ghi','ghi[')
EOF
chop($query);
&exec_query([$query],$NO_ERR,$VERBOSE,$HS);
&exec_query(["select s1 regexp s2 from my_t"],
$NO_ERR,$VERBOSE,$HS);
####
#### ["position","SS"],
####
}
sub create_test_tables
{
$query[0][0]=<<EOF;
CREATE TABLE my_t (
auto int(5) unsigned DEFAULT '0' NOT NULL auto_increment,
string varchar(10) DEFAULT 'hello',
binary_string varchar(10) binary DEFAULT '' NOT NULL,
tiny tinyint(4) DEFAULT '0' NOT NULL,
short smallint(6) DEFAULT '1' NOT NULL,
medium mediumint(8) DEFAULT '0' NOT NULL,
longint int(11) DEFAULT '0' NOT NULL,
longlong bigint(13) DEFAULT '0' NOT NULL,
num decimal(5,2) DEFAULT '0.00' NOT NULL,
num_fill decimal(6,2) unsigned zerofill DEFAULT '0000.00' NOT NULL,
real_float float(13,1) DEFAULT '0.0' NOT NULL,
real_double double(13,1),
utiny tinyint(3) unsigned DEFAULT '0' NOT NULL,
ushort smallint(5) unsigned zerofill DEFAULT '00000' NOT NULL,
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
ulong int(11) unsigned DEFAULT '0' NOT NULL,
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
zero int(5) unsigned zerofill,
time_stamp timestamp(14),
date_field date,
time_field time,
date_time datetime,
blob_col blob,
tinyblob_col tinyblob,
mediumblob_col mediumblob NOT NULL,
longblob_col longblob NOT NULL,
options enum('one','two','three'),
flags set('one','two','three'),
PRIMARY KEY (auto)
)
EOF
chop($query[0][0]);
$query[0][1]=<<EOF;
INSERT INTO my_t VALUES (1,'hello','',0,1,0,0,0,0.00,0000.00,0.0,NULL,0,
00000,0,0,0,NULL,19980728154204,NULL,'01:00:00',
NULL,NULL,NULL,'','',NULL,NULL)
EOF
chop($query[0][1]);
$query[0][2]=<<EOF;
INSERT INTO my_t VALUES (2,'hello','',0,1,0,0,0,0.00,0000.00,
<!-- This file is maintained by matt@mysql.com -->
<testname="sel000023">
<versionvalue="3.22"/>
<versionvalue="3.23"/>
<description>Strings.</description>
<description>Testing string comparisons; LIKE, NOT LIKE, '%'.</description>
<resultfilename="r/3.23/sel000023.result">
<sql>SELECT "abc" LIKE "a%", "abc" NOT LIKE "%d%", "a%" LIKE "a\%","abc%" LIKE "a%\%","abcd" LIKE "a%b_%d", "a" LIKE "%%a","abcde" LIKE "a%_e","abc" LIKE "abc%"</sql>