maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11903
Weekly Report
Report for week 7:
Hello!
This week I worked on the initial review for INSERT...RETURNING. I removed
some lines from my code, used select_result* instead of using
with_returning_list, improved formatting, restored the structure of
SQL_I_List by removing *saved_first, moved returning_list to LEX so that
current_select and lex->first_select_lex() is not used, fixed the logic of
my_ok() and send_eof(), and made some part more readable. Now
INSERT...IGNORE is working too. For tests, I merged some test cases,
removed the other ones and added some cases for existing tests.
I also read about bison and how to use its stack to return items so that it
can be used instead of list swapping.
As suggested, I am making the list rule return the List<Item> as a return
value, then the rule that uses select_item_list uses something like this:
lex->returning=$n
I have started implementing it but getting errors during build. Initially I
was getting error: opt_select_expressions has no declared type
when I tried making the entire rule return item_list.
To fix that I added opt_select_expressions to %type <item_list>
I am still trying to fix other errors.
Could you give me feedback whether I am moving along the right path, have I
missed something?
opt_select_expressions:
/*empty*/ {$$=NULL}
| RETURNING select_item_list
{ //Make this entire rule return item_list
something like:
$$=lex->current_select->item_list
}
;
Insert parser:
insert_field_spec opt_insert_update opt_select_expressions
{
something like
if ($3)
Lex->returning_list= $3;
Lex->pop_select(); //main select
if (Lex->check_main_unit_semantics())
MYSQL_YYABORT;
}
;
Regards,
Rucha Deodhar
<https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=ad9cce02-ddec-4842-be2f-33f375f8223d>
I’m
protected online with Avast Free Antivirus. Get it here — it’s free forever.
<https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=ad9cce02-ddec-4842-be2f-33f375f8223d>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>