1. 24 May, 2007 1 commit
  2. 23 May, 2007 4 commits
    • unknown's avatar
      5.0 version of fix for: · f9d7642e
      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.
      f9d7642e
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines · 351abe5a
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      
      351abe5a
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0 · adef6736
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      
      adef6736
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-4.1 · e5b2adea
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
      
      
      e5b2adea
  3. 22 May, 2007 3 commits
  4. 21 May, 2007 6 commits
  5. 19 May, 2007 2 commits
    • unknown's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/bug28401/my50-bug28401 · f40047df
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      
      
      f40047df
    • unknown's avatar
      Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE · f52f931f
      unknown authored
       - The SQL commands used by mysql_upgrade are written to be run
          with sql_mode set to '' - thus the scripts should change sql_mode
          for the session to make sure the SQL is legal.
      
      
      mysql-test/r/mysql_upgrade.result:
        Update test result
      mysql-test/t/mysql_upgrade.test:
        The SQL commands used by mysql_upgrade are written to be run
        with sql_mode set to '' - thus the scripts should change sql_mode
        for the session to make sure the SQL is legal.
      scripts/mysql_system_tables_fix.sql:
        Set sql_mode to '' before running the SQL commands
        to fix system tables - backport from 5.1
      f52f931f
  6. 18 May, 2007 24 commits
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 8b33c415
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      sql/item.cc:
        Auto merged
      8b33c415
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 8933c18c
      unknown authored
      into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
      
      
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      sql/item.cc:
        Auto merged
      8933c18c
    • unknown's avatar
      added cleanup to some tests · f7434c4f
      unknown authored
      
      mysql-test/r/sp_trans.result:
        added cleanup
      mysql-test/r/strict.result:
        added cleanup
      mysql-test/t/sp_trans.test:
        added cleanup
      mysql-test/t/strict.test:
        added cleanup
      f7434c4f
    • unknown's avatar
      Merge mysql.com:/d2/hf/mrg/mysql-4.1-opt · 5f66ebe8
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      
      5f66ebe8
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0 · caf045db
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
      
      
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      sql/item.cc:
        Auto merged
      caf045db
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1 · 25090a6d
      unknown authored
      into  mysql.com:/d2/hf/mrg/mysql-4.1-opt
      
      
      25090a6d
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-maint · ca633f5f
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      
      
      ca633f5f
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-4.1-maint · 768eab64
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
      
      
      768eab64
    • unknown's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint · f35dd614
      unknown authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/t/mysqltest.test:
        SCCS merged
      f35dd614
    • unknown's avatar
      WL#2247 mysqltest: add option for sorting results · 421d8ca9
      unknown authored
       - Final touchups
      
      
      client/mysqltest.c:
        Final touch ups, rename sorted_results to sorted_result
      mysql-test/r/mysqltest.result:
        Update test result
      mysql-test/t/mysqltest.test:
        Update results with additional subtests for empty result set,
        NULL values and 1024 rows
      421d8ca9
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · c960adfe
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
      
      
      c960adfe
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 7514d2f7
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
      
      
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      7514d2f7
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 507ad360
      unknown authored
      into  moonbone.local:/mnt/gentoo64/work/28261-bug-5.0-opt-mysql
      
      
      507ad360
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · be77fa28
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/50-work
      
      
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      be77fa28
    • unknown's avatar
      ndb - bug#28443 · deba58ee
      unknown authored
        review comment 2, atleast 1 signal need for test prg
      
      
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        review comment, atleast 1 signal need
      deba58ee
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 27d82d38
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
      
      
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Auto merged
      27d82d38
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · d1625447
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/50-work
      
      
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Auto merged
      d1625447
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · 692c13ab
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
      
      
      692c13ab
    • unknown's avatar
      ndb - bug#28443 · a5731933
      unknown authored
        review comment
        if some tcp-transporter has data, then do select with timeout 0
      
      
      ndb/src/common/transporter/TransporterRegistry.cpp:
        review comment
        if some tcp-transporter has data, then do select with timeout 0
      a5731933
    • unknown's avatar
      Bug #27907 "Misleading error message when opening/locking tables" · fda27597
      unknown authored
      Adjust the check that defines the error message to be returned.
      
      
      mysql-test/r/sp-error.result:
        Update results (more accurate error code)
      mysql-test/r/sp-prelocking.result:
        Update results (more accurate error code)
      mysql-test/r/trigger.result:
        Update results (more accurate error code)
      mysql-test/t/sp-error.test:
        ER_NOT_LOCKED -> ER_NO_SUCH_TABLE
      mysql-test/t/sp-prelocking.test:
        Add a test case for Bug#27907
      mysql-test/t/trigger.test:
        ER_NOT_LOCKED -> ER_NO_SUCH_TABLE
      sql/sql_base.cc:
        Adjust the check for where-we-are for a better error message.
      fda27597
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 7f6742d1
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
      
      
      ndb/src/common/transporter/Packer.cpp:
        Auto merged
      ndb/src/common/transporter/TCP_Transporter.hpp:
        Auto merged
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Auto merged
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      ndb/test/ndbapi/testNdbApi.cpp:
        merge
      ndb/test/run-test/daily-basic-tests.txt:
        merge
      7f6742d1
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · b98be8f6
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
      
      
      b98be8f6
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/41-work · 051c96f2
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/50-work
      
      
      ndb/src/common/transporter/Packer.cpp:
        Auto merged
      ndb/src/common/transporter/TCP_Transporter.hpp:
        Auto merged
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        Auto merged
      ndb/src/common/transporter/TransporterRegistry.cpp:
        merge
      ndb/test/ndbapi/testNdbApi.cpp:
        merge
      ndb/test/run-test/daily-basic-tests.txt:
        merge
      051c96f2
    • unknown's avatar
      ndb - bug#28443 · 9bfed519
      unknown authored
        Make sure that data can not e left lingering in receive buffer
      
      
      ndb/src/common/transporter/Packer.cpp:
        test, make MAX_RECEIVED_SIGNALS an variable
      ndb/src/common/transporter/TCP_Transporter.hpp:
        add new method for checking of data in receive buffer
      ndb/src/common/transporter/TransporterRegistry.cpp:
        Make sure that 
        1) poll_TCP return true if any transporter has data in receiveBuffer
           (previously only if socket had data)
        2) performReceive executes signals if TCP transporter has data in receiveBuffer
           (previously only if data was recevied)
      ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
        test, make MAX_RECEIVED_SIGNALS an variable
      ndb/test/ndbapi/testNdbApi.cpp:
        testcase
      ndb/test/run-test/daily-basic-tests.txt:
        testcase
      9bfed519