1. 23 Aug, 2006 1 commit
  2. 22 Aug, 2006 3 commits
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · b57681f9
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-8153
      
      
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      b57681f9
    • unknown's avatar
      Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 · 9a9d7c31
      unknown authored
      into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21051-2
      
      
      include/mysql_com.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      9a9d7c31
    • unknown's avatar
      BUG#21051: RESET QUERY CACHE very slow when query_cache_type=0 · 24edd5d9
      unknown authored
      There were two problems: RESET QUERY CACHE took a long time to complete
      and other threads were blocked during this time.
      
      The patch does three things:
        1 fixes a bug with improper use of test-lock-test_again technique.
            AKA Double-Checked Locking is applicable here only in few places.
        2 Somewhat improves performance of RESET QUERY CACHE.
            Do my_hash_reset() instead of deleting elements one by one.  Note
            however that the slowdown also happens when inserting into sorted
            list of free blocks, should be rewritten using balanced tree.
        3 Makes RESET QUERY CACHE non-blocking.
            The patch adjusts the locking protocol of the query cache in the
            following way: it introduces a flag flush_in_progress, which is
            set when Query_cache::flush_cache() is in progress.  This call
            sets the flag on enter, and then releases the lock.  Every other
            call is able to acquire the lock, but does nothing if
            flush_in_progress is set (as if the query cache is disabled).
            The only exception is the concurrent calls to
            Query_cache::flush_cache(), that are blocked until the flush is
            over.  When leaving Query_cache::flush_cache(), the lock is
            acquired and the flag is reset, and one thread waiting on
            Query_cache::flush_cache() (if any) is notified that it may
            proceed.
      
      
      include/mysql_com.h:
        Add comment for NET::query_cache_query.
      sql/net_serv.cc:
        Use query_cache_init_query() for initialization of
        NET::query_cache_query if query cache is used.
        Do not access net->query_cache_query without a lock.
      sql/sql_cache.cc:
        Fix bug with accessing query_cache_size, Query_cache_query::wri and
        thd->net.query_cache_query before acquiring the lock---leave
        double-check locking only in safe places.
        Wherever we check that cache is usable (query_cache_size > 0) we now
        also check that flush_in_progress is false, i.e. we are not in the
        middle of cache flush.
        Add Query_cache::not_in_flush_or_wait() method and use it in
        Query_cache::flush_cache(), so that threads doing cache flush will
        wait it to finish, while other threads will bypass the cache as if
        it is disabled.
        Extract Query_cache::free_query_internal() from Query_cache::free_query(),
        which does not removes elements from the hash, and use it together with
        my_hash_reset() in Query_cache::flush_cache().
      sql/sql_cache.h:
        Add declarations for new members and methods.
        Make is_cacheable() a static method.
        Add query_cache_init_query() function.
      sql/sql_class.cc:
        Use query_cache_init_query() for initialization of
        NET::query_cache_query.
      24edd5d9
  3. 21 Aug, 2006 2 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 8d498ce7
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg21216-2
      
      8d498ce7
    • unknown's avatar
      Fix for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes · c9a9d014
      unknown authored
      server to crash".
      
      Crash caused by assertion failure happened when one ran SHOW OPEN TABLES
      while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE
      or any other command that takes name-lock) in other connection.
      For non-debug version of server problem exposed itself as wrong output
      of SHOW OPEN TABLES statement (it was missing name-locked tables).
      Finally in 5.1 both debug and non-debug versions simply crashed in
      this situation due to NULL-pointer dereference.
      
      This problem was caused by the fact that table placeholders which were
      added to table cache in order to obtain name-lock had TABLE_SHARE::table_name
      set to 0. Therefore they broke assumption that this member is non-0 for
      all tables in table cache which was checked by assert in list_open_tables()
      (in 5.1 this function simply relies on it).
      The fix simply sets this member for such placeholders to appropriate value
      making this assumption true again.
      
      This patch also includes test for similar bug 12212 "Crash that happens
      during removing of database name from cache" reappeared in 5.1 as bug 19403.
      
      
      mysql-test/r/drop.result:
        Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES
        causes server to crash" and bug#12212/19403 "Crash that happens during
        removing of database name from cache".
      mysql-test/t/drop.test:
        Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES
        causes server to crash" and bug#12212/19403 "Crash that happens during
        removing of database name from cache".
      sql/lock.cc:
        lock_table_name():
          Our code assumes that TABLE_SHARE::table_name for objects in table cache
          is non-NULL (for example look at assertion in list_open_tables()). This
          was not true for table placeholders that were added to table cache for
          name-locking. So let us set this member for such placeholders.
      c9a9d014
  4. 19 Aug, 2006 1 commit
    • unknown's avatar
      WL#3432 (Compile the Parser with a --debug --verbose option) · a91d8ffd
      unknown authored
      Corrected build issues : the build can not be conditional.
      to keep a unique source .tar.gz distribution.
      
      
      configure.in:
        Rolling back previous change
      sql/Makefile.am:
        Partially rolling back previous change.
        The build has to be unconditional, for the source .tar.gz distribution
      sql/mysql_priv.h:
        WL#3432 (Compile the Parser with a --debug --verbose option)
      sql/sql_parse.cc:
        WL#3432 (Compile the Parser with a --debug --verbose option)
        
        Moved turn_parser_debug_on to sql_yacc.yy
      sql/sql_yacc.yy:
        WL#3432 (Compile the Parser with a --debug --verbose option)
        
        Moved turn_parser_debug_on to sql_yacc.yy
      a91d8ffd
  5. 17 Aug, 2006 1 commit
    • unknown's avatar
      WL#3432 (Compile the Parser with a --debug --verbose option) · beecf734
      unknown authored
      Changed the automake build process :
      - ./configure.in
      - ./sql/Makefile.am
      to compile an instrumented parser for debug=yes or debug=full builds
      
      Changed the (primary) runtime invocation of the parser :
      - sql/sql_parse.cc
      to generate bison traces in stderr when the DBUG "parser_debug" flag is set.
      
      
      configure.in:
        WL#3432 (Compile the Parser with a --debug --verbose option)
        
        New Automake condition : MYSQL_CONF_DEBUG
      sql/Makefile.am:
        WL#3432 (Compile the Parser with a --debug --verbose option)
        
        In Debug mode, compile sql_yacc.yy with --debug --verbose
      sql/sql_parse.cc:
        WL#3432 (Compile the Parser with a --debug --verbose option)
        
        Conditionally turn the bison parser debug on at runtime.
      beecf734
  6. 15 Aug, 2006 1 commit
  7. 03 Aug, 2006 1 commit
    • unknown's avatar
      Bug#8153 (Stored procedure with subquery and continue handler, wrong result) · dd587d41
      unknown authored
      Before this fix,
      - a runtime error in a statement in a stored procedure with no error handlers
      was properly detected (as expected)
      - a runtime error in a statement with an error handler inherited from a non
      local runtime context (i.e., proc a with a handler, calling proc b) was
      properly detected (as expected)
      - a runtime error in a statement with a *local* error handler was executed
      as follows :
      a) the statement would succeed, regardless of the error condition, (bug)
      b) the error handler would be called (as expected).
      
      The root cause is that functions like my_messqge_sql would "forget" to set
      the thread flag thd->net.report_error to 1, because of the check involving
      sp_rcontext::found_handler_here().
      Failure to set this flag would cause, later in the call stack,
      in Item_func::fix_fields() at line 190, the code to return FALSE and consider
      that executing the statement was successful.
      
      With this fix :
      - error handling code, that was duplicated in different places in the code,
      is now implemented in sp_rcontext::handle_error(),
      - handle_error() correctly sets thd->net.report_error when a handler is
      present, regardless of the handler location (local, or in the call stack).
      
      A test case, bug8153_subselect, has been written to demonstrate the change
      of behavior before and after the fix.
      
      Another test case, bug8153_function_a, as also been writen.
      This test has the same behavior before and after the fix.
      This test has been written to demonstrate that the previous expected
      result of procedure bug18787, was incorrect, since select no_such_function()
      should fail and therefore not produce a result.
      
      The incorrect result for bug18787 has the same root cause as Bug#8153,
      and the expected result has been adjusted.
      
      
      sql/mysqld.cc:
        Bug#8153, use sp_rcontext::handle_error() to handle errors.
      sql/sql_error.cc:
        Bug#8153, use sp_rcontext::handle_error() to handle errors.
      sql/protocol.cc:
        Bug#8153, use sp_rcontext::handle_error() to handle errors.
      sql/sp_rcontext.h:
        Bug#8153, created helper sp_rcontext::handle_error() to handle errors.
      sql/sp_rcontext.cc:
        Bug#8153, created helper sp_rcontext::handle_error() to handle errors.
      mysql-test/t/sp.test:
        Bug#8153, added test cases.
      mysql-test/r/sp.result:
        Bug#8153, added test cases, fixed expected result of bug18787.
      dd587d41
  8. 02 Aug, 2006 15 commits
    • unknown's avatar
      Disable a failing test case (filed a p1 bug) · 20bbefdb
      unknown authored
      20bbefdb
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 4f3a18e1
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
      
      
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.h:
        Auto merged
      mysql-test/r/sp.result:
        Manual merge.
      mysql-test/r/udf.result:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      mysql-test/t/udf.test:
        Manual merge.
      4f3a18e1
    • unknown's avatar
      A post-merge fix. · b39cf252
      unknown authored
      b39cf252
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · b9dc69b8
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
      
      
      client/mysql.cc:
        Auto merged
      b9dc69b8
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 397be189
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
      
      
      mysql-test/r/ps_1general.result:
        Auto merged
      mysql-test/t/ps_1general.test:
        Auto merged
      397be189
    • unknown's avatar
      Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql · d47f48f7
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
      
      
      mysql-test/Makefile.am:
        Auto merged
      scripts/make_win_src_distribution.sh:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      client/mysqltest.c:
        Manual merge
      d47f48f7
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0 · ffdb852f
      unknown authored
      into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
      
      
      client/mysql.cc:
        Auto merged
      mysql-test/r/date_formats.result:
        Auto merged
      mysql-test/r/func_str.result:
        Auto merged
      mysql-test/t/date_formats.test:
        Auto merged
      mysql-test/t/func_str.test:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/time.cc:
        Auto merged
      mysql-test/r/sp.result:
        Manual merge
      mysql-test/t/sp.test:
        Manual merge
      ffdb852f
    • unknown's avatar
      Merge moonbone.local:/work/tmp_merge-4.1 · ed531699
      unknown authored
      into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
      
      ed531699
    • unknown's avatar
      Merge moonbone.local:/work/tmp_merge-4.1 · 02c4142f
      unknown authored
      into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
      
      
      sql/item_strfunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      02c4142f
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1 · b594639a
      unknown authored
      into  mysql.com:/home/hf/work/mysql-4.1.20317
      
      b594639a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 9813aff5
      unknown authored
      into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
      
      
      include/mysql.h:
        Auto merged
      include/sql_common.h:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      ndb/src/mgmsrv/ConfigInfo.cpp:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sql_lex.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql-common/client.c:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.h:
        Auto merged
      mysql-test/r/ps.result:
        Manual merge.
      mysql-test/r/sp.result:
        Manual merge.
      mysql-test/t/ps.test:
        Manual merge.
      mysql-test/t/sp.test:
        Manual merge.
      sql/sql_prepare.cc:
        Manual merge.
      sql/table.cc:
        Manual merge.
      tests/mysql_client_test.c:
        Manual merge.
      9813aff5
    • unknown's avatar
      Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0 · 0a5b8ba6
      unknown authored
      into  lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
      
      0a5b8ba6
    • unknown's avatar
      Fix a compilation failiure on QNX · ec05d4b0
      unknown authored
      
      sql/udf_example.c:
        Declare tmp_error at the beginning of the block (this is C now)
      ec05d4b0
    • unknown's avatar
      Bug #21396: Wrong error number generated for a missing table · 00e2974f
      unknown authored
      
      BitKeeper/etc/collapsed:
        BitKeeper file /home/georg/work/mysql/prod/mysql-5.0/BitKeeper/etc/collapsed
      mysys/my_open.c:
        Win64 bit fix: Replacing 32-bit value (0xFFFFFFFF) by a generic error constant.
      00e2974f
    • unknown's avatar
      .del-sp.test.orig: · eae15716
      unknown authored
        Delete: mysql-test/t/sp.test.orig
      
      
      BitKeeper/deleted/.del-sp.test.orig:
        Delete: mysql-test/t/sp.test.orig
      eae15716
  9. 01 Aug, 2006 9 commits
  10. 31 Jul, 2006 6 commits