1. 13 Nov, 2010 1 commit
    • Alexander Nozdrin's avatar
      Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME · 3fa437cf
      Alexander Nozdrin authored
      structure buffer).
      
      This is a follow-up for WL#4435. The bug actually existed not only
      MYSQL_TYPE_DATETIME type. The problem was that Item_param::set_value()
      was written in an assumption that it's working with expressions, i.e.
      with basic data types.
      
      There are two different quick fixes here:
        a) Change Item_param::make_field() -- remove setting of
           Send_field::length, Send_field::charsetnr, Send_field::flags and
           Send_field::type.
      
           That would lead to marshalling all data using basic types to the client
           (MYSQL_TYPE_LONGLONG, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_STRING and
           MYSQL_TYPE_NEWDECIMAL). In particular, that means, DATETIME would be
           sent as MYSQL_TYPE_STRING, TINYINT -- as MYSQL_TYPE_LONGLONG, etc.
      
           That could be Ok for the client, because the client library does
           reverse conversion automatically (the client program would see DATETIME
           as MYSQL_TIME object). However, there is a problem with metadata --
           the metadata would be wrong (misleading): it would say that DATETIME is
           marshaled as MYSQL_TYPE_DATETIME, not as MYSQL_TYPE_STRING.
      
        b) Set Item_param::param_type properly to actual underlying field type.
           That would lead to double conversion inside the server: for example,
           MYSQL_TIME-object would be converted into STRING-object
           (in Item_param::set_value()), and then converted back to MYSQL_TIME-object
           (in Item_param::send()).
      
           The data however would be marshalled more properly, and also metadata would
           be correct.
      
      This patch implements b).
      
      There is also a possibility to avoid double conversion either by clonning
      the data field, or by storing a reference to it and using it on Item::send()
      time. That requires more work and might be done later.
      3fa437cf
  2. 12 Nov, 2010 4 commits
  3. 11 Nov, 2010 6 commits
  4. 10 Nov, 2010 8 commits
    • Vladislav Vaintroub's avatar
      Fix typo : SVR5=>SVR4 · 2e2f3b1f
      Vladislav Vaintroub authored
      2e2f3b1f
    • Georgi Kodinov's avatar
      7fa9b1e6
    • Georgi Kodinov's avatar
      Bug #57744: sql-common/client.c: Missing DBUG_RETURN macro · 236affe7
      Georgi Kodinov authored
      - added missing DBUG_RETURN
      - fixed whitespace according to coding style.
      236affe7
    • Oystein Grovlen's avatar
      Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed. · bb356127
      Oystein Grovlen authored
      This bug was introduced in this revision: 
      kostja@sun.com-20100727102553-b4n2ojcyfj79l2x7
      ("A pre-requisite patch for the fix for Bug#52044.")
      
      It happens because close_thread_tables() is now called in
      open_and_lock_tables upon failure.  Hence, table is no longer
      open when optimizer tries to do cleanup.
      
      Fix: Make sure to do cleanup in st_select_lex_unit::prepare()
      upon failure. This way, cleanup() is called before tables are
      released.
      
      mysql-test/r/subselect.result:
        Added test case for Bug#57704.
      mysql-test/t/subselect.test:
        Added test case for Bug#57704.
      sql/sql_union.cc:
        st_select_lex_unit::prepare():  On failure, make sure cleanup()
        is called.
      bb356127
    • Dmitry Shulga's avatar
      null merge. · ebed5380
      Dmitry Shulga authored
      ebed5380
    • Dmitry Shulga's avatar
      Fixed bug#56619 - Assertion failed during · 4b0fe887
      Dmitry Shulga authored
      ALTER TABLE RENAME, DISABLE KEYS.
      
      The code of ALTER TABLE RENAME, DISABLE KEYS could
      issue a commit while holding LOCK_open mutex.
      This is a regression introduced by the fix for
      Bug 54453.
      This failed an assert guarding us against a potential
      deadlock with connections trying to execute
      FLUSH TABLES WITH READ LOCK.
      
      The fix is to move acquisition of LOCK_open outside
      the section that issues ha_autocommit_or_rollback().
      LOCK_open is taken to protect against concurrent
      operations with .frms and the table definition
      cache, and doesn't need to cover the call to commit.
      
      A test case added to innodb_mysql.test.
      
      The patch is to be null-merged to 5.5, which
      already has 54453 null-merged to it.
      
      mysql-test/suite/innodb/r/innodb_mysql.result:
        Added test results for test for bug#56619.
      mysql-test/suite/innodb/t/innodb_mysql.test:
        Added test for bug#56619.
      sql/sql_table.cc:
        mysql_alter_table() modified: moved acquisition of LOCK_open
        after call to ha_autocommit_or_rollback.
      4b0fe887
    • Dmitry Shulga's avatar
      Auto-merge from 5.1-bugteam for bug#57386. · d544b4ed
      Dmitry Shulga authored
      d544b4ed
    • Dmitry Shulga's avatar
      Fixed Bug#57386 - main.execution_constants segfault on MIPS64EL. · 2c16c7e9
      Dmitry Shulga authored
      sql/item_func.cc:
        Item_func::fix_fields modified: increased minimal required stack
        size in call to check_stack_overrun().
      2c16c7e9
  5. 09 Nov, 2010 9 commits
  6. 08 Nov, 2010 10 commits
  7. 07 Nov, 2010 2 commits
    • Dmitry Shulga's avatar
      7cd6bb26
    • Dmitry Shulga's avatar
      A fix and a test case for Bug#47924 -main.log_tables times out · 8f237f58
      Dmitry Shulga authored
      sporadically.
      
      The cause of the sporadic time out was a leaking protection
      against the global read lock, taken by the RENAME statement,
      and not released in case of an error occurred during RENAME.
      The leaking protection counter would lead to the value of
      protect_against_global_read never dropping to 0.
      Consequently FLUSH TABLES in all connections, including the
      one that leaked the protection, could not proceed.
       
      The fix is to ensure that all branchesin RENAME code properly
      release GRL protection.
      
      mysql-test/r/log_tables.result:
        Added results for test for bug#47924.
      mysql-test/t/log_tables.test:
        Added test for bug#47924.
      sql/sql_rename.cc:
        mysql_rename_tables() modified: replaced return from function
        to goto to clean up code block in case of error.
      8f237f58