Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  ps_in_func-view.result   Sprache: Lisp

 

#
# MDEV-39518 Allow prepared statements in stored functions in assignment right hand
#
#
# MDEV-41019 Crash on PS with CREATE VIEW with function calling another PS
#
#
# A VIEW with a stored function containing PS (on its own, or through
# another function can be created using direct or prepared execution.
# But SELECT queries to such VIEWs are not allowed.
#
#
# VIEW -> f1_with_ps()
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (10);
CREATE FUNCTION f1() RETURNS INT
BEGIN
EXECUTE IMMEDIATE 'UPDATE t1 SET a=11';
UPDATE t1 SET a=11;
RETURN ROW_COUNT();
END;
$$
CREATE VIEW v1 AS SELECT f1() AS c1;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `f1`() AS `c1` latin1 latin1_swedish_ci
SELECT * FROM v1;
ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
DROP VIEW v1;
EXECUTE IMMEDIATE 'CREATE VIEW v1 AS SELECT f1() AS c1';
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `f1`() AS `c1` latin1 latin1_swedish_ci
SELECT * FROM v1;
ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
DROP VIEW v1;
SELECT * FROM t1;
a
10
DROP FUNCTION f1;
DROP TABLE t1;
# VEIW -> f1_without_ps() -> f2_with_ps()
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (10);
CREATE FUNCTION f1() RETURNS INT
BEGIN
EXECUTE IMMEDIATE 'UPDATE t1 SET a=11';
UPDATE t1 SET a=11;
RETURN ROW_COUNT();
END;
$$
CREATE FUNCTION f2() RETURNS INT
BEGIN
DECLARE nrows INT;
SET nrows= f1();
RETURN nrows;
END;
$$
CREATE VIEW v1 AS SELECT f2() AS c1;
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `f2`() AS `c1` latin1 latin1_swedish_ci
SELECT * FROM v1;
ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
DROP VIEW v1;
EXECUTE IMMEDIATE 'CREATE VIEW v1 AS SELECT f2() AS c1';
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `f2`() AS `c1` latin1 latin1_swedish_ci
SELECT * FROM v1;
ERROR 0A000: Dynamic SQL is not allowed in stored function or trigger
DROP VIEW v1;
DROP FUNCTION f2;
DROP FUNCTION f1;
DROP TABLE t1;
# End of 13.1 tests

Messung V0.5 in Prozent
C=51 H=100 G=79

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-10-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1897691