File: sp-bugs2.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 (62 lines) | stat: -rw-r--r-- 1,738 bytes parent folder | download
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
CREATE TABLE t1 (i INT);
SET @a = 2;
CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM 
AS SELECT * FROM t1;
CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM 
AS SELECT * FROM t1;
Warnings:
Note	1050	Table 't2' already exists
DROP TABLE t2;
CREATE PROCEDURE sp()
BEGIN
REPEAT 
CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM 
AS SELECT * FROM t1; 
SET @a = @a - 1; 
UNTIL @a = 0 
END REPEAT ;
END |
CALL sp();
Warnings:
Note	1050	Table 't2' already exists
DROP PROCEDURE sp;
DROP TABLE t1, t2;
#
# MDEV-36979 Same alias name with different case on same table is not working in functions
#
create table t1 ( id int primary key auto_increment, name varchar(10));
insert into t1 (name) values ('wrbyviwb');
insert into t1 (name) values ('wrbyrwb1');
insert into t1 (name) values ('wrbrwb3');
select cnt.name from t1 cnt join ( select CMT.id from t1 CMT where CMT.id=1) t2 on t2.id=cnt.id;
name
wrbyviwb
create function t1test(val int) returns varchar(400) charset utf8
begin
declare output varchar(400) default '';
set output = (select cnt.name from t1 cnt join ( select CMT.id from t1 CMT where CMT.id=val) t2 on t2.id=cnt.id);
return output;
end//
select t1test(1);
t1test(1)
wrbyviwb
drop function t1test;
drop table t1;
#
# MDEV-36814 MariaDB 10.11.9 Signal 11 crash on second Stored Procedure call
#
set names utf8;
create table t1 (a varchar(1000));
create procedure p1(in p_a varchar(1000)) insert into t1 values (p_a);//
create procedure p2(in s varchar(10))
begin
if s = '1' then set @startDate = now(); end if;
if s = '2' then set @startDate = '2025-05-23'; end if;
call p1(concat(s, @startDate, ' and '));
end;//
call p2('1');
call p2('2');
drop table t1;
drop procedure p1;
drop procedure p2;
# End of 10.11 tests