Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  path_embed_recurse.result   Sprache: Lisp

 

#
# MDEV-34391 Path resolution
# Path embedding with recursive routines
#
CREATE DATABASE test2;
CREATE FUNCTION test2.func2(val INT, t TEXT) RETURNS TEXT
BEGIN
SET val:= val - 1;
IF val = 0 THEN
RETURN CONCAT(t, CAST(val AS CHAR(4)));
END IF;
RETURN func2(val, CONCAT(t, CAST(val AS CHAR(4))));
END;
/
CREATE PROCEDURE test2.proc2(val INT, t TEXT)
BEGIN
SET val:= val - 1;
IF val = 0 THEN
SELECT CONCAT(t, CAST(val AS CHAR(4)));
ELSE
CALL proc2(val, CONCAT(t, CAST(val AS CHAR(4))));
END IF;
END;
/
SET PATH 'test2'/
CREATE FUNCTION ff() RETURNS TEXT
BEGIN
RETURN func2(5, '');
END;
/
CREATE PROCEDURE pp()
BEGIN
CALL proc2(5, '');
END;
/
SET PATH 'CURRENT_SCHEMA';
SELECT ff();
ERROR HY000: Recursive stored functions and triggers are not allowed
SELECT ff();
ERROR HY000: Recursive stored functions and triggers are not allowed
CALL pp();
ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine proc2
CALL pp();
ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine proc2
SET max_sp_recursion_depth=10;
CALL pp();
CONCAT(t, CAST(val AS CHAR(4)))
43210
CALL pp();
CONCAT(t, CAST(val AS CHAR(4)))
43210
SET max_sp_recursion_depth=0;
DROP FUNCTION ff;
DROP PROCEDURE pp;
SET PATH 'test';
CREATE FUNCTION test2.f(t TEXT) RETURNS TEXT
RETURN f(CONCAT(t, ' >> test2.f'));
CREATE FUNCTION f(t TEXT) RETURNS TEXT
RETURN CONCAT(t, ' >> test.f');
SELECT test2.f('*');
test2.f('*')
* >> test2.f >> test.f
DROP DATABASE test2;
DROP FUNCTION f;
#
# MDEV-38483 UBSAN: SIGSEGV in Sp_handler::db_load_routine | Sp_handler::db_find_routine
#
set path 'test';
create procedure p() call p(sleep(1));
call p();
ERROR HY000: Recursive limit 0 (as set by the max_sp_recursion_depth variable) was exceeded for routine p
drop procedure p;
set path 'current_schema';

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

¤ Dauer der Verarbeitung: 0.11 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=1867298