← Back to team overview

maria-developers team mailing list archive

Weekly Report

 

Report for week 4:

Hello!

This week I was able to make INSERT...RETURNING work. It is working fine
for simple insert statement, inserting multiple rows in single statement,
INSERT...SET and INSERT...ON DUPLICATE KEY UPDATE. It is returning the
listed fields, working for alias and operators as well. I was getting
segmentation fault when I was working on this. Zulip messages helped to
solve that problem by cleaning returning_list by calling
returning_list.empty() in mysql_init_select(). I also realised I hadn't
called setup_fields(), setup_wild() and checking if there is '*' for
returning_list in mysql_prepare_insert() which was also causing this error.
Here is a link to the test cases and results for above variants of
INSERT...RETURNING:
https://github.com/rucha174/server/commit/66f8046d615f97a1078c8eedc3cf11d6e3d73344

As for INSERT...SELECT...RETURNING, I passed lex->field_list instead of
returning_list as an argument in prepare(), send_result_set_metadata() and
send_data(). It was returning all the fields from the insert table. Then I
passed
returning_list as the argument and it is returning the listed fields but
from the
select table. So now I am working on it by looking how select_insert class
uses lex->field_list and do the same for returning_list.
Here is the link to code which returns the listed fields for select table:
https://github.com/rucha174/server/commit/6b18dd3cfc76d41871357c5b2006e04d1d508c1d

Regards,
Rucha Deodhar