1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.11 into 11.0

This commit is contained in:
Marko Mäkelä
2024-03-28 10:51:36 +02:00
490 changed files with 14843 additions and 4704 deletions

View File

@@ -0,0 +1,12 @@
#
# MDEV-33434 MDEV-33434 UBSAN null pointer passed as argument 2, which is declared to never be null in spider_udf_direct_sql_create_conn
#
INSTALL SONAME 'ha_spider';
SET character_set_connection=ucs2;
SELECT SPIDER_DIRECT_SQL('SELECT SLEEP(1)', '', 'srv "dummy", port "3307"');
ERROR HY000: Unable to connect to foreign data source: localhost
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
#
# end of test mdev_33434
#

View File

@@ -0,0 +1,4 @@
set @old_sql_mode=@@global.sql_mode;
set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
install soname 'ha_spider';
set global sql_mode=@old_sql_mode;

View File

@@ -9,7 +9,7 @@ for slave1_1
connection slave1_1;
SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
Variable_name Value
slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10000,20000,30000
slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701,10000,20000,30000
connection slave1_1;
for slave1_1
for master_1

View File

@@ -1 +0,0 @@
udf_mysql_func_early.result

View File

@@ -0,0 +1,43 @@
#
# Test that udf created by inserting into mysql_func works as expected
#
CREATE SERVER s_1 FOREIGN DATA WRAPPER mysql OPTIONS (
HOST 'localhost',
DATABASE 'auto_test_local',
USER 'root',
PASSWORD '',
SOCKET '$MASTER_1_MYSOCK'
);
CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
HOST 'localhost',
DATABASE 'auto_test_remote',
USER 'root',
PASSWORD '',
SOCKET '$CHILD2_1_MYSOCK'
);
connect master_1, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK;
connect child2_1, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK;
connection child2_1;
CREATE DATABASE auto_test_remote;
USE auto_test_remote;
CREATE TABLE tbl_a (
a INT
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into tbl_a values (42);
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
CREATE TABLE tbl_a (
a INT
) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
create temporary table results (a int);
SELECT SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"');
SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"')
1
select * from results;
a
42
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;

View File

@@ -0,0 +1,15 @@
--echo #
--echo # MDEV-33434 MDEV-33434 UBSAN null pointer passed as argument 2, which is declared to never be null in spider_udf_direct_sql_create_conn
--echo #
INSTALL SONAME 'ha_spider';
SET character_set_connection=ucs2;
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
SELECT SPIDER_DIRECT_SQL('SELECT SLEEP(1)', '', 'srv "dummy", port "3307"');
--disable_query_log
--source ../../include/clean_up_spider.inc
--enable_query_log
--echo #
--echo # end of test mdev_33434
--echo #

View File

@@ -0,0 +1,11 @@
# This test tests spider init with global no_zero_date sql mode
set @old_sql_mode=@@global.sql_mode;
set global sql_mode=(SELECT CONCAT (@@sql_mode,',no_zero_date'));
install soname 'ha_spider';
set global sql_mode=@old_sql_mode;
--disable_query_log
--disable_result_log
--source ../../include/clean_up_spider.inc
--enable_result_log
--enable_query_log

View File

@@ -9,7 +9,7 @@ for slave1_1
connection slave1_1;
SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
Variable_name Value
slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701
slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1020,1429,2013,12701
connection slave1_1;
for slave1_1
for master_1