summaryrefslogtreecommitdiff
path: root/mysql-test/r/sql_buffer_result_func.result
blob: 38d7f7ecc0abb08277090581d1f522cb34eb3c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
** Setup **

SET @original_sql_buffer_result = @@sql_buffer_result;
CREATE TEMPORARY TABLE t1(a varchar(20), b varchar(20));
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
INSERT INTO t1 VALUES('aa','bb');
'#--------------------FN_DYNVARS_156_01-------------------------#'
SET SESSION sql_buffer_result = 1;
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name	Value
Created_tmp_tables	0
Expected value : 0.
SELECT * FROM t1;
a	b
aa	bb
aa	bb
aa	bb
aa	bb
aa	bb
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name	Value
Created_tmp_tables	1
Expected value : 1.
SELECT * FROM t1;
a	b
aa	bb
aa	bb
aa	bb
aa	bb
aa	bb
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name	Value
Created_tmp_tables	2
Expected value : 2.
'#--------------------FN_DYNVARS_156_02-------------------------#'
SET SESSION sql_buffer_result = 0;
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name	Value
Created_tmp_tables	2
Expected value : 2.
SELECT * FROM t1;
a	b
aa	bb
aa	bb
aa	bb
aa	bb
aa	bb
SHOW STATUS LIKE 'Created_tmp_tables';
Variable_name	Value
Created_tmp_tables	2
Expected value : 2.
'#--------------------FN_DYNVARS_156_03-------------------------#'
** Connecting con_int1 using root **
** Connection con_int1 **
SELECT @@SESSION.sql_buffer_result;
@@SESSION.sql_buffer_result
0
0 / FALSE Expected
SET SESSION sql_buffer_result = FALSE;
** Connecting con_int2 using root **
** Connection con_int2 **
SELECT @@SESSION.sql_buffer_result;
@@SESSION.sql_buffer_result
0
0 / FALSE Expected
SET SESSION sql_buffer_result = TRUE;
** Connection con_int1 **
SELECT @@SESSION.sql_buffer_result;
@@SESSION.sql_buffer_result
0
0 / FALSE Expected
** Connection con_int2 **
SELECT @@SESSION.sql_buffer_result;
@@SESSION.sql_buffer_result
1
1 / TRUE Expected
** Connection default **
Disconnecting Connections con_int1, con_int2
** Cleanup **
SET @@sql_buffer_result = @original_sql_buffer_result;
DROP TABLE t1;