1. 07 Mar, 2007 1 commit
    • unknown's avatar
      BUG#18326: Do not lock table for writing during prepare of statement · 36569375
      unknown authored
      During statement prepare phase the tables were locked as if the
      statement is being executed, however this is not necessary.
      
      The solution is to not lock tables on statement prepare phase.
      Opening tables is enough to prevent DDL on them, and during statement
      prepare we do not access nor modify any data.
      
      
      mysql-test/r/ps.result:
        Add result for bug#18326: Do not lock table for writing during
        prepare of statement.
      mysql-test/t/ps.test:
        Add test case for bug#18326: Do not lock table for writing during
        prepare of statement.
      sql/sql_prepare.cc:
        Do not lock tables on statement prepare phase.  Opening tables is
        enough to prevent DDL on them, and during statement prepare we do not
        access nor modify any data.
        
        Use open_normal_and_derived_tables() for table opening on prepare.
      36569375
  2. 01 Feb, 2007 2 commits
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-21904_b · a9b9553a
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-21904_b-merge
      
      
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/t/subselect.test:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/sql_cache.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      a9b9553a
    • unknown's avatar
      Improved comments · 8b07db94
      unknown authored
      8b07db94
  3. 31 Jan, 2007 1 commit
    • unknown's avatar
      Fix for memory leaks introduced with the push of patch for bug#22740. · 6a8857f0
      unknown authored
      Original patch did not have these leaks, they were introduced later
      during manual applying of the patch.
      
      
      sql/event_data_objects.cc:
        Original patch was not aware of the requirement to delete lex.sphead
        before doing anything else (bug#21856), and that was missed when the
        patch was applied later.
      sql/event_scheduler.cc:
        The line was lost during manual patch applying.
      6a8857f0
  4. 30 Jan, 2007 4 commits
    • unknown's avatar
      manual merge · 48187479
      unknown authored
      48187479
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · b219bc56
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.0-21904
      
      
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/t/subselect.test:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      b219bc56
    • unknown's avatar
      Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-21904 · 70fff670
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-21904-merge
      
      
      sql/item_subselect.cc:
        Auto merged
      sql/item_subselect.h:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      70fff670
    • unknown's avatar
      Bug#21904 (parser problem when using IN with a double "(())") · e22bf31f
      unknown authored
      Before this fix, a IN predicate of the form: "IN (( subselect ))", with two
      parenthesis, would be evaluated as a single row subselect: if the subselect
      returns more that 1 row, the statement would fail.
      
      The SQL:2003 standard defines a special exception in the specification,
      and mandates that this particular form of IN predicate shall be equivalent
      to "IN ( subselect )", which involves a table subquery and works with more
      than 1 row.
      
      This fix implements "IN (( subselect ))", "IN ((( subselect )))" etc
      as per the SQL:2003 requirement.
      
      All the details related to the implementation of this change have been
      commented in the code, and the relevant sections of the SQL:2003 spec
      are given for reference, so they are not repeated here.
      
      Having access to the spec is a requirement to review in depth this patch.
      
      
      mysql-test/r/subselect.result:
        Implement IN predicate special exceptions with subselects.
      mysql-test/t/subselect.test:
        Implement IN predicate special exceptions with subselects.
      sql/item_subselect.cc:
        Implement IN predicate special exceptions with subselects.
      sql/item_subselect.h:
        Implement IN predicate special exceptions with subselects.
      sql/sql_yacc.yy:
        Implement IN predicate special exceptions with subselects, cleanup.
      e22bf31f
  5. 29 Jan, 2007 3 commits
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · c84c750d
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-24392
      
      c84c750d
    • unknown's avatar
      Fix for bug#22740 Events: Decouple Event_queue from Event_db_repository · 9222603a
      unknown authored
      This patch implements the idea of the bug report by making Event_queue
      unaware of Event_db_repository by making a higher level class - Events,
      which is aware of most of all classes, responsible for passing all data
      needed for adding/updating/deleting an event to/from the queue.
      
      Introduces few new classes :
       - Event_worker_thread
       - Event_queue_element_for_exec
      
      
      sql/event_data_objects.cc:
        Introduced a new class Event_queue_element_for_exec
        According to Konstantin it should be named Event_name and hold
        only two LEX_STRINGs but `dropped` is not saved on disk and will
        require additional logic in Event_worker_thread class, after loading
        to compute whether the event should be dropped or not. It's easier
        just to pass this flag around.
        
        Removed Event_queue_element::drop(). This method was a source of a
        race condition. At the place where the event should be dropped we
        call Events::drop_event() which is the only code-flow for dropping.
        In addition, because ::drop_event() holds Events::LOCK_metadata there is
        no source of race conditions. Before this patch dropping from ::drop()
        wasn't under LOCK_metadata and races were possible.
        
        Because Events::open_event_table was removed as a method, provisionally
        events_event_db_repository was exported from events.cc till a solution is
        build where Event_queue_element does not access directly mysql.event.
      sql/event_data_objects.h:
        New class Event_queue_element_for_exec added which is returned
        from Event_queue::get_top_if_time() and passed through Event_scheduler
        to Event_worker_thread. There by using the (db)name Event_job_data is
        instanciated and executed.
        
        Dropped Event_queue_element::drop()
        
        thd was moved out of Event_job_data as it is now part of
        Event_queue_element_for_exec
      sql/event_queue.cc:
        Removed dependency of Event_queue on Event_db_repository.
        The instantiation of Event_job_data was moved to class Event_worker_thread
        In place is a return of an object of Event_queue_element_for_exec is used
        later for instantiating Event_job_data.
        
        The `dropped` flag of Event_queue_element is passed over
        Event_queue_element_for_exec to the code in Event_worker_thread.
      sql/event_queue.h:
        Removed dependency of Event_queue on Event_db_repository
        Removed dependency on Event_scheduler
      sql/event_scheduler.cc:
        Added class Event_worker_thread, which is used during
        the execution of an event. It has a static init() method
        to get a pointer to Event_db_repository to be used for
        instantiation of Event_job_data object. This object it then
        executed.
      sql/event_scheduler.h:
        Added class Event_worker_thread, which is used during
        the execution of an event.
      sql/events.cc:
        Removed Events::open_event_table() because it was a product of
        a bad architecture.
      sql/events.h:
        Removed friend definition, unneeded.
        
        Fixed Events::drop_event() to have the previous signature without
        bool only_from_disk
      sql/sql_parse.cc:
        Fix call
      9222603a
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 32a99e8b
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-24392
      
      
      mysql-test/t/show_check.test:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      32a99e8b
  6. 25 Jan, 2007 16 commits
  7. 24 Jan, 2007 13 commits
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines · 1984327e
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/myisam.result:
        Use local.
      mysql-test/t/myisam.test:
        Use local.
      1984327e
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.1 · 8adaaca5
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.1-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      sql/lock.cc:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      storage/federated/ha_federated.cc:
        Auto merged
      storage/myisam/mi_check.c:
        Auto merged
      storage/myisam/mi_packrec.c:
        Auto merged
      mysql-test/r/myisam.result:
        Manually merged.
      mysql-test/t/myisam.test:
        Manually merged.
      8adaaca5
    • unknown's avatar
      Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 51b80ca6
      unknown authored
      into  weblab.(none):/home/marcsql/TREE/mysql-5.1-21029
      
      
      Makefile.am:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      51b80ca6
    • unknown's avatar
      Bug#21029 (Dependencies between sql_yacc.cc and dependent headers not detected) · 2875875b
      unknown authored
      The build scripts in general, using automake, autoconf, etc, contain several
      special commands and work around all related to the way the bison code in the
      parser is built, for sql/sql_yacc.yy. These work arounds, accumulated over
      time during development, ultimately cause the build scripts to be unstable
      and cause build defects by not enforcing dependencies.
      
      This fix simplifies the build process and aligns it with the automake tooling,
      which provides native support for bison and *.yy files.
      
      In particular, the following problem have been fixed:
      - dependencies with sql_yacc.cc were not honored (Bug 21029), leading to
        corrupted builds,
      - the work around introduced by Bug 24557, to cleanup the generated files
        sql_yacc.h and sql_yacc.cc, has been removed,
      - the generated makefile, in a source distribution, used to destroy the files
        sql_yacc.h and sql_yacc.cc on a 'make clean' target. This has been fixed:
        these files are now removed by make maintainer-clean.
      - The root cause of the problem found with gcc 4.1 (see Bug 24619) has been
        clearly documented, and the "sed" hack has been replaced by a cleaner
        work around, when building the code with bison 1.875.
      - Removed the file sql/sql_yacc.yy.bak, added by WL 3031 by accident.
      - Removed the unnecessary AM_YFLAG= --debug introduced by WL 3432, since
        the compiling option DBUG_OFF takes precedence when setting YYDEBUG.
      
      
      BitKeeper/deleted/.del-sql_yacc.yy.bak:
        Rename: sql/sql_yacc.yy.bak -> BitKeeper/deleted/.del-sql_yacc.yy.bak
      Makefile.am:
        General cleanup of the build process for sql_yacc.yy
      sql/Makefile.am:
        General cleanup of the build process for sql_yacc.yy
      sql/sql_yacc.yy:
        General cleanup of the build process for sql_yacc.yy
      2875875b
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0 · 32b5b4a7
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      
      mysql-test/t/myisam.test:
        Auto merged
      32b5b4a7
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/bk/mysql-5.0 · 9b1e5c9d
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      sql/table.cc:
        Auto merged
      mysql-test/r/myisam.result:
        Manually merged.
      mysql-test/t/myisam.test:
        Manually merged.
      9b1e5c9d
    • unknown's avatar
      Merge mockturtle.local:/home/dlenev/src/mysql-5.0-merge · 91f018b0
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge
      
      
      mysql-test/t/ps.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      mysql-test/t/disabled.def:
        Manual merge.
      91f018b0
    • unknown's avatar
      Disabling back im_daemon_life_cycle.test, which was temporarily enabled in · 8cd8ff4c
      unknown authored
      the team tree for additional investigation.
      
      8cd8ff4c
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 949ee915
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.0-merge
      
      
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      949ee915
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 076455ac
      unknown authored
      into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge
      
      
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      076455ac
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines · b575a12a
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.0-bug24607
      
      
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      b575a12a
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines · 34bb14b7
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.1-bug24607
      
      
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      34bb14b7
    • unknown's avatar
      After merge fix · c4f1c36c
      unknown authored
      c4f1c36c