• unknown's avatar
    An assertion added (transaction must be re-enabled before end of · d66157e3
    unknown authored
    top-level statement) and fixes for the bugs it finds.
    Fix for non-serious Valgrind warning.
    
    
    sql/sql_insert.cc:
      When CREATE TABLE IF NOT EXISTS finds the table already exists,
      'table' is the existing table. So if that table is temporary we don't
      re-enable transactions which is a bug.
    sql/sql_parse.cc:
      verify that at the end of each top-statement transactions have
      been re-enabled. Does not apply to substatements (consider
      CREATE TABLE t1 SELECT stored_func() : the substatements inside
      stored_func() run with transaction disabled).
      I am not putting the assertion into ha_external_lock(F_UNLCK) because
      performance schema tables get closed in the middle of a statement
      sometimes while transaction is disabled.
    sql/sql_table.cc:
      copy_data_between_tables() forgot to clean-up several things in error
      conditions (ha_enable_transaction(), free-ing 'copy', etc) as found
      by the assertion added to sql_parse.cc.
    storage/maria/ha_maria.cc:
      Comment
    storage/maria/ma_blockrec.c:
      fix for Valgrind warning: a temporary table was created, a blob
      page of its was flushed to disk and had random bytes in the checksum
      area ("write of uninitialized bytes in pwrite")
    storage/maria/ma_pagecrc.c:
      typo
    d66157e3
ma_blockrec.c 223 KB