Skip to content

Commit 0f0da95

Browse files
MDEV-33493 Spider: Make a symlink result file a normal file
1 parent b04c857 commit 0f0da95

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

storage/spider/mysql-test/spider/bugfix/r/udf_mysql_func_early_init_file.result

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# Test that udf created by inserting into mysql_func works as expected
3+
#
4+
CREATE SERVER s_1 FOREIGN DATA WRAPPER mysql OPTIONS (
5+
HOST 'localhost',
6+
DATABASE 'auto_test_local',
7+
USER 'root',
8+
PASSWORD '',
9+
SOCKET '$MASTER_1_MYSOCK'
10+
);
11+
CREATE SERVER s_2_1 FOREIGN DATA WRAPPER mysql OPTIONS (
12+
HOST 'localhost',
13+
DATABASE 'auto_test_remote',
14+
USER 'root',
15+
PASSWORD '',
16+
SOCKET '$CHILD2_1_MYSOCK'
17+
);
18+
connect master_1, localhost, root, , , $MASTER_1_MYPORT, $MASTER_1_MYSOCK;
19+
connect child2_1, localhost, root, , , $CHILD2_1_MYPORT, $CHILD2_1_MYSOCK;
20+
connection child2_1;
21+
CREATE DATABASE auto_test_remote;
22+
USE auto_test_remote;
23+
CREATE TABLE tbl_a (
24+
a INT
25+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26+
insert into tbl_a values (42);
27+
connection master_1;
28+
CREATE DATABASE auto_test_local;
29+
USE auto_test_local;
30+
CREATE TABLE tbl_a (
31+
a INT
32+
) ENGINE=Spider DEFAULT CHARSET=utf8 COMMENT='table "tbl_a", srv "s_2_1"';
33+
create temporary table results (a int);
34+
SELECT SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"');
35+
SPIDER_DIRECT_SQL('select * from tbl_a', 'results', 'srv "s_2_1", database "auto_test_remote"')
36+
1
37+
select * from results;
38+
a
39+
42
40+
connection master_1;
41+
DROP DATABASE IF EXISTS auto_test_local;
42+
connection child2_1;
43+
DROP DATABASE IF EXISTS auto_test_remote;

0 commit comments

Comments
 (0)