1. 25 May, 2007 1 commit
    • unknown's avatar
      Fix for bug#28666 CREATE EVENT ... EVERY 0 SECOND let server crash · 6dc3c042
      unknown authored
      A missing check for zero value of interval was added.
      
      
      mysql-test/r/events_bugs.result:
        update result file
      mysql-test/t/events_bugs.test:
        add test case for bug#28666 CREATE EVENT ... EVERY 0 SECOND let server crash
      sql/event_data_objects.cc:
        add a missing check about zero value for interval
      6dc3c042
  2. 24 May, 2007 16 commits
  3. 23 May, 2007 16 commits
    • unknown's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-5.0-like · 9ac9acd4
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-like-2
      
      
      sql/handler.h:
        Auto merged
      sql/mysql_priv.h:
        5.1 version of mysql_priv.h already contains all necessary changes.
      sql/sql_parse.cc:
        5.1 version of sql_parse.cc already contains all necessary changes.
      sql/sql_table.cc:
        5.1 version of sql_table.cc already contains all necessary changes.
      sql/sql_yacc.yy:
        SCCS merged
      mysql-test/r/grant2.result:
        Manual merge.
      mysql-test/t/grant2.test:
        Manual merge.
      9ac9acd4
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · aab53c0d
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-like-2
      
      
      sql/sql_parse.cc:
        Auto merged
      aab53c0d
    • unknown's avatar
      5.1 version of fix for: · 5698a6a8
      unknown authored
        Bug #23667 "CREATE TABLE LIKE is not isolated from alteration
                    by other connections"
        Bug #18950 "CREATE TABLE LIKE does not obtain LOCK_open"
      As well as:
        Bug #25578 "CREATE TABLE LIKE does not require any privileges
                    on source table".
      
      The first and the second bugs resulted in various errors and wrong
      binary log order when one tried to execute concurrently CREATE TABLE LIKE
      statement and DDL statements on source table or DML/DDL statements on its
      target table.
      
      The problem was caused by incomplete protection/table-locking against
      concurrent statements implemented in mysql_create_like_table() routine.
      We solve it by simply implementing such protection in proper way.
      Most of actual work for 5.1 was already done by fix for bug 20662 and
      preliminary patch changing locking in ALTER TABLE.
      
      The third bug allowed user who didn't have any privileges on table create
      its copy and therefore circumvent privilege check for SHOW CREATE TABLE.
      
      This patch solves this problem by adding privilege check, which was missing.
      
      Finally it also removes some duplicated code from mysql_create_like_table()
      and thus fixes bug #26869 "TABLE_LIST::table_name_length inconsistent with
      TABLE_LIST::table_name".
      
      
      mysql-test/r/create-big.result:
        Added test coverage for concurrency-related issues with CREATE TABLE LIKE.
      mysql-test/r/create.result:
        Adjusted error-code in the test case after refactoring code that
        implements CREATE TABLE ... LIKE.
      mysql-test/r/grant2.result:
        Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
        on source table".
      mysql-test/t/create-big.test:
        Added test coverage for concurrency-related issues with CREATE TABLE LIKE.
      mysql-test/t/create.test:
        Adjusted error-code in the test case after refactoring code that
        implements CREATE TABLE ... LIKE.
      mysql-test/t/disabled.def:
        Recent code changes ensured that CREATE TABLE LIKE statement is properly
        isolated against other statements, so synchronization.test should no
        longer fail (see fix for bug 20662 and preliminary patch for bug 23667
        changing ALTER TABLE locking).
      mysql-test/t/grant2.test:
        Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
        on source table".
      sql/handler.h:
        Introduced new flag for HA_CREATE_INFO::options in order to be able to
        distinguish CREATE TABLE ... LIKE from other types of CREATE TABLE.
      sql/mysql_priv.h:
        mysql_create_like_table() now takes source table name not as a
        Table_ident object but as regular table list element.
      sql/sql_lex.h:
        Removed LEX::like_name member. Now we use special flag in
        LEX::create_info::options for distinguishing CREATE TABLE ... LIKE
        from other types of CREATE TABLE and store name of source table as
        regular element in statement's table list.
      sql/sql_parse.cc:
        CREATE TABLE ... LIKE implementation now uses statement's table list
        for storing information about the source table. We also use flag
        in LEX::create_info.options for distinguishing it from other types
        of CREATE TABLE.
        Finally CREATE TABLE ... LIKE now requires the same privileges on
        the source tables as SHOW CREATE TABLE. Moved this privilege check
        to check_show_create_table_access() function.
      sql/sql_partition.cc:
        Now we use special flag in LEX::create_info::options for distinguishing
        CREATE TABLE ... LIKE from other types of CREATE TABLE and store name
        of source table as regular element in statement's table list.
      sql/sql_table.cc:
        mysql_create_like_table():  
         - Commented and cleaned-up a bit code which is responsible for achieving
           isolation from concurrent statements. Most of actual work was done by
           fix for bug 20662 and preliminary patch changing locking locking in
           ALTER TABLE, so here we do minor things like relaxing locking on
           source table (we don't need lock on it, to have it open is enough) and
           adjusting code to make it more friendly against code implementing I_S.
         - Get rid of duplicated code related to source database/table name
           handling. All these operations are already done in
           st_select_lex::add_table_to_list(), so we achieve the same effect
           by including source table into the statement's table list.
      sql/sql_yacc.yy:
        Now we use special flag in LEX::create_info::options for distinguishing
        CREATE TABLE ... LIKE from other types of CREATE TABLE and store name
        of source table as regular element in statement's table list.
      5698a6a8
    • unknown's avatar
      5.0 version of fix for: · e8c35f16
      unknown authored
       Bug #23667 "CREATE TABLE LIKE is not isolated from alteration
                   by other connections"
       Bug #18950 "CREATE TABLE LIKE does not obtain LOCK_open"
      As well as:
       Bug #25578 "CREATE TABLE LIKE does not require any privileges
                   on source table".
      
      The first and the second bugs resulted in various errors and wrong
      binary log order when one tried to execute concurrently CREATE TABLE LIKE
      statement and DDL statements on source table or DML/DDL statements on its
      target table.
      
      The problem was caused by incomplete protection/table-locking against
      concurrent statements implemented in mysql_create_like_table() routine.
      We solve it by simply implementing such protection in proper way (see
      comment for sql_table.cc for details).
      
      The third bug allowed user who didn't have any privileges on table create
      its copy and therefore circumvent privilege check for SHOW CREATE TABLE.
      
      This patch solves this problem by adding privilege check, which was missing.
      
      Finally it also removes some duplicated code from mysql_create_like_table().
      
      Note that, altough tests covering concurrency-related aspects of CREATE TABLE
      LIKE behaviour will only be introduced in 5.1, they were run manually for
      this patch as well.
      
      
      mysql-test/r/grant2.result:
        Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
        on source table".
      mysql-test/t/grant2.test:
        Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
        on source table".
      sql/handler.h:
        Introduced new flag for HA_CREATE_INFO::options in order to be able to
        distinguish CREATE TABLE ... LIKE from other types of CREATE TABLE.
      sql/mysql_priv.h:
        mysql_create_like_table() now takes source table name not as a
        Table_ident object but as regular table list element.
      sql/sql_parse.cc:
        CREATE TABLE ... LIKE implementation now uses statement's table list
        for storing information about the source table. We also use flag
        in LEX::create_info.options for distinguishing it from other types
        of CREATE TABLE.
        Finally CREATE TABLE ... LIKE now requires the same privileges on
        the source tables as SHOW CREATE TABLE. Moved this privilege check
        to check_show_create_table_access() function.
      sql/sql_table.cc:
        mysql_create_like_table():
         - Provided proper protection from concurrent statements.
           This is achieved by keeping name-lock on the source table and holding
           LOCK_open mutex during whole operation. This gives protection against
           concurrent DDL on source table. Also holding this mutex makes copying
           of .frm file, call to ha_create_table() and binlogging atomic against
           concurrent DML and DDL operations on target table.
         - Get rid of duplicated code related to source database/table name
           handling. All these operations are already done in
           st_select_lex::add_table_to_list(), so we achieve the same effect
           by including source table into the statement's table list.
      sql/sql_yacc.yy:
        Now we use special flag in LEX::create_info::options for distinguishing
        CREATE TABLE ... LIKE from other types of CREATE TABLE and store name
        of source table as regular element in statement's table list.
      e8c35f16
    • unknown's avatar
      - Corrected type misstake in debug statement. · 0175d73c
      unknown authored
      0175d73c
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug21074/my51-bug21074 · ce14cfe6
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      
      sql/set_var.cc:
        Auto merged
      sql/sql_cache.cc:
        Auto merged
      ce14cfe6
    • unknown's avatar
      - This patch addesses the performance issues with invalidating the entire · bb29e3ba
      unknown authored
        cache by changing the behavior of the query cache resize-method.
      - set query_cache_size=<new_size>; is significantly faster than RESET QUERY
        CACHE as it simply destroys and recreates the query cache, whereas
        RESET QUERY CACHE keeps its internal structure aligned with server 
        load profile.
      
      
      sql/set_var.cc:
        Refactored behavior of function. Instead of setting the global variable
        from within the class method scope we return the new cache size as a 
        result of the method call.
      sql/sql_cache.cc:
        - Changed behavior of resize-method. Now, the cache will be cleared as one
          single block of data instead of an iteration over all cached statements.
      bb29e3ba
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · a1fbcb24
      unknown authored
      into  trift2.:/MySQL/M51/push-5.1
      
      a1fbcb24
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build · dca1757f
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
      
      
      configure.in:
        Auto merged
      include/my_global.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      BitKeeper/deleted/.del-CMakeLists.txt~13:
        Auto merged
      dca1757f
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.42 · 30d12d8d
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      
      
      configure.in:
        Auto merged
      sql/item_func.cc:
        Auto merged
      30d12d8d
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines · c4693ec3
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines
      
      c4693ec3
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.1 · e4ad9466
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      e4ad9466
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines · 3862944a
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      3862944a
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0 · 07796719
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      07796719
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-4.1 · d6de9411
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
      
      d6de9411
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build · 2f727714
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
      
      2f727714
  4. 22 May, 2007 7 commits