Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
653a56fd
Commit
653a56fd
authored
Apr 17, 2019
by
Kentoku SHIBA
Committed by
GitHub
Apr 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17508 Fix bug for spider when using "not like" (#1282)
parent
645f77a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
2 deletions
+25
-2
storage/spider/spd_db_mysql.cc
storage/spider/spd_db_mysql.cc
+5
-1
storage/spider/spd_db_oracle.cc
storage/spider/spd_db_oracle.cc
+19
-1
storage/spider/spd_environ.h
storage/spider/spd_environ.h
+1
-0
No files found.
storage/spider/spd_db_mysql.cc
View file @
653a56fd
...
...
@@ -4864,9 +4864,10 @@ int spider_db_mbase_util::open_item_func(
}
break
;
case
Item_func
:
:
LIKE_FUNC
:
#ifdef SPIDER_LIKE_FUNC_HAS_GET_NEGATED
if
(
str
)
{
if
(((
Item_func_like
*
)
item_func
)
->
negated
)
if
(((
Item_func_like
*
)
item_func
)
->
get_negated
()
)
{
func_name
=
SPIDER_SQL_NOT_LIKE_STR
;
func_name_length
=
SPIDER_SQL_NOT_LIKE_LEN
;
...
...
@@ -4878,6 +4879,9 @@ int spider_db_mbase_util::open_item_func(
}
}
break
;
#else
DBUG_RETURN
(
ER_SPIDER_COND_SKIP_NUM
);
#endif
default:
THD
*
thd
=
spider
->
trx
->
thd
;
SPIDER_SHARE
*
share
=
spider
->
share
;
...
...
storage/spider/spd_db_oracle.cc
View file @
653a56fd
...
...
@@ -4043,13 +4043,31 @@ int spider_db_oracle_util::open_item_func(
case
Item_func
:
:
LE_FUNC
:
case
Item_func
:
:
GE_FUNC
:
case
Item_func
:
:
GT_FUNC
:
case
Item_func
:
:
LIKE_FUNC
:
if
(
str
)
{
func_name
=
(
char
*
)
item_func
->
func_name
();
func_name_length
=
strlen
(
func_name
);
}
break
;
case
Item_func
:
:
LIKE_FUNC
:
#ifdef SPIDER_LIKE_FUNC_HAS_GET_NEGATED
if
(
str
)
{
if
(((
Item_func_like
*
)
item_func
)
->
get_negated
())
{
func_name
=
SPIDER_SQL_NOT_LIKE_STR
;
func_name_length
=
SPIDER_SQL_NOT_LIKE_LEN
;
}
else
{
func_name
=
(
char
*
)
item_func
->
func_name
();
func_name_length
=
strlen
(
func_name
);
}
}
break
;
#else
DBUG_RETURN
(
ER_SPIDER_COND_SKIP_NUM
);
#endif
default:
THD
*
thd
=
spider
->
trx
->
thd
;
SPIDER_SHARE
*
share
=
spider
->
share
;
...
...
storage/spider/spd_environ.h
View file @
653a56fd
...
...
@@ -50,5 +50,6 @@
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100400
#define SPIDER_USE_CONST_ITEM_FOR_STRING_INT_REAL_DECIMAL_DATE_ITEM
#define SPIDER_SQL_CACHE_IS_IN_LEX
#define SPIDER_LIKE_FUNC_HAS_GET_NEGATED
#endif
#endif
/* SPD_ENVIRON_INCLUDED */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment