mariadb/mysql-test/suite/sysschema/r/pr_execute_prepared_stmt.result

22 lines
719 B
Text
Raw Permalink Normal View History

2021-03-03 10:35:25 +01:00
SET @sql := "CREATE TABLE test.t1 (i INT) Engine=MEMORY";
CALL sys.execute_prepared_stmt(@sql);
SHOW CREATE TABLE test.t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
2021-03-03 10:35:25 +01:00
SET @sql := CONCAT('INSERT INTO test.t1 VALUES (', 1, ')');
CALL sys.execute_prepared_stmt(@sql);
SELECT * FROM test.t1;
i
1
SET @sql := "DROP TABLE test.t1";
CALL sys.execute_prepared_stmt(@sql);
SHOW TABLES;
Tables_in_test
SET @sql = NULL;
CALL sys.execute_prepared_stmt(NULL);
ERROR 45000: The @sys.execute_prepared_stmt.sql must contain a query
CALL sys.execute_prepared_stmt('foo');
ERROR 45000: The @sys.execute_prepared_stmt.sql must contain a query