1. 28 Feb, 2010 3 commits
    • Andrei Elkin's avatar
      82fe344c
    • Andrei Elkin's avatar
      bug#50296 · 055c6104
      Andrei Elkin authored
      a small refinement to the test
      055c6104
    • Andrei Elkin's avatar
      Bug #50296 Slave reconnects earlier than the prescribed slave_net_timeout value · 1faafbb0
      Andrei Elkin authored
      There was auto-reconnecting by slave earlier than a prescribed by slave_net_timeout value.
      The issue happened on 64bit solaris that spotted rather incorrect casting of 
      the ulong slave_net_timeout into the uint of mysql.options.read_timeout.
      
      Notice, that there is no reason for slave_net_timeout to be of type of ulong.
      Since it's primarily passed as arg to mysql_options the type can be made
      as uint to avoid all conversion hassles.
      That's what the fixes are made.
      A "side" effect of the patch is a new value for the max of slave_net_timeout
      to be the max of the unsigned int type (therefore to vary across platforms).
      
      Note, a regression test can't be made to run reliably without making it to last over some 
      20 secs. That's why it is placed in suite/large_tests.
      
      mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result:
        the new test results.
      mysql-test/suite/large_tests/t/rpl_slave_net_timeout-slave.opt:
        Initialization of the option that yields slave_net_timeout's default.
      sql/mysql_priv.h:
        changing type for slave_net_timeout from ulong to uint
      sql/mysqld.cc:
        changing type for slave_net_timeout from ulong to uint
      sql/sys_vars.cc:
        Refining the max value for slave_net_timeout to be as the max for uint type.
      1faafbb0
  2. 26 Feb, 2010 9 commits
    • Dmitry Lenev's avatar
      Merged recent changes from mysql-next-mr-bugfixing · 88f4990c
      Dmitry Lenev authored
      into mysql-next-4284 tree.
      88f4990c
    • Jonathan Perkin's avatar
      Fix truncated GPL text. · 33ecac14
      Jonathan Perkin authored
      33ecac14
    • Dmitry Lenev's avatar
      Merge recent changes from mysql-next-mr into · aedf25be
      Dmitry Lenev authored
      mysql-next-4284.
      aedf25be
    • Dmitry Lenev's avatar
      Merged recent changes from mysql-next-mr-bugfixing into · cb7fe134
      Dmitry Lenev authored
      mysql-next-4284 tree.
      cb7fe134
    • Jon Olav Hauglid's avatar
      Bug #51240 ALTER TABLE of a locked MERGE table fails · 7fd30bf6
      Jon Olav Hauglid authored
      The problem was that ALTER TABLE on a merge table which was locked 
      using LOCK TABLE ... WRITE, by mistake gave 
      ER_TABLE_NOT_LOCKED_FOR_WRITE.
      
      During opening of the table to be ALTERed, open_table() tried to
      get an upgradable metadata lock. In LOCK TABLEs mode, this lock
      must already exist (i.e. taken by LOCK TABLE) as new locks of this
      type cannot be acquired for fear of deadlock. So in LOCK TABLEs
      mode, open_table() tried to find an existing upgradable lock for
      the table to be altered.
      
      The problem was that open_table() also tried to find upgradable
      metadata locks for children of merge tables even if no such
      locks are needed to execute ALTER TABLE on merge tables.
      
      This patch fixes the problem by making sure that open tables code
      only searches for upgradable metadata locks for the merge table
      and not for the merge children tables. 
      
      The patch also fixes a related bug where an upgradable metadata
      lock was aquired outside of LOCK TABLEs mode even if the table in
      question was temporary. This bug meant that LOCK TABLES or DDL on
      temporary tables by mistake could be blocked/aborted by locks held
      on base tables with the same table name by other connections.
      
      Test cases added to merge.test and lock_multi.test.
      7fd30bf6
    • Jon Olav Hauglid's avatar
      Bug #51336 Assert in reload_acl_and_cache during RESET QUERY CACHE · a42cbe06
      Jon Olav Hauglid authored
      Attempts to execute RESET statements within a transaction that
      had acquired metadata locks, led to an assertion failure on 
      debug servers. This bug didn't cause any problems on release
      builds.
      
      The triggered assert is designed to check that caches are not
      flushed or reset while having active transactions. It is triggered
      if acquired metadata locks exist that are not from LOCK TABLE or
      HANDLER statements.
      
      In this case it was triggered by RESET QUERY CACHE while having
      an active transaction that had acquired locks. The reason the
      assertion was triggered, was that RESET statements, unlike the
      similar FLUSH statements, was not causing an implicit commit.
      
      This patch fixes the problem by making sure RESET statements
      commit the current transaction before executing. The commit
      causes acquired metadata locks to be released, preventing the
      assertion from being triggered.
      
      Incompatible change: This patch changes RESET statements so
      that they cause an implicit commit.
      
      Test case added to query_cache.test.
      a42cbe06
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-next-mr. · 2f4e94d7
      Alexander Nozdrin authored
      2f4e94d7
    • Alexander Nozdrin's avatar
      242a5a94
    • Vladislav Vaintroub's avatar
      merge · 0b627c71
      Vladislav Vaintroub authored
      0b627c71
  3. 25 Feb, 2010 11 commits
    • Vladislav Vaintroub's avatar
      Bug#51502: building with cmake creates an invalid mysqld_safe. · 3fcd8548
      Vladislav Vaintroub authored
      The problem was incorrect escaping used inside a strnig : in \"$MYSQLD\" was written as "\MYSQL\" 
      (backslash and quote characters transposed), when defining FIND_PROC  variable for BSD or SysV
      style "ps" command-
      
      Additionally fixed obvious code duplication and random naming in CHECK_PID test.
      3fcd8548
    • Alexander Nozdrin's avatar
      Null-merge from mysql-trunk-bugfixing. · c358da1b
      Alexander Nozdrin authored
      c358da1b
    • Alexander Nozdrin's avatar
      Null-merge from mysql-next-mr. · a77f9297
      Alexander Nozdrin authored
      a77f9297
    • Alexander Nozdrin's avatar
      Null-merge from mysql-trunk. · 5143331c
      Alexander Nozdrin authored
      5143331c
    • Alexander Nozdrin's avatar
      Fix default.conf. · 49e7114f
      Alexander Nozdrin authored
      49e7114f
    • Alexander Nozdrin's avatar
      Fix default.conf. · b1fbd77e
      Alexander Nozdrin authored
      b1fbd77e
    • Jon Olav Hauglid's avatar
      Bug #51355 handler stmt cause assertion in · 3f1a9baf
      Jon Olav Hauglid authored
                 bool MDL_context::try_acquire_lock(MDL_request*)
      
      This assert was triggered in the following way:
      1) HANDLER OPEN t1 from connection 1
      2) DROP TABLE t1 from connection 2. This will block due to the metadata lock
      held by the open handler in connection 1.
      3) DML statement (e.g. INSERT) from connection 1. This will close the table
      opened by the HANDLER in 1) and release its metadata lock. This is done due
      to the pending exclusive metadata lock from 2). 
      4) DROP TABLE t1 from connection 2 now completes and removes table t1.
      5) HANDLER READ from connection 1. Since the handler table was closed in 3),
      the handler code will try to reopen the table. First a new metadata lock on
      t1 will be granted before the command fails since the table was removed in 4).
      6) HANDLER READ from connection 1. This caused the assert.
      
      The reason for the assert was that the MDL_request's pointer to the lock
      ticket was not reset when the statement failed. HANDLER READ then tried to
      acquire a lock using the same MDL_request object, triggering the assert.
      This bug was only noticeable on debug builds and did not cause any problems
      on release builds.
      
      This patch fixes the problem by assuring that the pointer to the metadata 
      lock ticket is reset when reopening of handler tables fails.
      
      Test case added to handler.inc
      3f1a9baf
    • Vladislav Vaintroub's avatar
      Workaround crash with dtraced shared libraries under GCC 3.4.6 on 32 bit Solaris. · 46800354
      Vladislav Vaintroub authored
      Crash happens in dlopen() code when trying to load the library. Crash does not happen when library is 
      not DTrace instrumented . Additionally, crash does not happen with default Solaris 10 GCC 3.4.3 and
      it does not happen if main executable is instrumented.
      
      So , just check for this specific situation (32 bit, GCC3.4.6 , Solaris) and disable Dtrace in shared libraries.
      We have only single plugin so far that is instrumented (ha_example)
      46800354
    • Jon Olav Hauglid's avatar
      merge from mysql-next-mr-bugfixing · 8a5956c9
      Jon Olav Hauglid authored
      8a5956c9
    • Alexey Botchkov's avatar
      Bug#41103 6.0 Windows embedded-server tests fail · c510ded6
      Alexey Botchkov authored
          Two problems addressed here:
             Embedded-server linking failure.
                sql/sys_vars.cc absents in the libmysqld/CMakeLists.txt
             The PERFORMANCE_SCHEMA-related failure of the embedded-server compilation.
                We try to disable the PERFORMANCE_SCHEMA in the embedded server
                as it's considered useless there. But we do it in wrong way as
                we only disable header's links to the PF, not the PF's library itself.
                So on Unix-ex the embedded library still contains the PF code and
                grows bigger with no reason. On Windows that just fails to compile.
                   
      per-file comments:
        include/my_global.h
      Bug#41103      6.0 Windows embedded-server tests fail
            No PERFORMANCE_SCHEMA disabling in the embedded server. User can
            just use the --without-perfschema-engine-plugin option to exclude it
            from the compilation.
      c510ded6
    • Vladislav Vaintroub's avatar
      On Solaris, overwrite CMake's proposed thread library -lthread with -lpthread. · 527ff458
      Vladislav Vaintroub authored
      -lthread works fine in most cases, but at least with gcc 3.4.6 on x86, dlopen() crashes when libpthread is not used. 
      Note : the workaround existed prior and did not work  since CMAKE_THREADS_LIBS_INIT was already
       in cache.  Now, use SET(.. CACHE FORCE)  to overwrite the cached value.
      527ff458
  4. 24 Feb, 2010 10 commits
    • Vladislav Vaintroub's avatar
      merge · aa526020
      Vladislav Vaintroub authored
      aa526020
    • Jonathan Perkin's avatar
      Some CMake packaging fixes: · 46b22d5e
      Jonathan Perkin authored
       - Remove INSTALL-BINARY from installed docs directory, we provide a copy
         in the root directory (but perhaps this should be revisited later).
      
       - Disable audit_null and daemon_example plugins.
      
       - Fix the docs directory.
      
       - Remove mysql-test/Makefile.in
      
       - Build and install mysql_tzinfo_to_sql
      
       - Remove share/charsets/languages.html
      46b22d5e
    • Vladislav Vaintroub's avatar
      #51466 : Source packages are broken with cmake in a cmake-agnostic environment · bcebd973
      Vladislav Vaintroub authored
      In the worst case possible scenario (no bzr, in-source build),
      make dist produced a package that compiled ok with autotools
      but failed to package because extra make_binary_distribution was
      found in source package and was not built. make_binary_distribution
      contained paths of the build machine.
      
      Fix:  exclude some scripts that are produced in cmake build. 
      Note that there is no good general fix for it in this specific scenario.
      it is advisable to build source packages out of source or in bzr repo.
      bcebd973
    • Vladislav Vaintroub's avatar
      Fix --with-ssl mappping (--with-ssl=dir should be "yes" or · 60c7cc87
      Vladislav Vaintroub authored
      actually "system"), --with-ssl should be "bundled".
      
      Fixes error on sol-gcc-x86, where build machine had  openssl but not
      the test box.
      60c7cc87
    • Jon Olav Hauglid's avatar
      Followup to Bug#45225 Locking: hang if drop table with no timeout · e60ef893
      Jon Olav Hauglid authored
      This patch prevents system threads and system table accesses from
      using user-specified values for "lock_wait_timeout". Instead all
      such accesses are done using the default value (1 year).
      
      This prevents background tasks (such as replication, events, 
      accessing stored function definitions, logging, reading time-zone
      information, etc.) from failing in cases where the global value
      of "lock_wait_timeout" is set very low.
      
      The patch also simplifies the open tables API. Rather than adding
      another convenience function for opening and locking system tables,
      this patch removes most of the existing convenience functions for
      open_and_lock_tables_derived(). Before, open_and_lock_tables() was
      a convenience function that enforced derived tables handling, while
      open_and_lock_tables_derived() was the main function where derived
      tables handling was optional. Now, this convencience function is
      gone and the main function is renamed to open_and_lock_tables(). 
      
      No test case added as it would have required the use of --sleep to
      check that system threads and system tables have a different timeout
      value from the user-specified "lock_wait_timeout" system variable.
      e60ef893
    • Alexander Nozdrin's avatar
      a54c49b0
    • Marc Alff's avatar
      Fixed tests for windows · f5070c26
      Marc Alff authored
      f5070c26
    • Vladislav Vaintroub's avatar
      merge · 5994f284
      Vladislav Vaintroub authored
      5994f284
    • Vladislav Vaintroub's avatar
      Fix typo · 0faa8ef8
      Vladislav Vaintroub authored
      HAVE_IBGCC_ATOMIC_BUILTINS=>HAVE_IB_GCC_ATOMIC_BUILTINS.
      Due to the typo, detection of atomics was broken. 
      It also lead to valgrind error during shutdown 
      (access to freed memory),which is likely present 
      in all builds where atomics are not used.
      0faa8ef8
    • Marc Alff's avatar
      Bug#10143 Perror not showing error description · c7fa0c1b
      Marc Alff authored
      Backport to 5.5.99
      c7fa0c1b
  5. 23 Feb, 2010 7 commits