mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixing test failures caused by the previous commits.
Adding "--source include/have_udf.inc" and a few "--replace" commands.
This commit is contained in:
@ -18,7 +18,7 @@ CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
|
|||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
ret
|
ret
|
||||||
1
|
1
|
||||||
CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
|
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
ret
|
ret
|
||||||
@ -27,7 +27,7 @@ CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
|||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
ret
|
ret
|
||||||
0
|
0
|
||||||
CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR HY000: Function 'metaphon' already exists
|
ERROR HY000: Function 'metaphon' already exists
|
||||||
SELECT metaphon('mariadb');
|
SELECT metaphon('mariadb');
|
||||||
metaphon('mariadb')
|
metaphon('mariadb')
|
||||||
|
@ -31,7 +31,7 @@ CREATE OR REPLACE TABLE t1(id INT);
|
|||||||
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
|
ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1'
|
||||||
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
|
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
|
||||||
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.proc1'
|
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.proc1'
|
||||||
CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "udf_example.so";
|
CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql'
|
ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'mysql'
|
||||||
CREATE OR REPLACE FUNCTION hello(str char(20)) RETURNS TEXT RETURN CONCAT('Hello, ', str, '!');
|
CREATE OR REPLACE FUNCTION hello(str char(20)) RETURNS TEXT RETURN CONCAT('Hello, ', str, '!');
|
||||||
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.hello'
|
ERROR 42000: alter routine command denied to user 'mysqltest_1'@'localhost' for routine 'db1.hello'
|
||||||
|
@ -4,28 +4,28 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
|||||||
SELECT metaphon('master');
|
SELECT metaphon('master');
|
||||||
metaphon('master')
|
metaphon('master')
|
||||||
MSTR
|
MSTR
|
||||||
CREATE FUNCTION metaphon RETURNS INT SONAME "udf_example.so";
|
CREATE FUNCTION metaphon RETURNS INT SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR HY000: Function 'metaphon' already exists
|
ERROR HY000: Function 'metaphon' already exists
|
||||||
SELECT metaphon('slave');
|
SELECT metaphon('slave');
|
||||||
metaphon('slave')
|
metaphon('slave')
|
||||||
SLF
|
SLF
|
||||||
CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1125 Function 'metaphon' already exists
|
Note 1125 Function 'metaphon' already exists
|
||||||
DROP FUNCTION IF EXISTS random_function_name;
|
DROP FUNCTION IF EXISTS random_function_name;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1305 FUNCTION test.random_function_name does not exist
|
Note 1305 FUNCTION test.random_function_name does not exist
|
||||||
CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1125 Function 'metaphon' already exists
|
Note 1125 Function 'metaphon' already exists
|
||||||
CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
|
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
|
||||||
SELECT metaphon('slave');
|
SELECT metaphon('slave');
|
||||||
metaphon('slave')
|
metaphon('slave')
|
||||||
SLF
|
SLF
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
CREATE FUNCTION metaphon RETURNS STRING SONAME "udf_example.so";
|
CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
|
||||||
ERROR HY000: Function 'metaphon' already exists
|
ERROR HY000: Function 'metaphon' already exists
|
||||||
SELECT metaphon('slave');
|
SELECT metaphon('slave');
|
||||||
metaphon('slave')
|
metaphon('slave')
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
|
--source include/have_udf.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT metaphon('master');
|
SELECT metaphon('master');
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
eval CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
@ -15,10 +17,13 @@ SELECT metaphon('slave');
|
|||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
DROP FUNCTION IF EXISTS random_function_name;
|
DROP FUNCTION IF EXISTS random_function_name;
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_WRONG_USAGE
|
--error ER_WRONG_USAGE
|
||||||
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
@ -28,8 +33,10 @@ SELECT metaphon('slave');
|
|||||||
connection master;
|
connection master;
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
--source include/have_udf.inc
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
|
|
||||||
--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
|
--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
|
--source include/have_udf.inc
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
|
CREATE FUNCTION metaphon RETURNS INT SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
@ -15,6 +19,7 @@ DROP FUNCTION IF EXISTS metaphon;
|
|||||||
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION IF NOT EXISTS metaphon RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_WRONG_USAGE
|
--error ER_WRONG_USAGE
|
||||||
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE OR REPLACE FUNCTION IF NOT EXISTS metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
@ -23,6 +28,7 @@ SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
|||||||
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE OR REPLACE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
SELECT ret FROM mysql.func WHERE name like 'metaphon';
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
SELECT metaphon('mariadb');
|
SELECT metaphon('mariadb');
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
--source include/have_udf.inc
|
||||||
# Grant tests not performed with embedded server
|
# Grant tests not performed with embedded server
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
|
|
||||||
@ -44,8 +45,9 @@ CREATE OR REPLACE TABLE t1(id INT);
|
|||||||
--error ER_PROCACCESS_DENIED_ERROR
|
--error ER_PROCACCESS_DENIED_ERROR
|
||||||
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
|
CREATE OR REPLACE PROCEDURE proc1 (OUT cnt INT) BEGIN END;
|
||||||
|
|
||||||
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
--error ER_DBACCESS_DENIED_ERROR
|
--error ER_DBACCESS_DENIED_ERROR
|
||||||
CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "udf_example.so";
|
eval CREATE OR REPLACE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--error ER_PROCACCESS_DENIED_ERROR
|
--error ER_PROCACCESS_DENIED_ERROR
|
||||||
CREATE OR REPLACE FUNCTION hello(str char(20)) RETURNS TEXT RETURN CONCAT('Hello, ', str, '!');
|
CREATE OR REPLACE FUNCTION hello(str char(20)) RETURNS TEXT RETURN CONCAT('Hello, ', str, '!');
|
||||||
|
Reference in New Issue
Block a user