Re: [Maria-developers] 980a5c31880: MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Hi, Oleksandr! On Jan 28, Oleksandr Byelkin wrote:
Hi, Sergei!
Flag in SELECT_LEX options dropped at the end of execution (in our case prepare). All commands where EXPLAIN is possible restore the flag in main SELECT_LEX (in mysql_explain_union()) except UPDATE (because it do not use mysql_explain_union() for explain). Without the flag it first try to send OK (as part of update) then EOF as part of EXPLAIN.
Ok. 1. Why does it not use mysql_explain_union() ? 2. Why EXPLAIN flag is need to be removed and restored anyway? 3. Please append the following to the commit comment: " Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN. "
On Sun, Jan 28, 2018 at 2:45 PM, Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Oleksandr!
On Dec 22, Oleksandr Byelkin wrote:
revision-id: 980a5c318803d6aa7355e019869597976dcf19bf (mariadb-10.0.33-37-g980a5c31880) parent(s): 042f763268c0f209e7c12e0a6a72bb5d204dfe29 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2017-12-22 14:00:10 +0100 message:
MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX (the same but in other way made before INSERT/DELETE/SELECT)
Please explain what was the reason for the bug, why the status was set twice, and how your change fixes it.
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Am 29.01.2018 um 01:02 schrieb Sergei Golubchik:
Hi, Oleksandr!
On Jan 28, Oleksandr Byelkin wrote:
Hi, Sergei!
Flag in SELECT_LEX options dropped at the end of execution (in our case prepare). All commands where EXPLAIN is possible restore the flag in main SELECT_LEX (in mysql_explain_union()) except UPDATE (because it do not use mysql_explain_union() for explain). Without the flag it first try to send OK (as part of update) then EOF as part of EXPLAIN. Ok.
1. Why does it not use mysql_explain_union() ? It is question to them who made explain for non SELECT statements (probably Sergey Petrunia) as I can see it just have a bit different call pathes.
2. Why EXPLAIN flag is need to be removed and restored anyway?
Because it is how our EXPLAIN works (written without taking into account re-execution). If remove the flag cleanup it will change output of prepared explain EXPLAIN.
3. Please append the following to the commit comment: " Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN.
OK
"
On Sun, Jan 28, 2018 at 2:45 PM, Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Oleksandr!
On Dec 22, Oleksandr Byelkin wrote:
revision-id: 980a5c318803d6aa7355e019869597976dcf19bf (mariadb-10.0.33-37-g980a5c31880) parent(s): 042f763268c0f209e7c12e0a6a72bb5d204dfe29 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2017-12-22 14:00:10 +0100 message:
MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX (the same but in other way made before INSERT/DELETE/SELECT) Please explain what was the reason for the bug, why the status was set twice, and how your change fixes it. Regards, Sergei Chief Architect MariaDB and security@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
Hi, Oleksandr! On Jun 11, Oleksandr Byelkin wrote:
Am 29.01.2018 um 01:02 schrieb Sergei Golubchik:
On Jan 28, Oleksandr Byelkin wrote:
Hi, Sergei!
Flag in SELECT_LEX options dropped at the end of execution (in our case prepare). All commands where EXPLAIN is possible restore the flag in main SELECT_LEX (in mysql_explain_union()) except UPDATE (because it do not use mysql_explain_union() for explain). Without the flag it first try to send OK (as part of update) then EOF as part of EXPLAIN. Ok.
1. Why does it not use mysql_explain_union() ? It is question to them who made explain for non SELECT statements (probably Sergey Petrunia) as I can see it just have a bit different call pathes.
So all UPDATE/DELETE restore the flag, and only multi-update didn't? What about multi-delete? Better to add tests with PREPARE and all non-select explainable commands to test it and to make sure it won't break in the future.
2. Why EXPLAIN flag is need to be removed and restored anyway?
Because it is how our EXPLAIN works (written without taking into account re-execution). If remove the flag cleanup it will change output of prepared explain EXPLAIN.
Yes, I understand why the flag has to be restored. But why it has to be removed? Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi, Sergei! Am 18.06.2018 um 14:14 schrieb Sergei Golubchik:
Hi, Oleksandr!
On Jun 11, Oleksandr Byelkin wrote:
Am 29.01.2018 um 01:02 schrieb Sergei Golubchik:
On Jan 28, Oleksandr Byelkin wrote:
Hi, Sergei!
Flag in SELECT_LEX options dropped at the end of execution (in our case prepare). All commands where EXPLAIN is possible restore the flag in main SELECT_LEX (in mysql_explain_union()) except UPDATE (because it do not use mysql_explain_union() for explain). Without the flag it first try to send OK (as part of update) then EOF as part of EXPLAIN. Ok.
1. Why does it not use mysql_explain_union() ? It is question to them who made explain for non SELECT statements (probably Sergey Petrunia) as I can see it just have a bit different call pathes. So all UPDATE/DELETE restore the flag, and only multi-update didn't? What about multi-delete? all except this.
Better to add tests with PREPARE and all non-select explainable commands to test it and to make sure it won't break in the future. OK
2. Why EXPLAIN flag is need to be removed and restored anyway? Because it is how our EXPLAIN works (written without taking into account re-execution). If remove the flag cleanup it will change output of prepared explain EXPLAIN. Yes, I understand why the flag has to be restored. But why it has to be removed? it was explanation why it should be removed something do not work otherwise. I tried and explain starts changing on second call.
Regards, Sergei Chief Architect MariaDB and security@mariadb.org
participants (2)
-
Oleksandr Byelkin
-
Sergei Golubchik