Skip to content

Commit

Permalink
MDEV-33493 Spider: Make a symlink result file a normal file
Browse files Browse the repository at this point in the history
  • Loading branch information
mariadb-YuchenPei committed Feb 21, 2024
1 parent b04c857 commit 0f0da95
Showing 1 changed file with 43 additions and 1 deletion.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 0f0da95

Please sign in to comment.