1. 22 Nov, 2007 1 commit
  2. 21 Nov, 2007 3 commits
  3. 20 Nov, 2007 4 commits
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/17244-5.1 · ea9c593a
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      
      ea9c593a
    • unknown's avatar
      This issue was fixed in Bug 30904 which includes a similar test case. · aac6f106
      unknown authored
      
      mysql-test/t/sp_notembedded.test:
        Remove test case, it's not needed any more.
      aac6f106
    • unknown's avatar
      Merge endora.local:/Users/davi/mysql/bugs/31397-5.1 · 7cf04ced
      unknown authored
      into  endora.local:/Users/davi/mysql/mysql-5.1-runtime
      
      
      sql/sql_class.cc:
        Auto merged
      7cf04ced
    • unknown's avatar
      Bug#31397 Inconsistent drop table behavior of handler tables. · 4d6543a6
      unknown authored
      The problem is that DROP TABLE and other DDL statements failed to
      automatically close handlers associated with tables that were marked
      for reopen (FLUSH TABLES).
      
      The current implementation fails to properly discard handlers of
      dropped tables (that were marked for reopen) because it searches
      on the open handler tables list and using the current alias of the
      table being dropped. The problem is that it must not use the open
      handler tables list to search because the table might have been
      closed (marked for reopen) by a flush tables command and also it
      must not use the current table alias at all since multiple different
      aliases may be associated with a single table. This is specially
      visible when a user has two open handlers (using alias) of a same
      table and a flush tables command is issued before the table is
      dropped (see test case). Scanning the handler table list is also
      useless for dropping handlers associated with temporary tables,
      because temporary tables are not kept in the THD::handler_tables
      list.
      
      The solution is to simple scan the handlers hash table searching
      for, and deleting all handlers with matching table names if the
      reopen flag is not passed to the flush function, indicating that
      the handlers should be deleted. All matching handlers are deleted
      even if the associated the table is not open.
      
      
      mysql-test/include/handler.inc:
        Add test case for Bug#31397
      mysql-test/r/handler_innodb.result:
        Add test case result for Bug#31397
      mysql-test/r/handler_myisam.result:
        Add test case result for Bug#31397
      sql/mysql_priv.h:
        Rename flush functions to better match the intent of the caller and
        update functions prototypes and remove unused flags.
      sql/sql_base.cc:
        Rename flush functions to better match the intent of the caller.
      sql/sql_class.cc:
        Rename the flush functions to better match the intent of the caller.
        The hash_free function is moved to the cleanup.
      sql/sql_handler.cc:
        When dropping tables for a final close, scan the handler's hash table since
        the table might not be in the handlers open table list because the table was
        marked for reopen or because it's a temporary table.
      sql/sql_rename.cc:
        Drop handlers associated with tables that are being renamed.
      sql/sql_table.cc:
        Now that temporary tables are properly removed even when opened
        by a SQL HANDLER, enable the assert since this branch can't be taken
        outside of SF/trigger/prelocked mode.
      4d6543a6
  4. 19 Nov, 2007 1 commit
    • unknown's avatar
      Bug #31153 calling stored procedure crashes server if available memory is low · bb681dbc
      unknown authored
      When the server was out of memory it crashed because of invalid memory access.
      
      This patch adds detection for failed memory allocations and make the server
      output a proper error message.
      
      
      sql/mysqld.cc:
        Don't try to push_warning from within push_warning. It will cause a recursion
        until the stack is consumed.
        
        If my_net_init fails (for example: because of OOM) the temporary vio object 
        might have been attached to the thd object already. This will cause a double
        free on the vio object when the thd object is deleted later on and the server
        will crash.
      sql/sp_head.cc:
        Added check for out-of-memory on a 'new' operation.
        Refactored reset_lex method to return a error state code instead of void.
        Initialize the mem-root with init_sql_alloc to get a basic error handler for
        memory allocation problems. This alone won't prevent the server from crashing,
        NULL pointers have to be accounted for as well.
      sql/sp_head.h:
        Use the throw() clause in operator new, to indicate to the compiler that
        memory allocation can fail and return NULL, so that the compiler should
        generate code to check for NULL before invoking C++ constructors, to be
        crash safe.
      sql/sql_base.cc:
        Use init_sql_alloc to get basic out-of-memory error handling.
      sql/sql_lex.h:
        Use the throw() clause in operator new, to indicate to the compiler that
        memory allocation can fail and return NULL, so that the compiler should
        generate code to check for NULL before invoking C++ constructors, to be
        crash safe.
      sql/sql_prepare.cc:
        Use init_sql_alloc to get basic out-of-memory error handling.
      sql/sql_yacc.yy:
        Check for memory allocation failures where it matters.
      bb681dbc
  5. 15 Nov, 2007 2 commits
    • unknown's avatar
      Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base · d87ae86b
      unknown authored
      into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
      
      
      sql/events.cc:
        Auto merged
      d87ae86b
    • unknown's avatar
      A patch for BUG#19723: kill of active connection yields · 91f00139
      unknown authored
      different error code depending on platform.
      
      On Mac OS X, KILL statement issued to kill the current
      connection would return a different error code and message than on
      other platforms ('MySQL server has gone away' instead of 'Shutdown
      in progress').
      
      The reason for this difference was that on Mac OS X we have macro
      SIGNAL_WITH_VIO_CLOSE defined. This macro forces KILL
      implementation to close the communication socket of the thread
      that is being killed. SIGNAL_WITH_VIO_CLOSE macro is defined on
      platforms where just sending a signal is not a reliable mechanism
      to interrupt the thread from sleeping on a blocking system call.
      In a nutshell, closing the socket is a hack to work around an
      operating system bug and awake the blocked thread no matter what.
      
      However, if the thread that is being killed is the same
      thread that issued KILL statement, closing the socket leads to a
      prematurely lost connection. At the same time it is not necessary
      to close the socket in this case, since the thread in question
      is not inside a blocking system call.
      
      The fix, therefore, is to not close the socket if the thread that
      is being killed is the same that issued KILL statement, even with
      defined SIGNAL_WITH_VIO_CLOSE.
      
      
      mysql-test/r/kill.result:
        Update result file.
      mysql-test/t/kill.test:
        Added a test case for BUG#19723: kill of active connection yields
        different error code depending on platform.
      sql/sql_class.cc:
        Call close_active_vio() only if we're killing another thread.
      91f00139
  6. 14 Nov, 2007 3 commits
  7. 13 Nov, 2007 3 commits
    • unknown's avatar
      Bug#32091: Security breach via directory changes · b3a71e34
      unknown authored
      Post pushbuild fix
      
      Disabled test on windows due to bug#30459
      (DATA/INDEX DIR for partitions not working on windows)
      
      Patch from Mattias Jonsson.
      
      
      mysql-test/r/partition_mgm.result:
        Bug#32091: Security breach via directory changes
        
        fixed non-windows lines.
      mysql-test/t/partition_mgm.test:
        Bug#32091: Security breach via directory changes
        
        fixed non-windows lines.
      mysql-test/t/partition_symlink.test:
        Bug#32091: Security breach via directory changes
        
        Added no_windows, since it is affected of bug#30459
      b3a71e34
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines · dcfeb8f9
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.1-bug31210
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      dcfeb8f9
    • unknown's avatar
      Bug#32078 - Excessive warnings: One can only use the --user switch · fca6284c
      unknown authored
                  if running as root
      
      Every start of a server in the test suite raised that warning.
      
      The cause was an unconditionla add of the --user option to the
      server command line. Only the "root" user (effective user id == 0)
      must use that option.
      
      Added check for effective user id == 0 before adding --user.
      
      Thanks to Magnus Svensson for the patch.
      
      
      mysql-test/mysql-test-run.pl:
        Bug#32078 - Excessive warnings: One can only use the --user switch
                    if running as root
        Added check for effective user id == 0 before adding --user
        in mysqld_arguments().
      fca6284c
  8. 12 Nov, 2007 22 commits
    • unknown's avatar
      Merge mattiasj@bk-internal.mysql.com:/home/bk/mysql-5.0-engines · 001c78e2
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
      
      
      001c78e2
    • unknown's avatar
      Merge mattiasj@bk-internal.mysql.com:/home/bk/mysql-5.1-engines · 6e7e3ed6
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main
      
      
      6e7e3ed6
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-main · 53907ce8
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
      
      
      53907ce8
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-main · 1b98a962
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main
      
      
      libmysqld/lib_sql.cc:
        Auto merged
      mysql-test/include/mix1.inc:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      sql/event_scheduler.cc:
        Auto merged
      sql/events.cc:
        Auto merged
      sql/ha_ndbcluster_binlog.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_connect.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      1b98a962
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines · 423896ae
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.1-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      423896ae
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines · 2aa5037c
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      2aa5037c
    • unknown's avatar
      symlink.test, symlink.result: · 9f9ff461
      unknown authored
        Use proper variable for test.
      
      
      mysql-test/t/symlink.test:
        Use proper variable for test.
      mysql-test/r/symlink.result:
        Use proper variable for test.
      9f9ff461
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines · 71328b4f
      unknown authored
      into  stella.local:/home2/mydev/mysql-5.1-bug31210
      
      
      71328b4f
    • unknown's avatar
      A patch for BUG#32172: information_schema test fails with · 0dda7aa6
      unknown authored
      wait_condition timeout.
      
      The problem was that the event thread didn't manage to execute
      the event in 30 seconds on highly-loaded box. The fix is to
      increase timeout.
      
      This is a fix for the test suite.
      
      
      mysql-test/t/information_schema.test:
        Provide more time to execute an event.
      0dda7aa6
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-fixtopush · e116210a
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-lastfinaltopush
      
      
      e116210a
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug29368 · c04eeac1
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-lastfinaltopush
      
      
      mysql-test/r/partition.result:
        Auto merged
      c04eeac1
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug31705 · dee26bdc
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-lastfinaltopush
      
      
      dee26bdc
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-bug32091 · c03f01eb
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-lastfinaltopush
      
      
      c03f01eb
    • unknown's avatar
      Bug#31705 Partitions: crash if varchar length > 65530 · 85d1853e
      unknown authored
      Buffer overflow due to wrong key length in partitioning
      
      Changed to the correct key_length function.
      
      
      sql/opt_range.cc:
        Bug#31705 Partitions: crash if varchar length > 65530
        Problem: buffer overflow due to wrong key-length
        
        Fix: Using correct key_length function
      mysql-test/r/partition_datatype.result:
        Bug#31705 Partitions: crash if varchar length > 65530
        New test-result case for testing all column types
        used in key-partitioning.
        
        (For verifying correct key-length use)
      mysql-test/t/partition_datatype.test:
        Bug#31705 Partitions: crash if varchar length > 65530 
        New test case for testing all column types
        used in key-partitioning.
        
        (For verifying correct key-length used)
      85d1853e
    • unknown's avatar
      Bug#32091: Security breach via directory changes · 4cb47bdd
      unknown authored
      Merge fix
      
      partition_mgm did not require have_symlink.
      
      Moved the test case to partition_symlink, which
      require have_symlink, and should work on both *nix and
      Windows
      
      
      mysql-test/r/partition_mgm.result:
        Bug#32091: Security breach via directory changes
        
        Moved the test case to partition_symlink.
      mysql-test/t/partition_mgm.test:
        Bug#32091: Security breach via directory changes
        
        Moved the test case to partition_symlink.
      mysql-test/r/partition_symlink.result:
        Bug#32091: Security breach via directory changes
        
        Moved the test case to partition_symlink. It requires
        have_symlink.
      mysql-test/t/partition_symlink.test:
        Bug#32091: Security breach via directory changes
        
        Moved the test case to partition_symlink. It requires
        have_symlink.
      4cb47bdd
    • unknown's avatar
      Bug#31210 - INSERT DELAYED crashes server when used on · efa10a00
      unknown authored
                      partitioned table
          
      Post-pushbuild fix
          
      Pushbuild detected yet another need for lex initialization in
      embedded server.
      
      
      libmysqld/lib_sql.cc:
        Bug#31210 - INSERT DELAYED crashes server when used on
                            partitioned table
        Initialized lex for later use in open_table().
      efa10a00
    • unknown's avatar
      Fix for a BUG#31898: 16M memory allocations for user variables · 819eaead
      unknown authored
      in stored procedure.
      
      The problem was that MySQL used unnecessarily large amounts of
      memory if user variables were used as an argument to CONCAT or
      CONCAT_WS -- 16M per each user variable used.
      
      Technically, it happened because MySQL used the following
      allocation strategy for string functions to avoid multiple
      realloc() calls: in the virtual operation fix_length_and_dec()
      the attribute max_length was calculated as a sum of max_length
      values for each argument.
      
      Although this approach worked well for small (or fixed) data types,
      there could be a problem if there as a user variable among
      the arguments of a string function -- max_length of the function
      would be 16M (as the max_length of a user variable is 16M).
      
      Both CONCAT() and CONCAT_WS() functions suffer from this problem.
      
      The fix is to do not use meta-data for allocating memory.
      The following strategy is proposed instead: allocate the exact
      length of the result string at the first record, double the amount
      of memory allocated when it is required.
      
      No test case for this bug because there is no way to test memory
      consumption in a robust way with our test suite.
      
      
      sql/item_strfunc.cc:
        Implement memory-wise allocation strategy.
      819eaead
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines · e1d98e8d
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.1-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      mysys/my_symlink2.c:
        Auto merged
      e1d98e8d
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines · c63fd4dd
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      mysys/my_symlink2.c:
        Auto merged
      c63fd4dd
    • unknown's avatar
      After merge fix. · 88701b45
      unknown authored
      88701b45
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0 · a1e38552
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
      
      
      mysys/my_symlink2.c:
        Auto merged
      mysql-test/r/symlink.result:
        SCCS merged
      mysql-test/t/symlink.test:
        SCCS merged
      a1e38552
    • unknown's avatar
      BUG#31611 (Security risk with BINLOG statement): · c4f94b70
      unknown authored
      Adding missing drop of user created for test case.
      
      
      mysql-test/r/mysqlbinlog.result:
        Result file change.
      mysql-test/t/mysqlbinlog.test:
        Dropping user that was added earlier in the test.
      c4f94b70
  9. 11 Nov, 2007 1 commit
    • unknown's avatar
      Bug#30695: An apostrophe ' in the comment of the ADD PARTITION · 7642ea9a
      unknown authored
          causes the Server to crash.
      
      Post-pushbuild fix
      
      Pushbuild genereted valgrind warnings.
      
      Changed function to safer variant.
      
      
      sql/sql_partition.cc:
        Bug#30695: An apostrophe ' in the comment of the ADD PARTITION
            causes the Server to crash.
        
        Fix for valgrind warning in pushbuild.
        String.c_prt fcn is not as safe as comment says.
        (gives valgrind errors in this case)
      7642ea9a