1. 28 May, 2007 5 commits
    • unknown's avatar
      Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 8edb0f26
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      
      mysql-test/t/disabled.def:
        Auto merged
      8edb0f26
    • unknown's avatar
      66f22d80
    • unknown's avatar
      Fix a compile-time warning. · f1ac577d
      unknown authored
      f1ac577d
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 3fb3e57f
      unknown authored
      into  vajra.(none):/opt/local/work/mysql-5.1-4968-clean
      
      3fb3e57f
    • unknown's avatar
      5.1 version of a fix and test cases for bugs: · e1e991b1
      unknown authored
      Bug#4968 ""Stored procedure crash if cursor opened on altered table"
      Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
      Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
      stored procedure."
      Bug#19733 "Repeated alter, or repeated create/drop, fails"
      Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
      Bug#24879 "Prepared Statements: CREATE TABLE (UTF8 KEY) produces a 
      growing key length" (this bug is not fixed in 5.0)
      
      Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
      statements in stored routines or as prepared statements caused
      incorrect results (and crashes in versions prior to 5.0.25).
      
      In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
      SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
        
      The problem of bugs 4968, 19733, 19282 and 6895 was that functions
      mysql_prepare_table, mysql_create_table and mysql_alter_table are not
      re-execution friendly: during their operation they modify contents
      of LEX (members create_info, alter_info, key_list, create_list),
      thus making the LEX unusable for the next execution.
      In particular, these functions removed processed columns and keys from
      create_list, key_list and drop_list. Search the code in sql_table.cc 
      for drop_it.remove() and similar patterns to find evidence.
        
      The fix is to supply to these functions a usable copy of each of the
      above structures at every re-execution of an SQL statement. 
        
      To simplify memory management, LEX::key_list and LEX::create_list
      were added to LEX::alter_info, a fresh copy of which is created for
      every execution.
        
      The problem of crashing bug 22060 stemmed from the fact that the above 
      metnioned functions were not only modifying HA_CREATE_INFO structure 
      in LEX, but also were changing it to point to areas in volatile memory
      of the execution memory root.
         
      The patch solves this problem by creating and using an on-stack
      copy of HA_CREATE_INFO in mysql_execute_command.
      
      Additionally, this patch splits the part of mysql_alter_table
      that analizes and rewrites information from the parser into
      a separate function - mysql_prepare_alter_table, in analogy with
      mysql_prepare_table, which is renamed to mysql_prepare_create_table.
      
      
      mysql-test/r/ps.result:
        Update test results (Bug#19182, Bug#22060, Bug#4968, Bug#6895)
      mysql-test/r/sp.result:
        Update results (Bug#19733)
      mysql-test/t/ps.test:
        Add test cases for Bug#19182, Bug#22060, Bug#4968, Bug#6895
      mysql-test/t/sp.test:
        Add a test case for Bug#19733
      sql/field.h:
        Implement a deep copy constructor for create_field
      sql/mysql_priv.h:
        LEX::key_list and LEX::create_list were moved to LEX::alter_info.
        Update declarations to use LEX::alter_info instead of these two
        members.
        Remove declarations of mysql_add_index, mysql_drop_index.
      sql/sql_class.cc:
        Implement deep copy constructors.
      sql/sql_class.h:
        Implement (almost) deep copy constructors for key_part_spec, 
        Alter_drop, Alter_column, Key, foreign_key.
        Replace pair<columns, keys> with an instance of Alter_info in
        select_create constructor. We create a new copy of Alter_info
        each time we re-execute SELECT .. CREATE prepared statement.
      sql/sql_insert.cc:
        Adjust to a new signature of create_table_from_items.
      sql/sql_lex.cc:
        Implement Alter_info::Alter_info that would make a "deep" copy
        of all definition lists (keys, columns).
        Move is_partition_management() from sql_partition.cc (feature-based
        file division is evil).
      sql/sql_lex.h:
        Move key_list and create_list to class Alter_info. Implement
        Alter_info::Alter_info that can be used with PS and SP.
        Get rid of Alter_info::clear() which was an attempt to save on
        matches and always use Alter_info::reset().
        Implement an auxiliary Alter_info::init_for_create_from_alter()
        which is used in mysql_alter_table.
      sql/sql_list.cc:
          Implement a copy constructor of class List that makes a deep copy
          of all list nodes.
      sql/sql_list.h:
        Implement a way to make a deep copy of all list nodes.
      sql/sql_parse.cc:
        Adjust to new signatures of mysql_create_table, mysql_alter_table,
        select_create. Functions mysql_create_index and mysql_drop_index has
        become identical after initialization of alter_info was moved to the 
        parser, and were merged. Flag enable_slow_log was not updated for 
        SQLCOM_DROP_INDEX, which was a bug.
        Just like CREATE INDEX, DROP INDEX is currently done via complete 
        table rebuild and is rightfully a slow administrative statement.
      sql/sql_partition.cc:
        Move is_partition_management() to sql_lex.cc
        Adjust code to the new Alter_info.
      sql/sql_table.cc:
        Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
        mysql_prepare_table to new signatures.
        Rename mysql_prepare_table to mysql_prepare_create_table. Make
        sure it follows the convention and returns FALSE for success and
        TRUE for error.
        Move parts of mysql_alter_table to mysql_prepare_alter_table.
        Move the first invokation of mysql_prepare_table from mysql_alter_table
        to compare_tables, as it was needed only for the purpose
        of correct comparison.
        Since now Alter_info itself is created in the runtime mem root,
        adjust mysql_prepare_table to always allocate memory in the
        runtime memory root.
        Remove dead code.
      sql/sql_yacc.yy:
        LEX::key_list and LEX::create_list moved to class Alter_info
      e1e991b1
  2. 26 May, 2007 1 commit
    • unknown's avatar
      Fix for · 4de5ee42
      unknown authored
      bug#26338 events_bugs.test fail on Debian
      and
      bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      
      
      mysql-test/r/events_bugs.result:
        uppercase
      mysql-test/t/events.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_bugs.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_grant.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_logs_tests.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_scheduling.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_stress.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_time_zone.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_trans.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      mysql-test/t/events_trans_notembedded.test:
        wait at the end of the script for event which haven't
        finished their execution. This should solve
        bug#26338 events_bugs.test fail on Debian
        and
        bug#28285 Test "events_bugs" has instable results of "select /*1*/ ... from processlist"
      4de5ee42
  3. 25 May, 2007 3 commits
  4. 24 May, 2007 17 commits
    • unknown's avatar
      Fix warnings. · 813f9cb5
      unknown authored
      
      sql/item_func.h:
        Resolve a warning (wrong initialization order).
      sql/sql_lex.cc:
        Make -ansi mode compile.
      813f9cb5
    • unknown's avatar
      This changeset belongs to the fix of Bug#735 Prepared Statements: there is no... · 2fcf0db3
      unknown authored
      This changeset belongs to the fix of Bug#735 Prepared Statements: there is no support for Query Cache
        
      - Create "--ps-protocol" and no "--<whatever>-protocol" variants of the former tests
        t/grant_cache.test and t/query_cache_sql_prepare.test.
      - Some additional subtest and fixes of bugs
      - Minor improvements 
      
      
      mysql-test/include/grant_cache.inc:
        - Rename mysql-test/t/grant_cache.test to include/grant_cache.inc
        - Toplevel scripts running variants of this test are
             t/grant_cache_ps_prot.test (runs only with "--ps-protocol")
             t/grant_cache_no_prot.test (skipped if any protocol is assigned)
        - Modifications to include/grant_cache.inc:
          - Minor improvements like replace --error <number> by --error <name>
          - enable that some subtests are run with "--ps-protocol"
      mysql-test/include/query_cache_sql_prepare.inc:
        - Rename t/query_cache_sql_prepare.test to include/query_cache_sql_prepare.inc
        - Toplevel scripts running variants of this test are
             query_cache_ps_ps_prot.test (skipped if other protocol than --ps-protocol is used.)
             query_cache_ps_no_prot.test (skipped if --<whatever>-protocol is used)   
        - Modifications to include/query_cache_sql_prepare.inc:
        - Minor improvements like add drop table
        - Add tests checking that 
          - another connection gets the same amount of QC hits
          - statements running via ps-protocol do not hit QC results of preceding sql EXECUTEs
      mysql-test/r/grant_cache_no_prot.result:
        Updated result
      mysql-test/r/query_cache_ps_no_prot.result:
        Updated result
      tests/mysql_client_test.c:
        - correct wrong sized "for" loop
        - add some missing tests of query cache hit numbers
      mysql-test/r/grant_cache_ps_prot.result:
        New BitKeeper file ``mysql-test/r/grant_cache_ps_prot.result''
      mysql-test/r/query_cache_ps_ps_prot.result:
        New BitKeeper file ``mysql-test/r/query_cache_ps_ps_prot.result''
      mysql-test/t/grant_cache_no_prot.test:
        Variant of the test grant_cache to be run without any "--<whatever>-protocol"
      mysql-test/t/grant_cache_ps_prot.test:
        Variant of the test grant_cache to be run with "--ps-protocol" only
      mysql-test/t/query_cache_ps_no_prot.test:
        Variant of the test query_cache_sql_prepare to be run without any "--<whatever>-protocol"
      mysql-test/t/query_cache_ps_ps_prot.test:
        Variant of the test query_cache_sql_prepare to be run with "--ps-protocol" only
      2fcf0db3
    • unknown's avatar
      Merge vajra.(none):/opt/local/work/mysql-5.0-runtime · 8f09c969
      unknown authored
      into  vajra.(none):/opt/local/work/mysql-5.1-runtime
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      8f09c969
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · dafe92cb
      unknown authored
      into  vajra.(none):/opt/local/work/mysql-5.1-runtime
      
      
      include/my_global.h:
        Auto merged
      mysql-test/include/mix1.inc:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/r/ps_2myisam.result:
        Auto merged
      mysql-test/r/ps_3innodb.result:
        Auto merged
      mysql-test/r/ps_4heap.result:
        Auto merged
      mysql-test/r/ps_5merge.result:
        Auto merged
      mysql-test/r/ps_7ndb.result:
        Auto merged
      mysql-test/r/type_date.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/type_date.test:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      dafe92cb
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · de6ebb7d
      unknown authored
      into  vajra.(none):/opt/local/work/mysql-5.0-runtime
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      de6ebb7d
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-build · 59ba51f9
      unknown authored
      into  trift2.:/MySQL/M51/push-5.1
      
      59ba51f9
    • unknown's avatar
      Makefile.am : Add "embedded" tests to the "test-bt" target. · 6279ade7
      unknown authored
      
      Makefile.am:
        The "test-bt" target was lacking "embedded" tests -
        add them, dependent on the build of the test binary needed for them.
      6279ade7
    • unknown's avatar
      Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · b85200ba
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
      
      b85200ba
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug28644/my50-bug28644 · 1274e47b
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/bug28644/my51-bug28644
      
      
      mysql-test/lib/mtr_report.pl:
        Auto merged
      sql/sql_test.cc:
        Auto merged
      1274e47b
    • unknown's avatar
      Merge adventure.(none):/home/thek/Development/cpp/bug28644/my41-bug28644 · b0544266
      unknown authored
      into  adventure.(none):/home/thek/Development/cpp/bug28644/my50-bug28644
      
      
      mysql-test/lib/mtr_report.pl:
        Auto merged
      sql/sql_test.cc:
        Auto merged
      b0544266
    • unknown's avatar
      Bug#28644 Memory status report confused with memory leak · 5c398486
      unknown authored
      This patch removes a false memory leak error report from the test suite.
      There is a test case that puposely provokes a SAFEMALLOC leak report,
      even though there is no actual leak.
      
      
      mysql-test/lib/mtr_report.pl:
        There is a test case that purposely provokes a SAFEMALLOC leak report,
        even though there is no actual leak. We need to detect this, and ignore the
        warning in that case.
      sql/sql_test.cc:
        Added tags to surround memory dump status report to help the test
        suite to determine that this isn't a memory leak
      5c398486
    • unknown's avatar
      Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build · 70cc58b2
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
      
      70cc58b2
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build · 0f322a14
      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
      strings/strtod.c:
        Auto merged
      0f322a14
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work · 0c13c399
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      
      0c13c399
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1 · 17221bd0
      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
      strings/strtod.c:
        Auto merged
      17221bd0
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0 · 9610f72d
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      
      
      configure.in:
        Auto merged
      include/my_global.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      strings/strtod.c:
        Auto merged
      9610f72d
    • unknown's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build · 1c0389d7
      unknown authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
      
      1c0389d7
  5. 23 May, 2007 14 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