1. 09 Jul, 2010 6 commits
    • Mattias Jonsson's avatar
      merge · 70e49043
      Mattias Jonsson authored
      70e49043
    • Davi Arnaut's avatar
      Remove AC_LANG_WERROR, it causes trouble earlier versions · 14796300
      Davi Arnaut authored
      of autoconf and is not strictly needed for now.
      14796300
    • Georgi Kodinov's avatar
    • Davi Arnaut's avatar
      Bug#45288: pb2 returns a lot of compilation warnings on linux · ed9ffc6b
      Davi Arnaut authored
      Although the C standard mandates that sprintf return the number
      of bytes written, some very ancient systems (i.e. SunOS 4)
      returned a pointer to the buffer instead. Since these systems
      are not supported anymore and are hopefully long dead by now,
      simply remove the portability wrapper that dealt with this
      discrepancy. The autoconf check was causing trouble with GCC.
      ed9ffc6b
    • Davi Arnaut's avatar
      Bug#53445: Build with -Wall and fix warnings that it generates · 4f59204b
      Davi Arnaut authored
      Introduce a MySQL maintainer/developer mode that enables
      a set of warning options for the C/C++ compiler. This mode
      is intended to help improve the overall quality of the code.
      
      The warning options are:
      
      C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
      CXX_WARNINGS="$C_WARNINGS -Wno-unused-parameter"
      
      Since -Wall is essentially a moving target, autoconf checks
      are not run with warning options enabled, in particualr -Werror.
      This decision might be revisited in the future. The patch also
      fixes a mistake in the makefiles, where automake CXXFLAGS would
      be set to CFLAGS.
      4f59204b
    • Sergey Glukhov's avatar
      Bug#54416 MAX from JOIN with HAVING returning NULL with 5.1 and Empty set · 3c39a562
      Sergey Glukhov authored
      The problem there is that HAVING condition evaluates const
      parts of condition despite the condition has references
      on aggregate functions. Table t1 became const tables
      after make_join_statistics and table1.pk = 1, HAVING is
      transformed into MAX(1) < 7 and taken away from HAVING.
      The fix is to skip evaluation of HAVING conts parts if
      HAVING condition has references on aggregate functions.
      3c39a562
  2. 08 Jul, 2010 2 commits
  3. 07 Jul, 2010 1 commit
    • Georgi Kodinov's avatar
      Addendum to the fix for bug #53095 (failing information_schema.test on windows) · 28004bd5
      Georgi Kodinov authored
      Since the original fix for this bug lowercases the search pattern it's not a 
      good idea to copy the search pattern to the output instead of the real table 
      name found (since, depending on the case mode these two names may differ in 
      case).
      Fixed the infrmation_schema.test failure by making sure the actual table 
      name of an inoformation schema table is passed instead of the lookup pattern
      even when the pattern doesn't contain wildcards.
      28004bd5
  4. 06 Jul, 2010 2 commits
  5. 05 Jul, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#22320: my_atomic-t unit test fails · 46a3afb3
      Davi Arnaut authored
      The atomic operations implementation on 5.1 has a few problems,
      which might cause tests to abort randomly. Since no code in 5.1
      uses atomic operations, simply remove the code.
      46a3afb3
  6. 01 Jul, 2010 1 commit
  7. 25 Jun, 2010 1 commit
    • Georgi Kodinov's avatar
      Bug #53095: SELECT column_name FROM INFORMATION_SCHEMA.STATISTICS · dd6d026f
      Georgi Kodinov authored
      returns nothing
            
      When looking for table or database names inside INFORMATION_SCHEMA
      we must convert the table and database names to lowercase (just as it's
      done in the rest of the server) when lowercase_table_names is non-zero.
      This will allow us to find the same tables that we would find if there
      is no condition.
      
      Fixed by converting to lower case when extracting the database and 
      table name conditions.
      Test case added.
      dd6d026f
  8. 04 Jul, 2010 2 commits
    • 's avatar
      Postfix for bug#48321 · 363a2ccc
      authored
      Some test cases set ANSI_QUOTES in sql_mode.
      So we have to use single quotes to quote literal strings.
      363a2ccc
    • 's avatar
      The following statements support the CURRENT_USER() where a user is needed. · 42eecc53
      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.
      42eecc53
  9. 03 Jul, 2010 1 commit
  10. 02 Jul, 2010 5 commits
    • Davi Arnaut's avatar
      Bug#53445: Build with -Wall and fix warnings that it generates · 082036ac
      Davi Arnaut authored
      If bzero is not available, resort to memset. Also, remove dead
      bzero.c
      082036ac
    • Davi Arnaut's avatar
      Bug#53445: Build with -Wall and fix warnings that it generates · 93fb8bb2
      Davi Arnaut authored
      Apart strict-aliasing warnings, fix the remaining warnings
      generated by GCC 4.4.4 -Wall and -Wextra flags.
      
      One major source of warnings was the in-house function my_bcmp
      which (unconventionally) took pointers to unsigned characters
      as the byte sequences to be compared. Since my_bcmp and bcmp
      are deprecated functions whose only difference with memcmp is
      the return value, every use of the function is replaced with
      memcmp as the special return value wasn't actually being used
      by any caller.
      
      There were also various other warnings, mostly due to type
      mismatches, missing return values, missing prototypes, dead
      code (unreachable) and ignored return values.
      93fb8bb2
    • Georgi Kodinov's avatar
      merge · 6d5b4401
      Georgi Kodinov authored
      6d5b4401
    • Georgi Kodinov's avatar
      merge · 5b7d130a
      Georgi Kodinov authored
      5b7d130a
    • Georgi Kodinov's avatar
      merge · 51870d25
      Georgi Kodinov authored
      51870d25
  11. 01 Jul, 2010 2 commits
    • Alexey Kopytov's avatar
      Automerge. · 988dc230
      Alexey Kopytov authored
      988dc230
    • Alexey Kopytov's avatar
      Bug#54667: Unnecessary signal handler redefinition · ac89d926
      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.
      ac89d926
  12. 30 Jun, 2010 2 commits
    • Sergey Glukhov's avatar
      Bug#51431 Wrong sort order after import of dump file · a6220d82
      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.
      a6220d82
    • Staale Smedseng's avatar
      Bug #53899 Wrong mysql_stmt_errno() after connection loss with · 3b3983a4
      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.
      3b3983a4
  13. 29 Jun, 2010 1 commit
  14. 28 Jun, 2010 5 commits
  15. 27 Jun, 2010 2 commits
    • Alfranio Correia's avatar
      353e1107
    • 's avatar
      The following statements support the CURRENT_USER() where a user is needed. · 899a1d69
      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.
      899a1d69
  16. 26 Jun, 2010 1 commit
    • Jon Olav Hauglid's avatar
      Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER · 9fa66b64
      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.
      9fa66b64
  17. 25 Jun, 2010 2 commits
    • Georgi Kodinov's avatar
      merge · 2b2e0908
      Georgi Kodinov authored
      2b2e0908
    • Sergey Glukhov's avatar
      Bug#54422 query with = 'variables' · 700f8add
      Sergey Glukhov authored
      During creation of the table list of
      processed tables hidden I_S table 'VARIABLES'
      is erroneously added into the table list.
      it leads to ER_UNKNOWN_TABLE error in
      TABLE_LIST::add_table_to_list() function.
      The fix is to skip addition of hidden I_S
      tables into the table list.
      700f8add
  18. 24 Jun, 2010 3 commits