mirror of
https://github.com/MariaDB/server.git
synced 2026-05-09 16:44:29 +02:00
Merge branch '10.5' into 10.6
This commit is contained in:
commit
76e8e24b0b
16 changed files with 24 additions and 189 deletions
|
|
@ -232,20 +232,6 @@ a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
|||
4 i 2003-10-30 05:01:03
|
||||
5 h 2001-10-31 23:59:59
|
||||
|
||||
select sql_calc_found_rows
|
||||
connection master_1;
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
||||
1 f 2008-07-01 10:21:39
|
||||
2 g 2000-02-01 00:00:00
|
||||
3 j 2007-05-04 20:03:11
|
||||
4 i 2003-10-30 05:01:03
|
||||
connection master_1;
|
||||
SELECT found_rows();
|
||||
found_rows()
|
||||
5
|
||||
|
||||
select high_priority
|
||||
connection master_1;
|
||||
SELECT HIGH_PRIORITY a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
|
|
|
|||
|
|
@ -847,52 +847,6 @@ if ($USE_CHILD_GROUP2)
|
|||
}
|
||||
}
|
||||
|
||||
--echo
|
||||
--echo select sql_calc_found_rows
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
SELECT found_rows();
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo
|
||||
--echo select high_priority
|
||||
if ($USE_CHILD_GROUP2)
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@ let $CHILD2_1_CREATE_TABLES=
|
|||
PRIMARY KEY(a,b)
|
||||
) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
|
||||
--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
|
||||
let $CHILD2_1_SELECT_TABLES=
|
||||
SELECT pkey, txt FROM tbl_a ORDER BY pkey;
|
||||
let $CHILD2_1_SELECT_TABLES=
|
||||
SELECT a, b, c FROM ta_r2 ORDER BY a $STR_SEMICOLON
|
||||
SELECT a, b, c FROM ta_r3 ORDER BY a;
|
||||
|
|
|
|||
|
|
@ -58,25 +58,33 @@ TRUNCATE TABLE mysql.general_log;
|
|||
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt2) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt3) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1,pt3);
|
||||
--disable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
|
||||
--enable_view_protocol
|
||||
SELECT a, b, c FROM tbl_a PARTITION (pt2,pt3);
|
||||
--enable_ps2_protocol
|
||||
|
||||
--connection child2_1
|
||||
--disable_ps2_protocol
|
||||
--disable_view_protocol
|
||||
--disable_ps2_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
--enable_ps2_protocol
|
||||
--disable_ps_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -85,10 +85,10 @@ SET NAMES utf8;
|
|||
--disable_ps2_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_ps2_protocol
|
||||
--enable_view_protocol
|
||||
--disable_ps_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ FLUSH TABLES WITH READ LOCK;
|
|||
|
||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||
CREATE FUNCTION spider_bg_direct_sql RETURNS INT SONAME 'ha_spider.so';
|
||||
--disable_view_protocol
|
||||
SELECT * FROM t;
|
||||
--enable_view_protocol
|
||||
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
|
||||
INSTALL SONAME 'ha_spider';
|
||||
SET character_set_connection=ucs2;
|
||||
--disable_view_protocol
|
||||
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
|
||||
SELECT SPIDER_DIRECT_SQL('SELECT SLEEP(1)', '', 'srv "dummy", port "3307"');
|
||||
--enable_view_protocol
|
||||
--disable_query_log
|
||||
--source ../../include/clean_up_spider.inc
|
||||
--enable_query_log
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo');
|
|||
CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"';
|
||||
CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"';
|
||||
XA START 'a';
|
||||
--disable_view_protocol
|
||||
--disable_result_log
|
||||
--error 0,ER_CONNECT_TO_FOREIGN_DATA_SOURCE
|
||||
SELECT * FROM information_schema.table_constraints;
|
||||
|
|
@ -22,6 +23,7 @@ SELECT * FROM t2;
|
|||
SELECT SLEEP (1);
|
||||
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
|
||||
SELECT * FROM t2;
|
||||
--enable_view_protocol
|
||||
xa end 'a';
|
||||
xa rollback 'a';
|
||||
drop table tSpider, t2;
|
||||
|
|
|
|||
|
|
@ -232,20 +232,6 @@ a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
|||
4 i 2003-10-30 05:01:03
|
||||
5 h 2001-10-31 23:59:59
|
||||
|
||||
select sql_calc_found_rows
|
||||
connection master_1;
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
||||
1 f 2008-07-01 10:21:39
|
||||
2 g 2000-02-01 00:00:00
|
||||
3 j 2007-05-04 20:03:11
|
||||
4 i 2003-10-30 05:01:03
|
||||
connection master_1;
|
||||
SELECT found_rows();
|
||||
found_rows()
|
||||
5
|
||||
|
||||
select high_priority
|
||||
connection master_1;
|
||||
SELECT HIGH_PRIORITY a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
|
|
|
|||
|
|
@ -847,52 +847,6 @@ if ($USE_CHILD_GROUP2)
|
|||
}
|
||||
}
|
||||
|
||||
--echo
|
||||
--echo select sql_calc_found_rows
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
SELECT found_rows();
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo
|
||||
--echo select high_priority
|
||||
if ($USE_CHILD_GROUP2)
|
||||
|
|
|
|||
|
|
@ -232,20 +232,6 @@ a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
|||
4 i 2003-10-30 05:01:03
|
||||
5 h 2001-10-31 23:59:59
|
||||
|
||||
select sql_calc_found_rows
|
||||
connection master_1;
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
a b date_format(c, '%Y-%m-%d %H:%i:%s')
|
||||
1 f 2008-07-01 10:21:39
|
||||
2 g 2000-02-01 00:00:00
|
||||
3 j 2007-05-04 20:03:11
|
||||
4 i 2003-10-30 05:01:03
|
||||
connection master_1;
|
||||
SELECT found_rows();
|
||||
found_rows()
|
||||
5
|
||||
|
||||
select high_priority
|
||||
connection master_1;
|
||||
SELECT HIGH_PRIORITY a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ INSERT INTO tbl_b (bkey,akey) VALUES (0,0),(1,1),(2,2),(3,3),(4,4),(5,4),(6,3),(
|
|||
--connection child2_1
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
--disable_view_protocol
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
||||
|
|
@ -67,11 +68,10 @@ SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
|||
|
||||
--connection child2_1
|
||||
--disable_ps_protocol
|
||||
--disable_view_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_ps_protocol
|
||||
--enable_view_protocol
|
||||
|
||||
--echo
|
||||
--echo deinit
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ SELECT a.val, a.akey FROM tbl_a a, tbl_b b WHERE a.akey = b.akey AND b.bkey = 5;
|
|||
--disable_ps_protocol
|
||||
--disable_view_protocol
|
||||
eval $CHILD2_1_SELECT_ARGUMENT1;
|
||||
--enable_view_protocol
|
||||
eval $CHILD2_1_SELECT_TABLES;
|
||||
--enable_view_protocol
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo
|
||||
|
|
|
|||
|
|
@ -847,52 +847,6 @@ if ($USE_CHILD_GROUP2)
|
|||
}
|
||||
}
|
||||
|
||||
--echo
|
||||
--echo select sql_calc_found_rows
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
SELECT SQL_CALC_FOUND_ROWS a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l
|
||||
ORDER BY a LIMIT 4;
|
||||
if ($USE_CHILD_GROUP2)
|
||||
{
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
}
|
||||
--connection child2_1
|
||||
if ($USE_GENERAL_LOG)
|
||||
{
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%select %';
|
||||
}
|
||||
if (!$OUTPUT_CHILD_GROUP2)
|
||||
{
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
}
|
||||
--connection master_1
|
||||
--disable_ps2_protocol
|
||||
SELECT found_rows();
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo
|
||||
--echo select high_priority
|
||||
if ($USE_CHILD_GROUP2)
|
||||
|
|
|
|||
|
|
@ -8963,12 +8963,13 @@ int spider_mbase_handler::append_key_select_part(
|
|||
default:
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
error_num = append_key_select(str, idx);
|
||||
error_num = append_key_select(str, sql_type, idx);
|
||||
DBUG_RETURN(error_num);
|
||||
}
|
||||
|
||||
int spider_mbase_handler::append_key_select(
|
||||
spider_string *str,
|
||||
ulong sql_type,
|
||||
uint idx
|
||||
) {
|
||||
st_select_lex *select_lex = NULL;
|
||||
|
|
@ -9017,6 +9018,7 @@ int spider_mbase_handler::append_key_select(
|
|||
str->q_append(SPIDER_SQL_COMMA_STR, SPIDER_SQL_COMMA_LEN);
|
||||
}
|
||||
str->length(str->length() - SPIDER_SQL_COMMA_LEN);
|
||||
DBUG_RETURN(append_from(str, sql_type, first_link_idx));
|
||||
} else {
|
||||
table_name_pos = str->length() + mysql_share->key_select_pos[idx];
|
||||
if (str->append(mysql_share->key_select[idx]))
|
||||
|
|
|
|||
|
|
@ -893,6 +893,7 @@ public:
|
|||
) override;
|
||||
int append_key_select(
|
||||
spider_string *str,
|
||||
ulong sql_type,
|
||||
uint idx
|
||||
);
|
||||
int append_minimum_select_part(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue