1. 17 Mar, 2008 1 commit
  2. 14 Mar, 2008 1 commit
    • unknown's avatar
      Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures · 2e4d2601
      unknown authored
      The problem was that the COM_STMT_SEND_LONG_DATA was sending a response
      packet if the prepared statement wasn't found in the server (due to
      reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE
      should not send any packets, even error packets should not be sent since
      they are not expected by the client API.
      
      The solution is to clear generated during the execution of the aforementioned
      commands and to skip resend of prepared statement commands. Another fix is
      that if the connection breaks during the send of prepared statement command,
      the command is not sent again since the prepared statement is no longer in the
      server.
      
      
      libmysql/libmysql.c:
        The mysql handle might be reset after a reconnection.
        Pass the now used stmt argument to cli_advanced_command.
      sql-common/client.c:
        Don't resend command if the connection broke and it's a prepared
        statement command. If the session is broken, prepared statements
        on the server are gone, set the error accordanly.
      sql/sql_prepare.cc:
        Clear any error set during the execution of the request
        command.
      tests/mysql_client_test.c:
        Fix memory leak by freeing result associated with statement.
        Remove test case for Bug 29948 because it's not reliable in
        5.0 (fixed in 5.1) due to KILL queries sending two packets for
        a thread that kills itself.
      2e4d2601
  3. 12 Mar, 2008 1 commit
    • unknown's avatar
      A fix for Bug#34643: TRUNCATE crash if trigger and foreign key. · 0dc8565e
      unknown authored
        
      In cases when TRUNCATE was executed by invoking mysql_delete() rather
      than by table recreation (for example, when TRUNCATE was issued on
      InnoDB table with is referenced by foreign key) triggers were invoked.
      In debug builds this also led to crash because of an assertion, which
      assumes that some preliminary actions take place before trigger 
      invocation, which doesn't happen in case of TRUNCATE.
      
      The fix is not to execute triggers in mysql_delete() when this
      function is used by TRUNCATE.
      
      
      mysql-test/r/trigger-trans.result:
        Update result file.
      mysql-test/t/trigger-trans.test:
        A test case for Bug#34643: TRUNCATE crash if trigger and foreign key.
      sql/sql_delete.cc:
        Do not process triggers in TRUNCATE.
      0dc8565e
  4. 06 Mar, 2008 1 commit
  5. 04 Mar, 2008 2 commits
  6. 28 Feb, 2008 2 commits
    • unknown's avatar
      Post-merge fix for Bug 33851. The initialization order of members · bc489574
      unknown authored
      must match the order which they were declared in the class definition. 
      
      
      sql/item.cc:
        Fix initialization order, parameter was the last one declared.
      bc489574
    • unknown's avatar
      Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210 · 8d4c99e3
      unknown authored
      The problem is that passing anything other than a integer to a limit
      clause in a prepared statement would fail. This limitation was introduced
      to avoid replication problems (e.g: replicating the statement with a
      string argument would cause a parse failure in the slave).
      
      The solution is to convert arguments to the limit clause to a integer
      value and use this converted value when persisting the query to the log.
      
      
      mysql-test/r/limit.result:
        Update test case result.
      mysql-test/r/ps.result:
        Add test case result for Bug#33851
      mysql-test/r/rpl_user_variables.result:
        Test case result for replication of prepared statement with
        limit clause.
      mysql-test/t/limit.test:
        Test parameters to limit clause.
      mysql-test/t/ps.test:
        Add test case for Bug#33851
      mysql-test/t/rpl_user_variables.test:
        Test replication of a parameter which value is converted.
      sql/item.cc:
        Convert value to integer if it's a parameter to a limit clause.
      sql/item.h:
        Flag signal that item is a parameter to a limit clause.
      sql/item_func.cc:
        Const member functions, object is not mutated.
      sql/sql_class.h:
        Const member functions, object is not mutated.
      sql/sql_yacc.yy:
        Flag that item is a parameter to a limit clause.
      8d4c99e3
  7. 27 Feb, 2008 2 commits
  8. 26 Feb, 2008 2 commits
  9. 23 Feb, 2008 1 commit
  10. 22 Feb, 2008 1 commit
  11. 21 Feb, 2008 7 commits
    • unknown's avatar
      Post-merge fix to silence compiler warning. · bda1c813
      unknown authored
      
      sql/sql_prepare.cc:
        Removed unused variable.
      bda1c813
    • unknown's avatar
      Bug#32890 Crash after repeated create and drop of tables and views · f001005a
      unknown authored
      The problem is that CREATE VIEW statements inside prepared statements
      weren't being expanded during the prepare phase, which leads to objects
      not being allocated in the appropriate memory arenas.
      
      The solution is to perform the validation of CREATE VIEW statements
      during the prepare phase of a prepared statement. The validation
      during the prepare phase assures that transformations of the parsed
      tree will use the permanent arena of the prepared statement.
      
      
      mysql-test/r/ps.result:
        Add test case result for Bug#32890
      mysql-test/t/ps.test:
        Add test case for Bug#32890
      sql/item.h:
        Restore original field name if name is auto generated.
      sql/sql_prepare.cc:
        Validate and prepare a CREATE VIEW statement for execution.
      sql/sql_view.cc:
        Move privileges check to it's own function.
      sql/sql_view.h:
        Export function which check privileges of a CREATE VIEW statement.
      f001005a
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-build · 026f9b89
      unknown authored
      into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-build
      
      026f9b89
    • unknown's avatar
      Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd · 09ed2f0f
      unknown authored
       - fix test failures that was already there but now are
         more consistent when the 1 second sleep has been removed from
         ndb_waiter
      
      
      mysql-test/t/ndb_autodiscover.test:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      mysql-test/t/ndb_autodiscover3.test:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      mysql-test/include/ndb_wait_connected.inc:
        Wait until mysqld has reconnected to ndbd after ndbd has been restarted
      09ed2f0f
    • unknown's avatar
      Fix for Bug#34337: Server crash when Altering a view using · a1e999bf
      unknown authored
      a table name.
        
      The problem was that fill_defined_view_parts() did not return
      an error if a table is going to be altered. That happened if
      the table was already in the table cache. In that case,
      open_table() returned non-NULL value (valid TABLE-instance from
      the cache).
        
      The fix is to ensure that an error is thrown even if the table
      is in the cache.
      
      (This is a backport of the original patch for 5.1)
      
      
      mysql-test/r/view.result:
        Fix result file.
      mysql-test/r/view_grant.result:
        Fix result file.
      mysql-test/t/view.test:
        Add a test case for Bug#34337: Server crash when Altering a view
        using a table name.
      mysql-test/t/view_grant.test:
        Fix order-dependency.
      sql/sql_view.cc:
        Report an error if we're going to work with a table.
      a1e999bf
    • unknown's avatar
      Merge vvaintroub@bk-internal.mysql.com:/home/bk/mysql-5.0-build · ee55dd37
      unknown authored
      into  wva.:C:/bk/bug31745_2/mysql-5.0-build
      
      
      sql/sql_parse.cc:
        Auto merged
      ee55dd37
    • unknown's avatar
      Post-merge fix to silence a compilation warning introduced · 30750e49
      unknown authored
      by patch for bug 32265 .
      
      
      tests/mysql_client_test.c:
        Removed unused variable.
      30750e49
  12. 20 Feb, 2008 1 commit
    • unknown's avatar
      Bug#32265 Server returns different metadata if prepared statement is used · 718f920f
      unknown authored
      Executing a prepared statement associated with a materialized
      cursor yields to the client a metadata packet with wrong table
      and database names. The problem was occurring because the server
      was sending the the name of the temporary table used by the cursor
      instead of the table name of the original table. The same problem
      occurs when selecting from views, in which case the table name was
      being sent and not the name of the view.
        
      The solution is to fill the list item from the temporary table but
      preserving the table and database names of the original fields. This
      is achieved by tweaking the Select_materialize to accept a pointer to
      the Materialized_cursor class which contains the item list to be filled.
      
      
      sql/sql_cursor.cc:
        Fill the item list in the send_fields method and preserve
        the table and database name of the fields.
      tests/mysql_client_test.c:
        Add test case for Bug#32265
      718f920f
  13. 19 Feb, 2008 1 commit
    • unknown's avatar
      Bug#31745 - crash handler does not work on Windows · 9624e880
      unknown authored
      - Replace per-thread signal()'s with  SetUnhandledExceptionFilter(). 
        The only remaining signal() is for SIGABRT (default abort()
        handler in VS2005 is broken, i.e removes user exception filter)
      - remove MessageBox()'es  from error handling code
      - Windows port for print_stacktrace() and write_core() 
      - Cleanup, removed some unused functions
      
      
      sql/CMakeLists.txt:
        Implement stack tracing on and generating crash dumps on Windows
      sql/mysqld.cc:
        Correct signal handling on Windows. 
        - For console events, like CTRL-C use SetConsoleCtrlHandler
        - For exceptions like access violation, use SetUnhandledExceptionFilter
        - For SIGABRT generate exception via __debugbreak() intrinsic
          if built with VS2005 and later , since default SIGABRT handler 
          replaces unhandled exception filter specified by user
        - make provisions to debug exception filter, as it is not trivial 
        (should be compiled with /DDEBUG_UNHANDLED_EXCEPTION_FILTER)
      sql/sql_parse.cc:
        Remove message box from windows signal handler.
        The only thread specific handler left is for SIGABRT,
        which is broken on VS2005 and later (user specified unhandled exception 
        filter gets overwritten)
      sql/stacktrace.c:
        Stack tracing and generating crash dumps on Windows
      sql/stacktrace.h:
        Implement print_stacktrace and write_core on Windows
      9624e880
  14. 18 Feb, 2008 4 commits
  15. 14 Feb, 2008 1 commit
    • unknown's avatar
      Bug #21158 mysql_config doesn't include -lmygcc · 0cbe3b6a
      unknown authored
      Add -lmygcc to mysql_config output for libs, libs_r, and embedded_libs.
      
      Required when linking against our static libs, if yassl is used, and gcc
      used to build library is significantly different from that which is using
      the library.
      
      
      scripts/mysql_config.sh:
        Add -lmygcc to --libs, --libs_r, and --embedded-libs output, if libmygcc.a
        is found in the pkglibdir.
        
        This works around a problem when linking against the static client
        libs which were built with a different GCC than the current compiler.
        In this case, without -lmygcc, several builtin functions (e.g.,
        __pure_virtual, __builtin_delete) are left undefined.  Currently it
        is yassl which pulls in these symbols.
        
        This isn't a problem when linking against shared libraries, or when
        using the same compiler version.
        
        Currently it shows up with libs built on build.mysql.com with gcc 2.95.3,
        when using them on more recent systems.
        
        
        Also strip the -mcpu, -mtune, and -march cflags.  The calling package can
        determine what optimization parameters to choose.
      0cbe3b6a
  16. 13 Feb, 2008 3 commits
  17. 12 Feb, 2008 1 commit
  18. 11 Feb, 2008 4 commits
  19. 08 Feb, 2008 2 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 955f1885
      unknown authored
      into  dipika.(none):/opt/local/work/mysql-5.0-runtime
      
      955f1885
    • unknown's avatar
      Bug#33798 prepared statements improperly handle large unsigned ints · cea021da
      unknown authored
      The unsignedness of large integer user variables was not being
      properly preserved when feeded to prepared statements. This was
      happening because the unsigned flags wasn't being updated when
      converting the user variable is converted to a parameter.
      
      The solution is to copy the unsigned flag when converting the
      user variable to a parameter and take the unsigned flag into
      account when converting the integer to a string.
      
      
      mysql-test/r/binlog.result:
        Add test case result for Bug#33798
      mysql-test/r/ps.result:
        Add test case result for Bug#33798
      mysql-test/t/binlog.test:
        Add test case for Bug#33798
      mysql-test/t/ps.test:
        Add test case for Bug#33798
      sql/item.cc:
        Take the unsigned flag into account when converting the
        user variable.
      cea021da
  20. 07 Feb, 2008 2 commits