maria-developers team mailing list archive
Mailing list archive
GSoc weekly reports (Aggregate Functions)
Here is the week 2 report
dire = mariadb/server
task - adding 'aggregate' field to the mysql.proc table.
1) aggregate field ---> mysql.proc table
2)create function -----> aggregate and non-aggregate
3)show create function ----> aggregate and non-aggregate
4)drop function -----> aggregate and non-aggregate
5)alter function -----> aggregate and non-aggregate
For the user he has two options for AGGREGATE (TRUE,FALSE);
1) Added the field 'aggregate' to the proc table .
Order should be maintained for the fields added.
2) Also included the column in the enumberation of db storage.
3) Added a new is_aggregate characteristic to the lex structure, which
would help in identifying if a function is aggregate or not.
4) So after parsing the CREATE FUNCTION query ,adding to the table YES if
function is aggregate else adding NO to the proc table.
5) SHOW FUNCTION query to load the aggregate field. We have the
is_aggregate field to load the value in it.
6) DROP FUNCTION, required no changes to be made as the primary key does
not have the aggregate field
7) ALTER FUNCTION , required adding the syntax for the AGGREGATE
characteristic , so rules were added to add this additional alter
characteristic. Then we had to update the routine row in the proc
table for all the field that are going to be altered . So we store the new
altered fields to the proc table for the stated fields.