File tree Expand file tree Collapse file tree 3 files changed +62
-6
lines changed Expand file tree Collapse file tree 3 files changed +62
-6
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # MDEV-32907
3
+ #
4
+ for master_1
5
+ for child2
6
+ for child3
7
+ CREATE SERVER srv FOREIGN DATA WRAPPER mysql
8
+ OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
9
+ create table t2 (c varchar(16));
10
+ create table t1 (c varchar(16)) ENGINE=Spider
11
+ COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
12
+ insert into t1 values ('TestSpiderRegex');
13
+ select c from t1 where c regexp '(Test|Spider|Regex)';
14
+ c
15
+ TestSpiderRegex
16
+ drop table t1, t2;
17
+ drop server srv;
18
+ for master_1
19
+ for child2
20
+ for child3
21
+ #
22
+ # end of test mdev_32907
23
+ #
Original file line number Diff line number Diff line change
1
+ --echo #
2
+ --echo # MDEV-32907
3
+ --echo #
4
+ --disable_query_log
5
+ --disable_result_log
6
+ --source ../../t/test_init.inc
7
+ --enable_result_log
8
+ --enable_query_log
9
+ evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
10
+ OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
11
+
12
+ create table t2 (c varchar(16));
13
+ create table t1 (c varchar(16)) ENGINE=Spider
14
+ COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
15
+
16
+ insert into t1 values ('TestSpiderRegex');
17
+ select c from t1 where c regexp '(Test|Spider|Regex)';
18
+ drop table t1, t2;
19
+ drop server srv;
20
+
21
+ --disable_query_log
22
+ --disable_result_log
23
+ --source ../../t/test_deinit.inc
24
+ --enable_result_log
25
+ --enable_query_log
26
+ --echo #
27
+ --echo # end of test mdev_32907
28
+ --echo #
Original file line number Diff line number Diff line change @@ -5856,12 +5856,17 @@ int spider_db_mbase_util::print_item_func(
5856
5856
item_count -= 2;
5857
5857
break;
5858
5858
}
5859
- } else if (func_name_length == 6 &&
5860
- !strncasecmp("istrue", func_name, func_name_length)
5861
- ) {
5862
- last_str = SPIDER_SQL_IS_TRUE_STR;
5863
- last_str_length = SPIDER_SQL_IS_TRUE_LEN;
5864
- break;
5859
+ } else if (func_name_length == 6)
5860
+ {
5861
+ if (!strncasecmp("istrue", func_name, func_name_length))
5862
+ {
5863
+ last_str= SPIDER_SQL_IS_TRUE_STR;
5864
+ last_str_length= SPIDER_SQL_IS_TRUE_LEN;
5865
+ break;
5866
+ }
5867
+ else if (!strncasecmp("regexp", func_name, func_name_length))
5868
+ /* Keep the infix expression */
5869
+ break;
5865
5870
} else if (func_name_length == 7)
5866
5871
{
5867
5872
if (!strncasecmp("isfalse", func_name, func_name_length))
You can’t perform that action at this time.
0 commit comments