mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Last slice of fix for Bug#42003 tests missing the disconnect of connections <> default
+ Fix for Bug#43114 wait_until_count_sessions too restrictive, random PB failures + Removal of a lot of other weaknesses found + modifications according to review
This commit is contained in:
@ -1667,9 +1667,9 @@ INSERT INTO t2 VALUES (4,3,'n');
|
||||
INSERT INTO t2 VALUES (6,1,'n');
|
||||
INSERT INTO t2 VALUES (8,1,'y');
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
SELECT a.col1,a.col2,b.col2,b.col3
|
||||
SELECT a.col1,a.col2,b.col2,b.col3
|
||||
FROM t1 a LEFT JOIN t2 b ON a.col1=b.col1
|
||||
WHERE b.col2 IS NULL OR
|
||||
WHERE b.col2 IS NULL OR
|
||||
b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1);
|
||||
col1 col2 col2 col3
|
||||
1 trudy 2 y
|
||||
@ -1681,9 +1681,9 @@ col1 col2 col2 col3
|
||||
7 carsten NULL NULL
|
||||
8 ranger 1 y
|
||||
10 matt NULL NULL
|
||||
SELECT a.col1,a.col2,b.col2,b.col3
|
||||
SELECT a.col1,a.col2,b.col2,b.col3
|
||||
FROM v1 a LEFT JOIN t2 b ON a.col1=b.col1
|
||||
WHERE b.col2 IS NULL OR
|
||||
WHERE b.col2 IS NULL OR
|
||||
b.col2=(SELECT MAX(col2) FROM t2 b WHERE b.col1=a.col1);
|
||||
col1 col2 col2 col3
|
||||
1 trudy 2 y
|
||||
@ -1737,7 +1737,7 @@ A A
|
||||
2 2
|
||||
3 3
|
||||
create table t3 as select a a,a b from t2;
|
||||
create view v2 as select * from t3 where
|
||||
create view v2 as select * from t3 where
|
||||
a in (select * from t1) or b in (select * from t2);
|
||||
select * from v2 A, v2 B where A.a = B.b;
|
||||
a b a b
|
||||
@ -1993,7 +1993,7 @@ dkjhgd
|
||||
drop view v1;
|
||||
create table t1 (f59 int, f60 int, f61 int);
|
||||
insert into t1 values (19,41,32);
|
||||
create view v1 as select f59, f60 from t1 where f59 in
|
||||
create view v1 as select f59, f60 from t1 where f59 in
|
||||
(select f59 from t1);
|
||||
update v1 set f60=2345;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
@ -2120,7 +2120,7 @@ pid int NOT NULL
|
||||
INSERT INTO t1 VALUES(1,'a','b'), (2,'c','d');
|
||||
INSERT INTO t2 values (1,1), (2,1), (2,2);
|
||||
CREATE VIEW v1 AS SELECT t1.*,t2.pid FROM t1,t2 WHERE t1.aid = t2.aid;
|
||||
SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2
|
||||
SELECT pid,GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1) FROM t1,t2
|
||||
WHERE t1.aid = t2.aid GROUP BY pid;
|
||||
pid GROUP_CONCAT(CONCAT(fn,' ',ln) ORDER BY 1)
|
||||
1 a b,c d
|
||||
@ -2222,7 +2222,7 @@ group_name varchar(32) NOT NULL
|
||||
) engine = InnoDB;
|
||||
create table t2 (
|
||||
r_object_id char(16) NOT NULL,
|
||||
i_position int(11) NOT NULL,
|
||||
i_position int(11) NOT NULL,
|
||||
users_names varchar(32) default NULL
|
||||
) Engine = InnoDB;
|
||||
create view v1 as select r_object_id, group_name from t1;
|
||||
@ -2235,7 +2235,7 @@ insert into t1 values('120001a080000542','tstgroup1');
|
||||
insert into t2 values('120001a080000542',-1, 'guser01');
|
||||
insert into t2 values('120001a080000542',-2, 'guser02');
|
||||
select v1.r_object_id, v2.users_names from v1, v2
|
||||
where (v1.group_name='tstgroup1') and v2.r_object_id=v1.r_object_id
|
||||
where (v1.group_name='tstgroup1') and v2.r_object_id=v1.r_object_id
|
||||
order by users_names;
|
||||
r_object_id users_names
|
||||
120001a080000542 guser01
|
||||
@ -2385,8 +2385,8 @@ create table t4 (x int, y int, z int);
|
||||
create view v1 as
|
||||
select t1.x
|
||||
from (
|
||||
(t1 join t2 on ((t1.y = t2.y)))
|
||||
join
|
||||
(t1 join t2 on ((t1.y = t2.y)))
|
||||
join
|
||||
(t3 left join t4 on (t3.y = t4.y) and (t3.z = t4.z))
|
||||
);
|
||||
prepare stmt1 from "select count(*) from v1 where x = ?";
|
||||
@ -2562,12 +2562,12 @@ Warnings:
|
||||
Warning 1052 Column 'x' in group statement is ambiguous
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
drop table if exists t1;
|
||||
drop view if exists v1;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
show create view v1;
|
||||
drop table if exists t1;
|
||||
drop view if exists v1;
|
||||
create table t1 (id int);
|
||||
create view v1 as select * from t1;
|
||||
drop table t1;
|
||||
show create view v1;
|
||||
drop view v1;
|
||||
//
|
||||
View Create View
|
||||
@ -2614,7 +2614,7 @@ DROP VIEW v2;
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
|
||||
td date DEFAULT NULL, KEY idx(td));
|
||||
INSERT INTO t1 VALUES
|
||||
INSERT INTO t1 VALUES
|
||||
(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
|
||||
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
|
||||
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
|
||||
@ -2978,10 +2978,10 @@ drop view v1;
|
||||
drop table t1;
|
||||
CREATE TABLE t1(pk int PRIMARY KEY);
|
||||
CREATE TABLE t2(pk int PRIMARY KEY, fk int, ver int, org int);
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS
|
||||
CREATE ALGORITHM=MERGE VIEW v1 AS
|
||||
SELECT t1.*
|
||||
FROM t1 JOIN t2
|
||||
ON t2.fk = t1.pk AND
|
||||
FROM t1 JOIN t2
|
||||
ON t2.fk = t1.pk AND
|
||||
t2.ver = (SELECT MAX(t.ver) FROM t2 t WHERE t.org = t2.org);
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
@ -3311,7 +3311,7 @@ name char(10) NOT NULL
|
||||
INSERT INTO t1 (lid, name) VALUES
|
||||
(1, 'YES'), (2, 'NO');
|
||||
CREATE TABLE t2 (
|
||||
id int NOT NULL PRIMARY KEY,
|
||||
id int NOT NULL PRIMARY KEY,
|
||||
gid int NOT NULL,
|
||||
lid int NOT NULL,
|
||||
dt date
|
||||
@ -3410,8 +3410,8 @@ CREATE TABLE t1 (id int);
|
||||
CREATE TABLE t2 (id int, c int DEFAULT 0);
|
||||
INSERT INTO t1 (id) VALUES (1);
|
||||
INSERT INTO t2 (id) VALUES (1);
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t2.c FROM t1, t2
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t2.c FROM t1, t2
|
||||
WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION;
|
||||
UPDATE v1 SET c=1;
|
||||
DROP VIEW v1;
|
||||
@ -3519,7 +3519,7 @@ role_name varchar(100) default NULL,
|
||||
app_name varchar(40) NOT NULL,
|
||||
INDEX idx_app_name(app_name)
|
||||
);
|
||||
CREATE VIEW v1 AS
|
||||
CREATE VIEW v1 AS
|
||||
SELECT profile.person_id AS person_id
|
||||
FROM t1 profile, t2 userrole, t3 role
|
||||
WHERE userrole.person_id = profile.person_id AND
|
||||
@ -3531,7 +3531,7 @@ INSERT INTO t1 VALUES
|
||||
(-717462680,'ENTS Ta','0'), (-904346964,'ndard SQL\n','0');
|
||||
INSERT INTO t2 VALUES
|
||||
(1,3,6),(2,4,7),(3,5,8),(4,6,9),(5,1,6),(6,1,7),(7,1,8),(8,1,9),(9,1,10);
|
||||
INSERT INTO t3 VALUES
|
||||
INSERT INTO t3 VALUES
|
||||
(1,'NUCANS_APP_USER','NUCANSAPP'),(2,'NUCANS_TRGAPP_USER','NUCANSAPP'),
|
||||
(3,'IA_INTAKE_COORDINATOR','IACANS'),(4,'IA_SCREENER','IACANS'),
|
||||
(5,'IA_SUPERVISOR','IACANS'),(6,'IA_READONLY','IACANS'),
|
||||
@ -3557,7 +3557,7 @@ i
|
||||
2
|
||||
3
|
||||
4
|
||||
select table_name, is_updatable from information_schema.views
|
||||
select table_name, is_updatable from information_schema.views
|
||||
where table_name = 'v1';
|
||||
table_name is_updatable
|
||||
v1 NO
|
||||
@ -3603,8 +3603,8 @@ DROP VIEW v2;
|
||||
DROP VIEW v3;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#29477: Not all fields of the target table were checked to have
|
||||
# a default value when inserting into a view.
|
||||
# Bug#29477 Not all fields of the target table were checked to have
|
||||
# a default value when inserting into a view.
|
||||
#
|
||||
create table t1(f1 int, f2 int not null);
|
||||
create view v1 as select f1 from t1;
|
||||
@ -3621,7 +3621,7 @@ drop table t1;
|
||||
create table t1 (a int, key(a));
|
||||
create table t2 (c int);
|
||||
create view v1 as select a b from t1;
|
||||
create view v2 as select 1 a from t2, v1 where c in
|
||||
create view v2 as select 1 a from t2, v1 where c in
|
||||
(select 1 from t1 where b = a);
|
||||
insert into t1 values (1), (1);
|
||||
insert into t2 values (1), (1);
|
||||
@ -3643,7 +3643,7 @@ MAX(a) COUNT(DISTINCT a)
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- Bug#34337: Server crash when Altering a view using a table name.
|
||||
# -- Bug#34337 Server crash when Altering a view using a table name.
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
@ -3660,8 +3660,8 @@ DROP TABLE t1;
|
||||
# -- End of test case for Bug#34337.
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# -- Bug#35193: VIEW query is rewritten without "FROM DUAL",
|
||||
# -- causing syntax error
|
||||
# -- Bug#35193 VIEW query is rewritten without "FROM DUAL",
|
||||
# -- causing syntax error
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1;
|
||||
|
Reference in New Issue
Block a user