1. 19 Jul, 2010 4 commits
  2. 16 Jul, 2010 3 commits
    • Davi Arnaut's avatar
      Bug#48327: Some crashes specific to FreeBSD ("embedded") · 92f3fc92
      Davi Arnaut authored
      Bug#47139: Test "merge" crashes in "embedded" run
      
      Backport patch for Bug#47139
      92f3fc92
    • Georgi Kodinov's avatar
      dcaef242
    • Ramil Kalimullin's avatar
      Fix for bug #50667: The InnoDB plugin prevents initialization · 37c97fd4
      Ramil Kalimullin authored
      of the "embedded" server
      
      Problem: mysqltest_embedded failed to load ha_innodb_plugin library
      on some platforms (due to some unresolved references).
      
      Fix: on FreeBSD use -export-dynamic flag building mysqltest_embedded.
      That allows to use its global symbols to resolve references in the
      dynamically loaded plugin library.
      
      
      libmysqld/examples/Makefile.am:
        Fix for bug #50667: The InnoDB plugin prevents initialization
        of the "embedded" server
          - use -export-dynamic (on FreeBSD/DragonFly) building
        mysqltest_embedded to allow using its global symbols 
        to resolve references in the dynamically loaded plugin libraries.
      37c97fd4
  3. 09 Jul, 2010 1 commit
  4. 08 Jul, 2010 1 commit
  5. 07 Jul, 2010 1 commit
  6. 04 Jul, 2010 1 commit
    • Vasil Dimov's avatar
      Merge mysql-5.1-innodb -> mysql-5.1-security · f219357a
      Vasil Dimov authored
      Merge up to sunny.bains@oracle.com-20100625081841-ppulnkjk1qlazh82 .
      There are 8 more changesets in mysql-5.1-innodb, but PB2 shows a
      failure for a test added in one of them. If that is resolved quickly
      then those 8 more changesets will be merged too.
      f219357a
  7. 02 Jul, 2010 8 commits
  8. 01 Jul, 2010 2 commits
    • Alexey Kopytov's avatar
      Automerge. · 82b8bc6e
      Alexey Kopytov authored
      82b8bc6e
    • Alexey Kopytov's avatar
      Bug#54667: Unnecessary signal handler redefinition · f3ccf506
      Alexey Kopytov authored
      POSIX requires that a signal handler defined with sigaction()
      is not reset on delivering a signal unless SA_NODEFER or
      SA_RESETHAND is set. It is therefore unnecessary to redefine
      the handler on signal delivery on platforms where sigaction()
      is used without those flags.
      
      include/my_alarm.h:
        Renamed DONT_REMEMBER_SIGNAL ->
        SIGNAL_HANDLER_RESET_ON_DELIVERY.
      include/my_global.h:
        Renamed DONT_REMEMBER_SIGNAL ->
        SIGNAL_HANDLER_RESET_ON_DELIVERY. The latter is now defined
        only on non-BSD platforms missing the POSIX sigaction()
        function.
      libmysql/libmysql.c:
        Renamed DONT_REMEMBER_SIGNAL ->
        SIGNAL_HANDLER_RESET_ON_DELIVERY
      mysys/thr_alarm.c:
        Renamed DONT_REMEMBER_SIGNAL ->
        SIGNAL_HANDLER_RESET_ON_DELIVERY
      sql/mysqld.cc:
        Renamed DONT_REMEMBER_SIGNAL ->
        SIGNAL_HANDLER_RESET_ON_DELIVERY
      f3ccf506
  9. 30 Jun, 2010 2 commits
    • Sergey Glukhov's avatar
      Bug#51431 Wrong sort order after import of dump file · 1c538876
      Sergey Glukhov authored
      The problem is that QUICK_SELECT_DESC behaviour depends
      on used_key_parts value which can be bigger than selected
      best_key_parts value if an engine supports clustered key.
      But used_key_parts is overwritten with best_key_parts
      value that prevents from correct selection of index
      access method. The fix is to preserve used_key_parts
      value for further use in QUICK_SELECT_DESC.
      
      
      mysql-test/r/innodb_mysql.result:
        test case
      mysql-test/t/innodb_mysql.test:
        test case
      sql/sql_select.cc:
        preserve used_key_parts value for further use in QUICK_SELECT_DESC
      1c538876
    • Staale Smedseng's avatar
      Bug #53899 Wrong mysql_stmt_errno() after connection loss with · 18388d21
      Staale Smedseng authored
      automatic reconnect
      
      A client with automatic reconnect enabled will see the error
      message "Lost connection to MySQL server during query" if the
      connection is lost between mysql_stmt_prepare() and
      mysql_stmt_execute(). The mysql_stmt_errno() number, however,
      is 0 -- not the corresponding value 2013.
      
      This patch checks for the case where the prepared statement
      has been pruned due to a connection loss (i.e., stmt->mysql
      has been set to NULL) during a call to cli_advanced_command(),
      and avoids changing the last_errno to the result of the last
      reconnect attempt.
      18388d21
  10. 29 Jun, 2010 2 commits
  11. 28 Jun, 2010 5 commits
    • Luis Soares's avatar
    • Davi Arnaut's avatar
      bfd3b7a1
    • Davi Arnaut's avatar
      407b68bf
    • Davi Arnaut's avatar
      Bug#54457: Test suite broken for 32-bit build · 715bac92
      Davi Arnaut authored
      The default value of the myisam_max_extra_sort_file_size could be
      higher than the maximum accepted value, leading to warnings upon
      the server start.
      
      The solution is to simply set the value to the maximum value in a
      32-bit built (2147483647, one less than the current). This should
      be harmless as the option is currently unused in 5.1.
      
      include/myisam.h:
        Remove now-unused macro.
      sql/mysqld.cc:
        Set max value to INT_MAX32.
      715bac92
    • Davi Arnaut's avatar
      Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run · e42d9085
      Davi Arnaut authored
      The problem was that a user could supply supply data in chunks
      via the COM_STMT_SEND_LONG_DATA command to prepared statement
      parameter other than of type TEXT or BLOB. This posed a problem
      since other parameter types aren't setup to handle long data,
      which would lead to a crash when attempting to use the supplied
      data.
      
      Given that long data can be supplied at any stage of a prepared
      statement, coupled with the fact that the type of a parameter
      marker might change between consecutive executions, the solution
      is to validate at execution time each parameter marker for which
      a data stream was provided. If the parameter type is not TEXT or
      BLOB (that is, if the type is not able to handle a data stream),
      a error is returned.
      
      sql/sql_prepare.cc:
        Before converting the parameter data stream, check the type
        compatibility.
      tests/mysql_client_test.c:
        Add test case.
      e42d9085
  12. 27 Jun, 2010 2 commits
    • Alfranio Correia's avatar
      77854696
    • unknown's avatar
      The following statements support the CURRENT_USER() where a user is needed. · 451cea3f
      unknown authored
      DROP USER 
      RENAME USER CURRENT_USER() ...
      GRANT ... TO CURRENT_USER()
      REVOKE ... FROM CURRENT_USER()
      ALTER DEFINER = CURRENT_USER() EVENTbut, When these statements are binlogged, CURRENT_USER() just is binlogged
      as 'CURRENT_USER()', it is not expanded to the real user name. When slave 
      executes the log event, 'CURRENT_USER()' is expand to the user of slave 
      SQL thread, but SQL thread's user name always NULL. This breaks the replication.
      
      After this patch, session's user will be written into query log events 
      if these statements call CURREN_USER() or 'ALTER EVENT' does not assign a definer.
      
      
      mysql-test/include/diff_tables.inc:
        Expend its abilities.
        Now it can diff not only in sessions of 'master' and 'slave', but 
        other sessions as well.
      mysql-test/include/rpl_diff_tables.inc:
        Diff the same table between master and slaves.
      sql/log_event.cc:
        session's user will be written into Query_log_event, if is_current_user_used() is TRUE.
        On slave SQL thread, Only thd->variables.current_user is written into Query_log_event,
        if it exists.
      sql/sql_acl.cc:
        On slave SQL thread, grantor should copy from thd->variables.current_user, if it exists
      sql/sql_class.h:
        On slave SQL thread, thd->variables.current_user is used to store the applying event's
        invoker.
      451cea3f
  13. 26 Jun, 2010 1 commit
    • Jon Olav Hauglid's avatar
      Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER · b4593605
      Jon Olav Hauglid authored
      This deadlock happened if DROP DATABASE was blocked due to an open
      HANDLER table from a different connection. While DROP DATABASE
      is blocked, it holds the LOCK_mysql_create_db mutex. This results
      in a deadlock if the connection with the open HANDLER table tries
      to execute a CREATE/ALTER/DROP DATABASE statement as they all
      try to acquire LOCK_mysql_create_db.
      
      This patch makes this deadlock scenario very unlikely by closing and
      marking for re-open all HANDLER tables for which there are pending
      conflicing locks, before LOCK_mysql_create_db is acquired.
      However, there is still a very slight possibility that a connection
      could access one of these HANDLER tables between closing/marking for
      re-open and the acquisition of LOCK_mysql_create_db.
      
      This patch is for 5.1 only, a separate and complete fix will be
      made for 5.5+.
      
      Test case added to schema.test.
      b4593605
  14. 25 Jun, 2010 7 commits