mariadb/mysql-test/suite/sysschema/t/pr_execute_prepared_stmt.test
2021-03-18 08:02:48 +01:00

25 lines
567 B
Text

-- source include/not_embedded.inc
# Do some valid changes, ensure they are successful
SET @sql := "CREATE TABLE test.t1 (i INT) Engine=MEMORY";
CALL sys.execute_prepared_stmt(@sql);
SHOW CREATE TABLE test.t1;
SET @sql := CONCAT('INSERT INTO test.t1 VALUES (', 1, ')');
CALL sys.execute_prepared_stmt(@sql);
SELECT * FROM test.t1;
SET @sql := "DROP TABLE test.t1";
CALL sys.execute_prepared_stmt(@sql);
SHOW TABLES;
SET @sql = NULL;
# Invalid inputs
-- error S45000
CALL sys.execute_prepared_stmt(NULL);
-- error S45000
CALL sys.execute_prepared_stmt('foo');