1. 27 Jun, 2006 4 commits
    • unknown's avatar
      WL#3337 (Event scheduler new architecture) Fourth cut of refactoring · cace147c
      unknown authored
      the parsing. Next step will be to refactor of usage of Event_timed 
      during Events::create_event() and Events::update_event().
      
      Disallow:
      - CREATE EVENT ... DO CREATE EVENT ...;
      - ALTER  EVENT ... DO CREATE EVENT ...;
      - CREATE EVENT ... DO ALTER EVENT DO ....;
      - CREATE PROCEDURE ... BEGIN CREATE EVENT ... END|
      
      Allowed:
      - CREATE EVENT ... DO DROP EVENT yyy;
      - CREATE EVENT ... DO ALTER EVENT yyy;
        (the nested ALTER EVENT can have anything but DO clause)
      - ALTER  EVENT ... DO ALTER EVENT yyy;
        (the nested ALTER EVENT can have anything but DO clause)
      - ALTER  EVENT ... DO DROP EVENT yyy;
      - CREATE PROCEDURE ... BEGIN ALTER EVENT ... END|
        (the nested ALTER EVENT can have anything but DO clause)
      - CREATE PROCEDURE ... BEGIN DROP EVENT ... END|
      
      
      mysql-test/r/events.result:
        update results
      mysql-test/r/events_bugs.result:
        update results
      mysql-test/t/events.test:
        use number as error, mysql-test-run does not like the name.
        will come back to this later, now it's enough to pass the test.
        disable nested events / events in SP, when the nested event has
        a body. If no body is provided, namely DROP EVENT or ALTER that
        changes the characteristics, then these are allowed.
      mysql-test/t/events_bugs.test:
        use number as error, mysql-test-run does not like the name.
        will come back to this later, now it's enough to pass the test.
        disable nested events / events in SP, when the nested event has
        a body. If no body is provided, namely DROP EVENT or ALTER that
        changes the characteristics, then these are allowed.
      sql/share/errmsg.txt:
        new message
      sql/sql_yacc.yy:
        refactor CREATE EVENT parsing to fit into the structure
        CREATE DEFINER=xxx EVENT
        The actual definer part is not used, but parsed, for now.
        Disable nested CREATE EVENTS, CREATE EVENT inside CREATE PROCEDURE.
        And an event DDL with body inside an ALTER.
        This stops the following :
        - CREATE EVENT ... DO CREATE EVENT ...;
        - ALTER  EVENT ... DO CREATE EVENT ...;
        - CREATE EVENT ... DO ALTER EVENT DO ....;
        - CREATE PROCEDURE ... BEGIN CREATE EVENT ... END|
        This allows:
        - CREATE EVENT ... DO DROP EVENT yyy;
        - CREATE EVENT ... DO ALTER EVENT yyy;
          (the nested ALTER EVENT can have anything but DO clause)
        - ALTER  EVENT ... DO ALTER EVENT yyy;
          (the nested ALTER EVENT can have anything but DO clause)
        - ALTER  EVENT ... DO DROP EVENT yyy;
        - CREATE PROCEDURE ... BEGIN ALTER EVENT ... END|
          (the nested ALTER EVENT can have anything but DO clause)
        - CREATE PROCEDURE ... BEGIN DROP EVENT ... END|
      cace147c
    • unknown's avatar
      WL#3337 (Event scheduler new architecture) · ef9a97e6
      unknown authored
      Third cut to simplify parsing phase. Now DROP EVENT works.
      
      Overloaded few functions to be able to use either sp_name or pass two LEX_STRINGs
      instead of a Event_timed pointer. This is transitional and eventually the old
      functions will be removed. For now DROP EVENT also works, does not need anymore
      a parsing object (Event_timed) and definer initialization because everyone who
      has EVENT_ACL can drop events, and this is checked on execution time in sql_parse.cc
      from the security context, as it should be.
      
      
      sql/event_data_objects.cc:
        overload few functions
      sql/event_scheduler.cc:
        Event_scheduler::drop_event() actually does not need Event_timed object
        but just an identifier, hence pass only sp_name.
        
        Overloaded Event_scheduler::find_event() to work with sp_name object. Eventually
        the old version will be removed. This is being done as transitional step to
        be able to test frequently code.
      sql/event_scheduler.h:
        Event_scheduler::drop_event() actually does not need Event_timed object
        but just an identifier, hence pass only sp_name.
        
        Overloaded Event_scheduler::find_event() to work with sp_name object. Eventually
        the old version will be removed. This is being done as transitional step to
        be able to test frequently code.
      sql/events.cc:
        Change db_drop_event() not to use Event_timed, either coming from parsing
        or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient
        because in Event_timed::drop a temporary object has to be created. Hence, 
        dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs.
      sql/events.h:
        Change db_drop_event() not to use Event_timed, either coming from parsing
        or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient
        because in Event_timed::drop a temporary object has to be created. Hence, 
        dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs.
      sql/events_priv.h:
        Change db_drop_event() not to use Event_timed, either coming from parsing
        or from Event_timed::drop, but use LEX_STRINGs. sp_name is not convinient
        because in Event_timed::drop a temporary object has to be created. Hence, 
        dereference the sp_name in Events::drop_event() and pass the LEX_STRINGs.
      sql/sql_parse.cc:
        SQLCOM_DROP_EVENT does not need lex->event_parse_data object and 
        is more like SQLCOM_SHOW_CREATE_EVENT. Therefore, move it to the block that
        handles the latter.
      sql/sql_yacc.yy:
        DROP EVENT does not need a parsing object, just a name.
        Store it as lex->spname. Pretty similar handling to the one of
        SHOW CREATE EVENT.
      ef9a97e6
    • unknown's avatar
      WL#3337 (Events new infrasctructure) · d2db48c6
      unknown authored
      Second cut of separating parsing phase from execution phase
      Separate Event_timed from parsing phase and introducing Event_parse_data.
      
      
      sql/event_data_objects.cc:
        second cut,
        copy Event_timed::init_body() to Event_parse_data::init_body()
        Init the body during parsing, everything else keep as a pointer to
        Item or some other pointer to use for later initialization.
      sql/event_data_objects.h:
        get the identifier as sp_name*, later will initialize our structures
      sql/events.cc:
        for easy transition add temporarily parse_data, later Event_timed *et will be removed.
        Do slow transition because Event_timed is so tightly integrated that a front-attack
        by removing things from this class was unsuccessful. Do things step by step by eliminating
        dependencies. Hence, the code could be checked with the current test suite too
        (early testing)
      sql/events.h:
        for easy transition add temporarily parse_data, later Event_timed *et will be removed.
        Do slow transition because Event_timed is so tightly integrated that a front-attack
        by removing things from this class was unsuccessful. Do things step by step by eliminating
        dependencies. Hence, the code could be checked with the current test suite too
        (early testing)
      BitKeeper/etc/ignore:
        Added libmysql/viosocket.o.6WmSJk libmysqld/event_data_objects.cc libmysqld/event_db_repository.cc libmysqld/event_queue.cc server-tools/instance-manager/net_serv.cc to the ignore list
      sql/share/errmsg.txt:
        remove this message, not used and needed for now
      sql/sql_lex.h:
        for easy transition add temporarily parse_data, later Event_timed *et will be removed.
        Do slow transition because Event_timed is so tightly integrated that a front-attack
        by removing things from this class was unsuccessful. Do things step by step by eliminating
        dependencies. Hence, the code could be checked with the current test suite too
        (early testing)
      sql/sql_parse.cc:
        for easy transition add temporarily parse_data, later Event_timed *et will be removed.
        Do slow transition because Event_timed is so tightly integrated that a front-attack
        by removing things from this class was unsuccessful. Do things step by step by eliminating
        dependencies. Hence, the code could be checked with the current test suite too
        (early testing)
      sql/sql_yacc.yy:
        for easy transition add temporarily parse_data, later Event_timed *et will be removed.
        Do slow transition because Event_timed is so tightly integrated that a front-attack
        by removing things from this class was unsuccessful. Do things step by step by eliminating
        dependencies. Hence, the code could be checked with the current test suite too
        (early testing)
      d2db48c6
    • unknown's avatar
      first cut of WL#3337 (New event scheduler locking infrastructure). · e5f8163b
      unknown authored
      Infrastructure built. Added the  foreseen files and change Makefile.am/CMakeLists.txt
      accordingly.
      
      
      libmysqld/Makefile.am:
        add new files. this is first cut of WL3337u
      sql/CMakeLists.txt:
        add more files to build
      sql/Makefile.am:
        add new files. this is first cut of WL3337
      sql/event_scheduler.cc:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/events.cc:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/share/errmsg.txt:
        new error message
      sql/event_data_objects.cc:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/event_data_objects.h:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/sql_parse.cc:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/sql_show.cc:
        event_timed.h -> event_data_objects.h (WL#3337)
      sql/sql_yacc.yy:
        event_timed.h -> event_data_objects.h (WL#3337)
      e5f8163b
  2. 26 Jun, 2006 2 commits
  3. 23 Jun, 2006 5 commits
    • unknown's avatar
      Fix for bug #18897 "Events: unauthorized action possible with · d6cf50ca
      unknown authored
      alter event rename".
      
      ALTER EVENT ... RENAME statement hasn't checked privileges
      for the target database. It also caused server crashes when
      target database was not specified explicitly and there was
      no current database.
      
      This fix adds missing privilege check and check for the case
      when target database is not specified explicitly or implicitly.
      
      
      mysql-test/r/events_bugs.result:
        update result
      mysql-test/t/events_bugs.test:
        add test case for bug 18897 Events: unauthorized action possible with alter event
        rename:
        - test rename to db the user does not have access to
        - test rename when there is no selected db
      sql/sql_parse.cc:
        Additional check for the situation when no db is selected.
        CREATE EVENT abc and ALTER EVENT db.abc RENAME TO xyz,
        and DROP EVENT abc
        won't work if there is no selected DB.
      d6cf50ca
    • unknown's avatar
      Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 11f81a7c
      unknown authored
      into  mysql.com:/home/cps/mysql/devel/5.1-curs-bug
      
      
      11f81a7c
    • unknown's avatar
      remove links from bk to get rid of warnings on windows · 7815deb4
      unknown authored
      
      BitKeeper/deleted/.del-sql_state.c~3b39d30b649690f3:
        Delete: server-tools/instance-manager/sql_state.c
      BitKeeper/deleted/.del-password.c~9d4b6a4c57887ac7:
        Delete: server-tools/instance-manager/password.c
      BitKeeper/deleted/.del-pack.c~4754cd15e3058c75:
        Delete: server-tools/instance-manager/pack.c
      BitKeeper/deleted/.del-net_serv.cc~120fb81d7e670308:
        Delete: server-tools/instance-manager/net_serv.cc
      7815deb4
    • unknown's avatar
      Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 641cb772
      unknown authored
      into lmy004.:/work/mysql-5.1-runtime-bug20624
      
      
      641cb772
    • unknown's avatar
      disable events tests in embedded · d0a603e3
      unknown authored
      (fix for bug#20290 Event mechanism incompatible with embedded server, but tests tried)
      
      
      mysql-test/t/events.test:
        disable test in embedded
      mysql-test/t/events_bugs.test:
        disable test in embedded
      mysql-test/t/events_grant.test:
        disable test in embedded
      mysql-test/t/events_logs_tests.test:
        disable test in embedded
      mysql-test/t/events_microsec.test:
        disable test in embedded
      mysql-test/t/events_scheduling.test:
        disable test in embedded
      mysql-test/t/events_stress.test:
        disable test in embedded
      d0a603e3
  4. 22 Jun, 2006 8 commits
    • unknown's avatar
      Merge mysql.com:/mnt/raid/alik/MySQL/devel/5.1-tree · b84008c9
      unknown authored
      into  mysql.com:/mnt/raid/alik/MySQL/devel/5.1-rt-bug20294
      
      
      mysql-test/t/disabled.def:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      b84008c9
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime · 00508f8f
      unknown authored
      into  mysql.com:/mnt/raid/alik/MySQL/devel/5.1-rt-bug20294
      
      
      00508f8f
    • unknown's avatar
      Additional fix for BUG#20294: Instance manager test · bd6f56a7
      unknown authored
      im_instance_conf fails randomly.
      
      
      mysql-test/r/im_options.result:
        Updated result file.
      mysql-test/t/im_instance_conf.imtest:
        Added a note about specific of CREATE INSTANCE usage in IM-tests.
      mysql-test/t/im_options.imtest:
        1. Specify socket-file-name for new instance so that the test
           does not depend on another running test-suite on the same box.
        2. Added a note about specific of CREATE INSTANCE usage in IM-tests.
      bd6f56a7
    • unknown's avatar
      fix for bug#20624: events_logs_tests.test fails randomly · 729a54cc
      unknown authored
      (this is a change to a faulty test file)
      
      
      mysql-test/r/events_logs_tests.result:
        update result
      mysql-test/t/events_logs_tests.test:
        fix the test file, so TRUNCATE should not land into the slow_log
        This happens on loaded machines, for example when running few suites
        in parallel.
        fix for bug #20624: events_logs_tests.test fails randomly
      729a54cc
    • unknown's avatar
      Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1 · d9ec7f3c
      unknown authored
      into  mysql.com:/home/bk/fix-mysql-5.1
      
      
      sql/sql_insert.cc:
        Auto merged
      d9ec7f3c
    • unknown's avatar
      Patch to handle some bad situations resulting from the fix for BUG#19995. · ab28aa9c
      unknown authored
      
      sql/handler.cc:
        Generating table maps from all locks that can be available: THD::extra_lock,
        THD::lock, and THD::locked_tables.
      sql/sql_class.h:
        Adding member Open_tables:state::extra_lock to hold the extra lock used by select_create.
        Removing select_insert::lock.
      sql/sql_insert.cc:
        Adding member Open_tables:state::extra_lock to hold the extra lock used by select_create.
        Removing select_insert::lock.
      ab28aa9c
    • unknown's avatar
      fix for bug#16992 (Events: Information_schema troubles) · a80014be
      unknown authored
      Introduced EVENTS.EVENT_DEFINITION, like ROUTINES.ROUTINE_DEFINITION
      Hence, the contents of the current EVENTS.EVENT_BODY become the contents
      of EVENT_DEFINITION. EVENT_BODY will contain always, for now, "SQL" (wo
      quotes).
      
      
      mysql-test/r/events.result:
        update result
        event_body -> event_definition
        event_body -> SQL
      mysql-test/r/events_grant.result:
        update result
        event_body -> event_definition
        event_body -> SQL
      mysql-test/r/information_schema.result:
        update result
        event_body -> event_definition
      mysql-test/t/events.test:
        update result
        event_body -> event_definition
        event_body -> SQL
      mysql-test/t/events_grant.test:
        update result
        event_body -> event_definition
        event_body -> SQL
      sql/sql_show.cc:
        Introduce enum_i_s_events_fields, because I hate recounting
        all the time a field is changed.
        Rename EVENT_BODY to EVENT_DEFINITION
        Introduce EVENT_BODY after that to be "SQL"
        (final fix for bug#16992 Events: Information schema troubles ) ?
      a80014be
    • unknown's avatar
      Merge mysql.com:/M50/bug19353-5.0 into mysql.com:/M51/bug19353-5.1 · 54b38dd6
      unknown authored
      
      storage/ndb/src/mgmapi/mgmapi.cpp:
        Auto merged
      storage/ndb/src/mgmsrv/ConfigInfo.cpp:
        Auto merged
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      support-files/mysql.server.sh:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      54b38dd6
  5. 21 Jun, 2006 21 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · 99392032
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
      
      
      mysql-test/r/partition_error.result:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      mysql-test/r/partition.result:
        Auto merged
      99392032
    • unknown's avatar
      Merge dator5.(none):/home/pappa/clean-mysql-5.1 · 581d49d9
      unknown authored
      into  dator5.(none):/home/pappa/bug19281
      
      
      sql/sql_insert.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      581d49d9
    • unknown's avatar
      mmanual merge · 33e3a59d
      unknown authored
      33e3a59d
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · a8a6fdee
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
      
      
      mysql-test/r/show_check.result:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/set_var.h:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      a8a6fdee
    • unknown's avatar
      Merge dator5.(none):/home/pappa/clean-mysql-5.1 · 59de9c42
      unknown authored
      into  dator5.(none):/home/pappa/bug19281
      
      
      sql/sql_insert.cc:
        Auto merged
      59de9c42
    • unknown's avatar
      Merge clam.ndb.mysql.com:/space/pekka/ndb/version/my51 · 767cb0b4
      unknown authored
      into  clam.ndb.mysql.com:/space/pekka/ndb/version/my51-bug18102
      
      
      767cb0b4
    • unknown's avatar
      ndb - add test_event_merge to daily-devel-tests.txt · 1cd8b43f
      unknown authored
      
      storage/ndb/test/run-test/daily-devel-tests.txt:
        test_event_merge
      1cd8b43f
    • unknown's avatar
      BUG#19309: Problem with calling proecdures twice · 2b599547
      unknown authored
      Need to flag when a copy is needed to not overwrite a create_info
      object connected to the lex structure
      
      
      sql/mysql_priv.h:
        Need to flag when a copy is needed to not overwrite a create_info
        object connected to the lex structure
      sql/sql_insert.cc:
        Need to flag when a copy is needed to not overwrite a create_info
        object connected to the lex structure
      sql/sql_parse.cc:
        Need to flag when a copy is needed to not overwrite a create_info
        object connected to the lex structure
      sql/sql_table.cc:
        Need to flag when a copy is needed to not overwrite a create_info
        object connected to the lex structure
      2b599547
    • unknown's avatar
      ndb - bug#18102: fixes on NDB API level · 5f0eba6f
      unknown authored
      
      storage/ndb/test/ndbapi/test_event_merge.cpp:
        test multiple tables and getGCIEventOperations
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
        fix getGCIEventOperations when merge events is on
      storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp:
        fix getGCIEventOperations when merge events is on
      5f0eba6f
    • unknown's avatar
      Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 238ca465
      unknown authored
      into  mysql.com:/usr/home/ram/work/mysql-5.1
      
      
      238ca465
    • unknown's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 · 79afa8ad
      unknown authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
      
      
      79afa8ad
    • unknown's avatar
      After merge fix · 9a353ee1
      unknown authored
      9a353ee1
    • unknown's avatar
      Fix for bug #20601: rpl_ndb_log.test failure · d14f4ccc
      unknown authored
      
      mysql-test/extra/rpl_tests/rpl_log.test:
        Fix for bug #20601: rpl_ndb_log.test failure
          - replace insignificant columns to make tests repeatable
      mysql-test/r/rpl_ndb_log.result:
        Fix for bug #20601: rpl_ndb_log.test failure
          - result adjusted
      mysql-test/r/rpl_row_log.result:
        Fix for bug #20601: rpl_ndb_log.test failure
          - result adjusted
      mysql-test/r/rpl_row_log_innodb.result:
        Fix for bug #20601: rpl_ndb_log.test failure
          - result adjusted
      d14f4ccc
    • unknown's avatar
      Merge mysql.com:/mnt/raid/alik/MySQL/devel/5.1-tree · d3a7137a
      unknown authored
      into  mysql.com:/mnt/raid/alik/MySQL/devel/5.1-rt-bug20294
      
      
      sql/mysqld.cc:
        Auto merged
      mysql-test/t/disabled.def:
        Manually merged.
      d3a7137a
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge · 6bf7ada5
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
      
      
      mysql-test/r/sql_mode.result:
        Auto merged
      mysql-test/t/sql_mode.test:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      client/mysqldump.c:
        Manual merge
      mysql-test/r/mysqldump.result:
        Manual merge
      mysql-test/t/mysqldump.test:
        Manual merge
      6bf7ada5
    • unknown's avatar
      Fix for BUG#20294: Instance manager test im_instance_conf · 0cb8f695
      unknown authored
      fails randomly.
      
      The problem is that the test was affected by other running
      test-suites on the same box. The fix affects the test only,
      no code touched.
      
      
      mysql-test/r/im_instance_conf.result:
        Updated result file.
      mysql-test/t/disabled.def:
        Enable IM tests.
      mysql-test/t/im_instance_conf.imtest:
        Modify the test so that it does not depend on running
        test-suites on the same box.
      0cb8f695
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl · cffb1699
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
      
      
      mysql-test/t/disabled.def:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      cffb1699
    • unknown's avatar
      Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl · ac67bfd7
      unknown authored
      into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
      
      
      sql/ha_ndbcluster.cc:
        Auto merged
      ac67bfd7
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1 · a0e5d9da
      unknown authored
      into  mysql.com:/home/marty/MySQL/mysql-5.1
      
      
      a0e5d9da
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 · a61b58df
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
      
      
      a61b58df
    • unknown's avatar
      after merge fixes · f4e2516a
      unknown authored
      
      mysql-test/r/partition_error.result:
        result fix
      sql/log.cc:
        use open_slow_log() instead of open_query_log() for slow query log
      sql/log.h:
        after merge fix
      sql/set_var.cc:
        after merge fix
        use open_slow_log() instead of open_query_log() for slow query log
      f4e2516a