-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-32753 Make spider init queries compatible with oracle sql mode
Remove ORACLE from the (session) sql_mode in connections made with sql service to run init queries The connection is new and the global variable value takes effect rather than the session value from the caller of spider_db_init.
- Loading branch information
1 parent
69389c0
commit ba94778
Showing
10 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
storage/spider/mysql-test/spider/bugfix/r/mdev_32753.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# MDEV-32753 Spider engine does not load in ORACLE mode | ||
# | ||
select * from mysql.plugin; | ||
name dl | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
# | ||
# end of test mdev_32753 | ||
# |
13 changes: 13 additions & 0 deletions
13
storage/spider/mysql-test/spider/bugfix/r/mdev_32753_after_start.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# MDEV-32753 Spider engine does not load in ORACLE mode | ||
# | ||
install soname 'ha_spider'; | ||
select * from mysql.plugin; | ||
name dl | ||
SPIDER ha_spider.so | ||
SPIDER_ALLOC_MEM ha_spider.so | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
# | ||
# end of test mdev_32753_after_start | ||
# |
16 changes: 16 additions & 0 deletions
16
storage/spider/mysql-test/spider/bugfix/r/mdev_32753_after_start_session.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# MDEV-32753 Spider engine does not load in ORACLE mode | ||
# | ||
set @old_sql_mode=@@sql_mode; | ||
SET @@sql_mode = CONCAT(@@sql_mode, ',ORACLE'); | ||
install soname 'ha_spider'; | ||
select * from mysql.plugin; | ||
name dl | ||
SPIDER ha_spider.so | ||
SPIDER_ALLOC_MEM ha_spider.so | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
set sql_mode=@old_sql_mode; | ||
# | ||
# end of test mdev_32753_after_start | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--sql-mode=oracle | ||
--plugin-load-add=ha_spider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--echo # | ||
--echo # MDEV-32753 Spider engine does not load in ORACLE mode | ||
--echo # | ||
|
||
# This test tests spider init during server startup under global | ||
# ORACLE mode | ||
select * from mysql.plugin; | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
--echo # | ||
--echo # end of test mdev_32753 | ||
--echo # |
1 change: 1 addition & 0 deletions
1
storage/spider/mysql-test/spider/bugfix/t/mdev_32753_after_start.opt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--sql-mode=oracle |
19 changes: 19 additions & 0 deletions
19
storage/spider/mysql-test/spider/bugfix/t/mdev_32753_after_start.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--echo # | ||
--echo # MDEV-32753 Spider engine does not load in ORACLE mode | ||
--echo # | ||
|
||
# This test tests spider init after startup under global ORACLE mode | ||
install soname 'ha_spider'; | ||
select * from mysql.plugin; | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../include/clean_up_spider.inc | ||
--enable_result_log | ||
--enable_query_log | ||
|
||
--echo # | ||
--echo # end of test mdev_32753_after_start | ||
--echo # |
22 changes: 22 additions & 0 deletions
22
storage/spider/mysql-test/spider/bugfix/t/mdev_32753_after_start_session.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--echo # | ||
--echo # MDEV-32753 Spider engine does not load in ORACLE mode | ||
--echo # | ||
|
||
# This test tests spider init after startup under session ORACLE mode | ||
set @old_sql_mode=@@sql_mode; | ||
SET @@sql_mode = CONCAT(@@sql_mode, ',ORACLE'); | ||
install soname 'ha_spider'; | ||
select * from mysql.plugin; | ||
create table t (c int) Engine=SPIDER; | ||
drop table t; | ||
set sql_mode=@old_sql_mode; | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../include/clean_up_spider.inc | ||
--enable_result_log | ||
--enable_query_log | ||
|
||
--echo # | ||
--echo # end of test mdev_32753_after_start | ||
--echo # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters