File: ps_11bugs.result

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (283 lines) | stat: -rw-r--r-- 8,489 bytes parent folder | download | duplicates (4)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
drop table if exists t1, t2;
CREATE TABLE t1(session_id  char(9) NOT NULL);
INSERT INTO t1 VALUES ("abc");
SELECT * FROM t1;
session_id
abc
prepare st_1180 from 'SELECT * FROM t1 WHERE ?="1111" and session_id = "abc"';
set @arg1= 'abc';
execute st_1180 using @arg1;
session_id
set @arg1= '1111';
execute st_1180 using @arg1;
session_id
abc
set @arg1= 'abc';
execute st_1180 using @arg1;
session_id
drop table t1;
create table t1 (
c_01 char(6), c_02 integer, c_03 real, c_04 int(3), c_05 varchar(20),
c_06 date,    c_07 char(1), c_08 real, c_09 int(11), c_10 time,
c_11 char(6), c_12 integer, c_13 real, c_14 int(3), c_15 varchar(20),
c_16 date,    c_17 char(1), c_18 real, c_19 int(11), c_20 text);
prepare st_1644 from 'insert into t1 values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
set @arg01= 'row_1';
set @arg02= 1;
set @arg03= 1.1;
set @arg04= 111;
set @arg05= 'row_one';
set @arg06= '2004-10-12';
set @arg07= '1';
set @arg08= 1.1;
set @arg09= '100100100';
set @arg10= '12:34:56';
set @arg11= 'row_1';
set @arg12= 1;
set @arg13= 1.1;
set @arg14= 111;
set @arg15= 'row_one';
set @arg16= '2004-10-12';
set @arg17= '1';
set @arg18= 1.1;
set @arg19= '100100100';
set @arg20= '12:34:56';
execute st_1644 using @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, @arg09, @arg10,
@arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17, @arg18, @arg19, @arg20;
set @arg01= NULL;
set @arg02= NULL;
set @arg03= NULL;
set @arg04= NULL;
set @arg05= NULL;
set @arg06= NULL;
set @arg07= NULL;
set @arg08= NULL;
set @arg09= NULL;
set @arg10= NULL;
set @arg11= NULL;
set @arg12= NULL;
set @arg13= NULL;
set @arg14= NULL;
set @arg15= NULL;
set @arg16= NULL;
set @arg17= NULL;
set @arg18= NULL;
set @arg19= NULL;
set @arg20= NULL;
execute st_1644 using @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, @arg09, @arg10,
@arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17, @arg18, @arg19, @arg20;
set @arg01= 'row_3';
set @arg02= 3;
set @arg03= 3.3;
set @arg04= 333;
set @arg05= 'row_three';
set @arg06= '2004-10-12';
set @arg07= '3';
set @arg08= 3.3;
set @arg09= '300300300';
set @arg10= '12:34:56';
set @arg11= 'row_3';
set @arg12= 3;
set @arg13= 3.3;
set @arg14= 333;
set @arg15= 'row_three';
set @arg16= '2004-10-12';
set @arg17= '3';
set @arg18= 3.3;
set @arg19= '300300300';
set @arg20= '12:34:56';
execute st_1644 using @arg01, @arg02, @arg03, @arg04, @arg05, @arg06, @arg07, @arg08, @arg09, @arg10,
@arg11, @arg12, @arg13, @arg14, @arg15, @arg16, @arg17, @arg18, @arg19, @arg20;
select * from t1;
c_01	c_02	c_03	c_04	c_05	c_06	c_07	c_08	c_09	c_10	c_11	c_12	c_13	c_14	c_15	c_16	c_17	c_18	c_19	c_20
row_1	1	1.1	111	row_one	2004-10-12	1	1.1	100100100	12:34:56	row_1	1	1.1	111	row_one	2004-10-12	1	1.1	100100100	12:34:56
NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
row_3	3	3.3	333	row_three	2004-10-12	3	3.3	300300300	12:34:56	row_3	3	3.3	333	row_three	2004-10-12	3	3.3	300300300	12:34:56
drop table t1;
create table t1(
cola varchar(50) not null,
colb varchar(8) not null,
colc varchar(12) not null,
cold varchar(2) not null,
primary key (cola, colb, cold));
create table t2(
cola varchar(50) not null,
colb varchar(8) not null,
colc varchar(2) not null,
cold float,
primary key (cold));
insert into t1 values ('aaaa', 'yyyy', 'yyyy-dd-mm', 'R');
insert into t2 values ('aaaa', 'yyyy', 'R', 203), ('bbbb', 'zzzz', 'C', 201);
prepare st_1676 from 'select a.cola, a.colb, a.cold from t1 a, t2 b where a.cola = ? and a.colb = ? and a.cold = ? and b.cola = a.cola and b.colb = a.colb and b.colc = a.cold';
set @arg0= "aaaa";
set @arg1= "yyyy";
set @arg2= "R";
execute st_1676 using @arg0, @arg1, @arg2;
cola	colb	cold
aaaa	yyyy	R
drop table t1, t2;
create table t1 (a int primary key);
insert into t1 values (1);
explain select * from t1 where 3 in (select (1+1) union select 1);
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
2	SUBQUERY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
3	UNION	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
NULL	UNION RESULT	<union2,3>	ALL	NULL	NULL	NULL	NULL	NULL	
select * from t1 where 3 in (select (1+1) union select 1);
a
prepare st_18492 from 'select * from t1 where 3 in (select (1+1) union select 1)';
execute st_18492;
a
drop table t1;
create table t1 (a int, b varchar(4));
create table t2 (a int, b varchar(4), primary key(a));
prepare stmt1 from 'insert into t1 (a, b) values (?, ?)';
prepare stmt2 from 'insert into t2 (a, b) values (?, ?)';
set @intarg= 11;
set @varchararg= '2222';
execute stmt1 using @intarg, @varchararg;
execute stmt2 using @intarg, @varchararg;
set @intarg= 12;
execute stmt1 using @intarg, @UNDEFINED;
execute stmt2 using @intarg, @UNDEFINED;
set @intarg= 13;
execute stmt1 using @UNDEFINED, @varchararg;
execute stmt2 using @UNDEFINED, @varchararg;
ERROR 23000: Column 'a' cannot be null
set @intarg= 14;
set @nullarg= Null;
execute stmt1 using @UNDEFINED, @nullarg;
execute stmt2 using @nullarg, @varchararg;
ERROR 23000: Column 'a' cannot be null
select * from t1;
a	b
11	2222
12	NULL
NULL	2222
NULL	NULL
select * from t2;
a	b
11	2222
12	NULL
drop table t1;
drop table t2;
CREATE TABLE t1 (a INT);
PREPARE stmt FROM 'select 1 from `t1` where `a` = any (select (@@tmpdir))';
EXECUTE stmt;
1
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
CREATE TABLE t2 (a INT PRIMARY KEY);
INSERT INTO t2 VALUES (400000), (400001);
SET @@sort_buffer_size=400000;
CREATE FUNCTION p1(i INT) RETURNS INT
BEGIN
SET @@sort_buffer_size= i;
RETURN i + 1;
END|
SELECT * FROM t2 WHERE a = @@sort_buffer_size AND p1(@@sort_buffer_size + 1) > a - 1;
a
400000
DROP TABLE t2;
DROP FUNCTION p1;
SELECT CONCAT(@@sort_buffer_size);
CONCAT(@@sort_buffer_size)
400001
SELECT LEFT("12345", @@ft_boolean_syntax);
LEFT("12345", @@ft_boolean_syntax)

Warnings:
Warning	1292	Truncated incorrect INTEGER value: '+ -><()~*:""&|'
SET @@sort_buffer_size=DEFAULT;
End of 5.0 tests.
# Start of 10.5 tests
#
# MDEV-25593 Assertion `0' failed in Type_handler_temporal_result::Item_get_date on double EXECUTE
#
SET time_zone='+00:00';
SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
PREPARE stmt FROM 'SELECT ? AS c1';
EXECUTE stmt USING current_timestamp;
c1
2001-01-01 10:20:30
EXECUTE stmt USING @unknown;
c1
NULL
DEALLOCATE PREPARE stmt;
PREPARE stmt FROM 'SELECT ? AS c1 FROM DUAL';
EXECUTE stmt USING current_time;
c1
10:20:30
EXECUTE stmt USING DEFAULT;
c1
NULL
DEALLOCATE PREPARE stmt;
PREPARE stmt FROM 'SELECT ? AS c1 FROM DUAL';
EXECUTE stmt USING current_time;
c1
10:20:30
EXECUTE stmt USING IGNORE;
c1
NULL
DEALLOCATE PREPARE stmt;
PREPARE stmt FROM "SELECT DATE('') between''AND ? AS c1";
EXECUTE stmt USING current_time;
c1
1
Warnings:
Warning	1292	Truncated incorrect datetime value: ''
Warning	1292	Truncated incorrect datetime value: ''
EXECUTE stmt USING @unknown;
c1
NULL
Warnings:
Warning	1292	Truncated incorrect datetime value: ''
Warning	1292	Truncated incorrect datetime value: ''
DEALLOCATE PREPARE stmt;
PREPARE stmt FROM 'SELECT CONCAT(UNIX_TIMESTAMP(?)) AS c1';
EXECUTE stmt USING CURRENT_TIMESTAMP;
c1
978344430
EXECUTE stmt USING @unknown;
c1
NULL
DEALLOCATE PREPARE stmt;
SET timestamp=DEFAULT;
SET time_zone=DEFAULT;
#
# MDEV-35596 Assertion `type_handler()->result_type() == value.type_handler()->result_type()' failed in virtual bool Item_param::get_date(THD*, MYSQL_TIME*, date_mode_t)
#
CREATE TABLE t (c TIMESTAMP);
PREPARE s FROM 'DELETE FROM t WHERE c=?';
EXECUTE s USING 1;
INSERT INTO t (c) VALUES (now());
EXECUTE s USING NULL;
DROP TABLE t;
CREATE TABLE t (c TIMESTAMP);
INSERT INTO t (c) VALUES ('2001-01-01 10:20:30');
PREPARE s FROM 'DELETE FROM t WHERE c=?';
EXECUTE s USING 1;
Warnings:
Warning	1292	Truncated incorrect datetime value: '1'
EXECUTE s USING NULL;
DROP TABLE t;
CREATE TABLE t (c TIMESTAMP);
INSERT INTO t (c) VALUES ('2001-01-01 10:20:30');
PREPARE s FROM 'DELETE FROM t WHERE c=?';
EXECUTE s USING 1;
Warnings:
Warning	1292	Truncated incorrect datetime value: '1'
EXECUTE s USING DEFAULT;
ERROR HY000: Default/ignore value is not supported for such parameter usage
DROP TABLE t;
CREATE TABLE t (c TIMESTAMP);
INSERT INTO t (c) VALUES ('2001-01-01 10:20:30');
PREPARE s FROM 'DELETE FROM t WHERE c=?';
EXECUTE s USING 1;
Warnings:
Warning	1292	Truncated incorrect datetime value: '1'
EXECUTE s USING IGNORE;
ERROR HY000: Default/ignore value is not supported for such parameter usage
DROP TABLE t;
# End of 10.5 tests