On 15.12.14 22:03, Sergei Golubchik wrote:
Hi, Sanja!

On Nov 17, [email protected] wrote:
------------------------------------------------------------
revno: 4350
revision-id: [email protected]
parent: [email protected]
committer: [email protected]
branch nick: work-maria-5.5-MDEV-6985
timestamp: Mon 2014-11-17 14:26:35 +0100
message:
   MDEV-6985: MariaDB crashes on stored procedure call
Item_ident fixed to allow double cleanup().
=== modified file 'sql/item.cc'
--- a/sql/item.cc       2014-10-06 17:53:55 +0000
+++ b/sql/item.cc       2014-11-17 13:26:35 +0000
@@ -862,12 +862,20 @@ void Item_ident::cleanup()
                       field_name ? field_name : "(null)",
                         orig_field_name ? orig_field_name : "(null)"));
  #endif
Before pushing, please remove the above #ifdef, in a separate commit.
thanks!

+  bool was_fixed= fixed;
    Item::cleanup();
    db_name= orig_db_name;
    table_name= orig_table_name;
    field_name= orig_field_name;
    /* Store if this Item was depended */
-  can_be_depended= test(depended_from);
+  if (was_fixed)
+  {
+    /*
+      We can trust that depended_from set correctly only if this item
+      was fixed
+    */
+    can_be_depended= test(depended_from);
+  }
Are double cleanups generally normal? Why this item is cleaned up twice?
Of course it is not so efficient, but we have it (SP works so that it can do cleanup for statement as it executed, than as part of procedure, if you need exact path I can find it again).

Also I can imagine how it can happens in "usual" execution for example we have PS and try to execute it with lack of a table (which cause an error) and so items will be cleanup second time without being used then return table in place and execute PS again and hit this bug.

    DBUG_VOID_RETURN;
  }

Regards,
Sergei



_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to