summaryrefslogtreecommitdiff
path: root/mysql-test/r/ps.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/ps.result')
-rw-r--r--mysql-test/r/ps.result119
1 files changed, 70 insertions, 49 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 003e57edb8e..234c12955d9 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -795,12 +795,12 @@ set @old_max_prepared_stmt_count= @@max_prepared_stmt_count;
show variables like 'max_prepared_stmt_count';
Variable_name Value
max_prepared_stmt_count 16382
-show variables like 'prepared_stmt_count';
+show status like 'prepared_stmt_count';
Variable_name Value
-prepared_stmt_count 0
-select @@max_prepared_stmt_count, @@prepared_stmt_count;
-@@max_prepared_stmt_count @@prepared_stmt_count
-16382 0
+Prepared_stmt_count 0
+select @@max_prepared_stmt_count;
+@@max_prepared_stmt_count
+16382
set global max_prepared_stmt_count=-1;
select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
@@ -819,67 +819,70 @@ set max_prepared_stmt_count=1;
ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL
set local max_prepared_stmt_count=1;
ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL
-set local prepared_stmt_count=0;
-ERROR HY000: Variable 'prepared_stmt_count' is a read only variable
-set @@prepared_stmt_count=0;
-ERROR HY000: Variable 'prepared_stmt_count' is a read only variable
-set global prepared_stmt_count=1;
-ERROR HY000: Variable 'prepared_stmt_count' is a read only variable
set global max_prepared_stmt_count=1;
select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
1
set global max_prepared_stmt_count=0;
-select @@max_prepared_stmt_count, @@prepared_stmt_count;
-@@max_prepared_stmt_count @@prepared_stmt_count
-0 0
+select @@max_prepared_stmt_count;
+@@max_prepared_stmt_count
+0
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
prepare stmt from "select 1";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-0
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
set global max_prepared_stmt_count=1;
prepare stmt from "select 1";
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-1
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
prepare stmt1 from "select 1";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 1)
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-1
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
deallocate prepare stmt;
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-0
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
prepare stmt from "select 1";
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-1
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
prepare stmt from "select 2";
-select @@prepared_stmt_count;
-@@prepared_stmt_count
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 1
+select @@max_prepared_stmt_count;
+@@max_prepared_stmt_count
1
-select @@prepared_stmt_count, @@max_prepared_stmt_count;
-@@prepared_stmt_count @@max_prepared_stmt_count
-1 1
set global max_prepared_stmt_count=0;
prepare stmt from "select 1";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
execute stmt;
ERROR HY000: Unknown prepared statement handler (stmt) given to EXECUTE
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-0
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
prepare stmt from "select 1";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 0)
-select @@prepared_stmt_count;
-@@prepared_stmt_count
-0
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
set global max_prepared_stmt_count=3;
-select @@max_prepared_stmt_count, @@prepared_stmt_count;
-@@max_prepared_stmt_count @@prepared_stmt_count
-3 0
+select @@max_prepared_stmt_count;
+@@max_prepared_stmt_count
+3
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 0
prepare stmt from "select 1";
prepare stmt from "select 2";
prepare stmt1 from "select 3";
@@ -887,13 +890,13 @@ prepare stmt2 from "select 4";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
prepare stmt2 from "select 4";
ERROR 42000: Can't create more than max_prepared_stmt_count statements (current value: 3)
-select @@max_prepared_stmt_count, @@prepared_stmt_count;
-@@max_prepared_stmt_count @@prepared_stmt_count
-3 3
+select @@max_prepared_stmt_count;
+@@max_prepared_stmt_count
+3
+show status like 'prepared_stmt_count';
+Variable_name Value
+Prepared_stmt_count 3
deallocate prepare stmt;
-select @@max_prepared_stmt_count, @@prepared_stmt_count;
-@@max_prepared_stmt_count @@prepared_stmt_count
-3 0
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
drop table if exists t1;
create temporary table if not exists t1 (a1 int);
@@ -1475,6 +1478,24 @@ i
1
DEALLOCATE PREPARE stmt;
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (1), (2);
+SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i
+WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1);
+i
+1
+PREPARE stmt FROM "SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i
+WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1)";
+EXECUTE stmt;
+i
+1
+EXECUTE stmt;
+i
+1
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1;
DROP PROCEDURE IF EXISTS p1;
flush status;
prepare sq from 'show status like "slow_queries"';