1. 15 Nov, 2010 1 commit
    • Jorgen Loland's avatar
      Bug#54812: assert in Diagnostics_area::set_ok_status · ac10cb5b
      Jorgen Loland authored
                 during EXPLAIN
      
      Before the patch, send_eof() of some subclasses of 
      select_result (e.g., select_send::send_eof()) could 
      handle being called after an error had occured while others 
      could not. The methods that were not well-behaved would trigger
      an ASSERT on debug builds. Release builds were not affected.
      
      Consider the following query as an example for how the ASSERT
      could be triggered:
      
      A user without execute privilege on f() does
         SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1;
      resulting in "ERROR 42000: execute command denied to user..." 
      
      The server would end the query by calling send_eof(). The 
      fact that the error had occured would make the ASSERT trigger. 
      
      select_dumpvar::send_eof() was the offending method in the
      bug report, but the problem also applied to other 
      subclasses of select_result. This patch uniforms send_eof() 
      of all subclasses of select_result to handle being called 
      after an error has occured. 
      
      mysql-test/r/not_embedded_server.result:
        Added test for BUG#54812
      mysql-test/t/not_embedded_server.test:
        Added test for BUG#54812
      sql/sql_class.cc:
        send_eof() of all subclasses of select_result can now handle being
        called after an error has occured.
      sql/sql_insert.cc:
        send_eof() of all subclasses of select_result can now handle being
        called after an error has occured.
        Also fix call to abort() in select_create::send_eof(), which was supposed to abort the result set, not terminate the server. This call to abort() should have been changed when the function was renamed from abort_result_set() but was forgotten. New test case added by BUG#54812 covered this line and terminated server.
      sql/sql_prepare.cc:
        send_eof() of all subclasses of select_result can now handle being
        called after an error has occured.
      sql/sql_update.cc:
        send_eof() of all subclasses of select_result can now handle being
        called after an error has occured.
      ac10cb5b
  2. 13 Nov, 2010 4 commits
    • Vladislav Vaintroub's avatar
      merge · 6574f4ba
      Vladislav Vaintroub authored
      6574f4ba
    • Vladislav Vaintroub's avatar
    • Vladislav Vaintroub's avatar
      Bug#58178: "make package" is broken with cmake 2.8.3 · 0e1e1491
      Vladislav Vaintroub authored
      Problem:  with "make package" , many small packages are 
      generated, one per CMake COMPONENT, instead of expected single
      package. This is due to the new (in cmake 2.8.3) component-based 
      install for archive( e.g ZIP,TGZ ) CPack generators.
      
      See http://public.kitware.com/Bug/view.php?id=11452 for discussion.
      
      Fix: use CPACK_MONOLITHIC_INSTALL=1 to enforce single package.
      Reset this variable temporarily to 0 for  MSI creation  (MSI needs 
      COMPONENTs)
      0e1e1491
    • Alexander Nozdrin's avatar
      Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME · 6bf734f8
      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.
      6bf734f8
  3. 12 Nov, 2010 4 commits
  4. 11 Nov, 2010 6 commits
  5. 10 Nov, 2010 8 commits
    • Vladislav Vaintroub's avatar
      Fix typo : SVR5=>SVR4 · 6a20a3ac
      Vladislav Vaintroub authored
      6a20a3ac
    • Georgi Kodinov's avatar
      14a1e2bd
    • Georgi Kodinov's avatar
      Bug #57744: sql-common/client.c: Missing DBUG_RETURN macro · b4330cdf
      Georgi Kodinov authored
      - added missing DBUG_RETURN
      - fixed whitespace according to coding style.
      b4330cdf
    • Oystein Grovlen's avatar
      Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed. · a571802b
      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.
      a571802b
    • Dmitry Shulga's avatar
      null merge. · bcdc0f6d
      Dmitry Shulga authored
      bcdc0f6d
    • Dmitry Shulga's avatar
      Fixed bug#56619 - Assertion failed during · b2432ca4
      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.
      b2432ca4
    • Dmitry Shulga's avatar
      Auto-merge from 5.1-bugteam for bug#57386. · 8bb57cdd
      Dmitry Shulga authored
      8bb57cdd
    • Dmitry Shulga's avatar
      Fixed Bug#57386 - main.execution_constants segfault on MIPS64EL. · 37b8a3d7
      Dmitry Shulga authored
      sql/item_func.cc:
        Item_func::fix_fields modified: increased minimal required stack
        size in call to check_stack_overrun().
      37b8a3d7
  6. 09 Nov, 2010 9 commits
  7. 08 Nov, 2010 8 commits