summaryrefslogtreecommitdiff
path: root/mysql-test/r/max_prepared_stmt_count_func.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2008-10-10 18:28:41 +0300
committerMichael Widenius <monty@mysql.com>2008-10-10 18:28:41 +0300
commitf47e003e1bfc56c2bf5d0f144a35517f526b538b (patch)
treee2bfb9834c6e558381465ed2f57a9d873a9b2c90 /mysql-test/r/max_prepared_stmt_count_func.result
parent51a92bbb03cc58ab8688fa9d8226afe32e6156ca (diff)
parent9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff)
downloadmariadb-git-f47e003e1bfc56c2bf5d0f144a35517f526b538b.tar.gz
Merged 5.1 with maria 5.1
Diffstat (limited to 'mysql-test/r/max_prepared_stmt_count_func.result')
-rw-r--r--mysql-test/r/max_prepared_stmt_count_func.result82
1 files changed, 82 insertions, 0 deletions
diff --git a/mysql-test/r/max_prepared_stmt_count_func.result b/mysql-test/r/max_prepared_stmt_count_func.result
new file mode 100644
index 00000000000..562ef63f811
--- /dev/null
+++ b/mysql-test/r/max_prepared_stmt_count_func.result
@@ -0,0 +1,82 @@
+** Setup **
+
+SET @global_max_prepared_stmt_count = @@global.max_prepared_stmt_count;
+'#---------------------FN_DYNVARS_031_01----------------------#'
+SET GLOBAL max_prepared_stmt_count=2;
+** Prepare statements **
+PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 2)
+Expected error "Max prepared statements count reached"
+SHOW STATUS like 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 2
+2 Expected
+'#---------------------FN_DYNVARS_031_02----------------------#'
+SET GLOBAL max_prepared_stmt_count=0;
+PREPARE stmt3 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
+Expected error "Max prepared statements count reached"
+SHOW STATUS like 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 2
+2 Expected
+PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
+ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
+Expected error "Max prepared statements count reached"
+SHOW STATUS like 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
+2 Expected
+'Bug#35389 A pre existing valid prepared statement DROPS if a PREPARE'
+'STATEMENT command is issued with the same name that'
+'causes ER_MAX_PREPARED_STMT_COUNT_REACHED error'
+'#---------------------FN_DYNVARS_031_03----------------------#'
+SHOW STATUS like 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
+SET GLOBAL max_prepared_stmt_count=4;
+PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt3 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+** Value of prepared stmt'
+SHOW STATUS LIKE 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 4
+4 Expected
+'#---------------------FN_DYNVARS_031_04----------------------#'
+** preparing stmts **
+PREPARE stmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt1 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+PREPARE stmt2 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+** setting value **
+SET GLOBAL max_prepared_stmt_count=3;
+** Check wether any more statements can be prepared **
+PREPARE stmt5 from "SELECT * FROM information_schema.CHARACTER_SETS C";
+ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
+Expected error "Max prepared statements count reached"
+SHOW STATUS LIKE 'Prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 4
+4 Expected
+'#---------------------FN_DYNVARS_031_05----------------------#'
+SET GLOBAL max_prepared_stmt_count=3;
+** Creating procedure **
+DROP PROCEDURE IF EXISTS sp_checkstmts;
+Warnings:
+Note 1305 PROCEDURE sp_checkstmts does not exist
+CREATE PROCEDURE sp_checkstmts ()
+BEGIN
+PREPARE newstmt from "SELECT * FROM information_schema.CHARACTER_SETS C";
+END //
+CALL sp_checkstmts();
+ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
+Expected error "Max prepared statements count reached"
+DROP PREPARE stmt;
+DROP PREPARE stmt1;
+DROP PREPARE stmt2;
+DROP PREPARE stmt3;
+DROP PROCEDURE sp_checkstmts;
+SET @@global.max_prepared_stmt_count = @global_max_prepared_stmt_count;