Re: [Maria-developers] GSoC [MDEV-6017]
Hi, Alexey! On Jun 04, Alexey Mogilyovkin wrote: > For the last week I was making some investigations about implementing my > task. > Here are my thoughts about how it can be done. > I want to find all virtual columns that are used in most outer select. Then > try to match expressions in where clauses with vcols and rewrite all > matching ones, including ones in subselects. Then run new Item processor. > When this processor encounters Item_subselect it finds all vcolumns again, > but this time only that belongs to subselect. Then the process continues > recursively. I'd suggest to ignore subselects now, and only rewrite the top-level select. After that'll work, you can look into subselects, but there's no need to try to do everything at once. > I currently trying to implement it. Code is available here > https://github.com/ZeroICQ/server/compare/10.4...ZeroICQ:MDEV-6017 > Selects with joins and unions would require some modifications. normally, iterators are used like while (Item *item= it++) { ... } not with it.peek() > I had most troubles with getting all where clauses from subselects. > I am not sure if "if ((*vf)->get_possible_keys().to_ulonglong())" is the Better: if (!(*vf)->get_possible_keys().is_clear_all()) or simply if (!(*vf)->part_of_key.is_clear_all()) as get_possible_keys() is just confusing in this context. > right way to check if there are any suitable indexes for given virtual > column. And I have some troubles understanding structure of LEX > variable after parsing complex queries with joins, subselects and > unions. You might get more specific answers if you'd ask more specific questions :) Regards, Sergei Chief Architect MariaDB and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] GSoC [MDEV-6017]
For the last week I was making some investigations about implementing my task. Here are my thoughts about how it can be done. I want to find all virtual columns that are used in most outer select. Then try to match expressions in where clauses with vcols and rewrite all matching ones, including ones in subselects. Then run new Item processor. When this processor encounters Item_subselect it finds all vcolumns again, but this time only that belongs to subselect. Then the process continues recursively. I currently trying to implement it. Code is available here https://github.com/ZeroICQ/server/compare/10.4...ZeroICQ:MDEV-6017 Selects with joins and unions would require some modifications. I had most troubles with getting all where clauses from subselects. I am not sure if "if ((*vf)->get_possible_keys().to_ulonglong())" is the right way to check if there are any suitable indexes for given virtual column. And I have some troubles understanding structure of LEX variable after parsing complex queries with joins, subselects and unions. > ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] GSoC [MDEV-6017]
вт, 28 мая 2019 г. в 06:44, Alexey Mogilyovkin : > Hello. This is the thread where I would like to publish my weekly reports > every Monday. > During preparatory weeks I set up development environment. I briefly > examined testing framework, debugging process and now I am ready to start > work. > Work progress will be available on my github repository in branch > "MDEV-6017" https://github.com/ZeroICQ/server/tree/MDEV-6017 > ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] Weekly Report
Hi, Rucha! On Jun 03, Rucha Deodhar wrote: > Report for week 1: > > Hello! > > I made test cases and extended the parser for: > INSERT...RETURNING * and > INSERT...RETURNING > It is working fine for INSERT...ON DUPLICATE KEY UPDATE, INSERT...IGNORE, > INSERT...SET, and simple insert statements. > As I have never coded parser before, it was throwing errors during build > and was also crashing the server sometimes. I managed to fix the errors > eventually. > Initially, I tried to extend in RETURNING by referring how > column names are parsed in INSERT statement, like using opt_fields > production for insert_field_list, modified it a little and tried to see it > if that would work. But it didn't. So I referred to DELETE...RETURNING as > it was suggested earlier. > I am still trying to extend it for INSERT...SELECT. It is not showing > syntax error but shows error "column count doesn't match value count at row > 1." I will add the test cases for this once it is working. Sounds good! If you'll get stuck, I suggest to push what you have. Then we could take a look and offer some help you if needed. Regards, Sergei Chief Architect MariaDB and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp