mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed 3 valgrind bugs.
Two of them (in the function make_join_statistics and in the function sort_and_filter_keyuse) were due to bad merges while the third bug was triggered by uninitialized values of the field JOIN_TAB::preread_init_done. Fixed a compiler warning in mysql_priv.h. Commented out some queries from the funcs_1 suite returning wrong errors due to bugs concerning updatable views (see bugs 784297 and 784303). Adjusted some results for the test cases with derived tables from different suites.
This commit is contained in:
@ -22339,74 +22339,38 @@ SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1
|
||||
CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM v2;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
Drop TABLE t1, t2 ;
|
||||
Drop VIEW v2 ;
|
||||
|
@ -22341,74 +22341,38 @@ SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1
|
||||
CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1);
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM v2;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f61 FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM t1 HAVING f61 > 0;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT f61 FROM t1 GROUP BY f61;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT SUM(f59) AS f61 FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT DISTINCTROW(f61) FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
CREATE VIEW v1 AS SELECT DISTINCT(f61) FROM t1;
|
||||
INSERT INTO v1 VALUES (1002);
|
||||
ERROR HY000: The target table v1 of the INSERT is not insertable-into
|
||||
UPDATE v1 SET f61=1007;
|
||||
ERROR HY000: The target table v1 of the UPDATE is not updatable
|
||||
DELETE FROM v1;
|
||||
ERROR HY000: The target table v1 of the DELETE is not updatable
|
||||
DROP VIEW v1;
|
||||
Drop TABLE t1, t2 ;
|
||||
Drop VIEW v2 ;
|
||||
|
@ -52,8 +52,6 @@ DROP TABLE test.t_processlist;
|
||||
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
|
||||
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
|
||||
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
|
||||
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
|
||||
DROP VIEW test.v_processlist;
|
||||
UPDATE processlist SET user='any_user' WHERE id=1 ;
|
||||
ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
|
||||
@ -120,8 +118,6 @@ DROP TABLE test.t_processlist;
|
||||
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist WITH CHECK OPTION;
|
||||
ERROR HY000: CHECK OPTION on non-updatable view 'test.v_processlist'
|
||||
CREATE VIEW test.v_processlist (ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS) AS SELECT * FROM processlist;
|
||||
UPDATE test.v_processlist SET TIME=NOW() WHERE id = 1;
|
||||
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
|
||||
DROP VIEW test.v_processlist;
|
||||
UPDATE processlist SET user='any_user' WHERE id=1 ;
|
||||
ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema'
|
||||
|
Reference in New Issue
Block a user