Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
At present stored aggregate functions using temporary tables can only be used once within a particular query.
Using the medi_int example from the documentation ( @ https://mariadb.com/kb/en/library/stored-aggregate-functions/ ) one can try:
|
CREATE TABLE t1 (x int, y int);
|
INSERT INTO t1 values (1,1), (2,1), (3,2);
|
|
select medi_int(x) from t1;
|
# works as expected
|
|
select medi_int(x), medi_int(y) from t1;
|
# fails due to temporary table tt already existing, it also fails in such a way that the temporary table 'tt' is left, I've not checked whether one can alter the function to catch the error and clean up the temporary table.
|
|