1. 13 Jul, 2006 1 commit
    • unknown's avatar
      WL #3337 (Events new architecture) · 31caa8c4
      unknown authored
      Final stroke, events should be loaded from disk on server startup.
      Also check the validity of their bodies if possible during loading.
      
      
      sql/event_data_objects.cc:
        Remove Event_job_data::free_sp(), move the code to the destructor
        Change the way we change the security context
        Steal some code from sql_parse.cc
      sql/event_data_objects.h:
        Remove free_sp()
        Make compile() public, to be used when booting for verifying the integrity of mysql.event
      sql/event_queue.cc:
        Make the queue load events from disk on server boot.
        Compile and thus check for integrity the events.
      sql/event_queue.h:
        shift methods around. add queue_loaded boolean.
      sql/event_scheduler.cc:
        Rename init_event_thread() to pre_init_event_thread()
        and make it more generic.
        Add post_init_event_thread()
        Export these two as well as deinit_event_thread().
        Now it is quite easy to write code to spawn a new event thread
        whenever needed.
      sql/event_scheduler.h:
        export pre_init_event_thread(), post_init_event_thread() and deinit_event_thread()
        to simplify writing of thread functions.
      sql/events.cc:
        Events::init() returns only one error code, then make it bool
      sql/events.h:
        Events::init() returns only one error code, then make it bool
      sql/mysqld.cc:
        Check the return code of Events::init()
      sql/sp_head.cc:
        Add trace info
      sql/sql_class.cc:
        Reorganize thd::change_security_context() to load main_security_ctx
      sql/sql_class.h:
        Reorganize thd::change_security_context() to load main_security_ctx
      sql/sql_lex.cc:
        Initialize lex->spname
      sql/sql_yacc.yy:
        Add a comment
      31caa8c4
  2. 12 Jul, 2006 1 commit
    • unknown's avatar
      WL#3337 (Event scheduler new architecture) · 628be8a7
      unknown authored
      event_scheduler_ng.cc/h is no more
      
      
      BitKeeper/deleted/.del-event_scheduler_ng.cc~8896b89040dbc4f6:
        Delete: sql/event_scheduler_ng.cc
      BitKeeper/deleted/.del-event_scheduler_ng.h~1431af5b185376f:
        Delete: sql/event_scheduler_ng.h
      mysql-test/r/not_embedded_server.result:
        fix test
      sql/Makefile.am:
        event_scheduler_ng.cc/h is no more
      sql/event_queue.cc:
        event_scheduler_ng.cc/h is no more
      sql/event_queue.h:
        event_scheduler_ng.cc/h is no more
      sql/event_scheduler.cc:
        event_scheduler_ng.cc/h is no more
      sql/event_scheduler.h:
        event_scheduler_ng.cc/h is no more
      sql/events.cc:
        event_scheduler_ng.cc/h is no more
      sql/events.h:
        event_scheduler_ng.cc/h is no more
      628be8a7
  3. 11 Jul, 2006 1 commit
    • unknown's avatar
      WL#3337 (Event scheduler new architecture) · 42a8e2c9
      unknown authored
      More small fixes to the API : use LEX_STRING instead of LEX_STRING* and if error
      then return bool(true) instead of error code.
      Merged functions. Reduced usage of sp_name.
      Fixed a lot of function documentation errors.
      Added function documentation wherever needed.
      Removed some unused defines and error codes.
      
      Next to come is batch rename of Event_scheduler_ng to Event_scheduler.
      
      
      mysql-test/r/events.result:
        update result
      mysql-test/r/events_logs_tests.result:
        update result
      mysql-test/t/events.test:
        more test coverage
      mysql-test/t/events_logs_tests.test:
        fix test
      sql/event_data_objects.cc:
        Cosmetics.
        Fix function documentation whenever needed.
        Move Event_job_data::compile() next to Event_job_data::execute()
      sql/event_data_objects.h:
        Remove unneeded error codes and defines
        Move function declarations at the end of the header
      sql/event_db_repository.cc:
        Fix function documentation.
        Event_db_repository::update_event() now uses LEX_STRING *-s instead of
        sp_name . Lower coupling.
      sql/event_db_repository.h:
        Event_db_repository::update_event() now uses LEX_STRING *-s instead of
        sp_name . Lower coupling.
        find_event -> find_named_event
        find_event_by_name is not used externally, merge with load_named_event()
      sql/event_queue.cc:
        LEX_STRING* to LEX_STRING
        Fix comments.
        Fix and add function documentation.
        Remove Event_queue::events_count() as it is unused
        Change get_top_for_execution_if_time() to return status code as return value
        and the object is in out parameter.
      sql/event_queue.h:
        LEX_STRING* to LEX_STRING
        Fix comments.
        Fix and add function documentation.
        Remove Event_queue::events_count() as it is unused
        Change get_top_for_execution_if_time() to return status code as return value
        and the object is in out parameter.
        Try to detect also lock attemptions for deadlocks.
      sql/event_scheduler_ng.cc:
        Always execute on thd->mem_root
        Fix according to changed API of Event_queue::get_top_for_execution_if_time()
      sql/events.cc:
        Fix function documentation.
        Fix code after API changes of internal Event module classes.
      sql/events.h:
        sp_name -> LEX_STRINGs
      sql/sql_parse.cc:
        Fix according to changed API of Events::show_create_event()
      sql/sql_yacc.yy:
        Don't pass NULL as third parameter to sp_head::init_strings()
      42a8e2c9
  4. 10 Jul, 2006 3 commits
    • unknown's avatar
      Remove trailing whitespace. · 084f7442
      unknown authored
      After merge fixes.
      
      
      sql/event_data_objects.cc:
        after merge fix. use thd->strmake instead of strmake_root
        Remove commented out code.
        Remove trailing whitespace.
      sql/event_db_repository.cc:
        After merge fix.
        Before closing thread tables check whether table is actuall non-NULL.
        And always initialize it to NULL.
      sql/event_queue.cc:
        Remove trailing whitespace.
      sql/event_scheduler_ng.cc:
        Remove trailing whitespace.
        Tabs to spaces.
      sql/events.cc:
        Remove trailing whitespace.
      084f7442
    • unknown's avatar
      Manual merge · 5d91dc25
      unknown authored
      
      BitKeeper/etc/ignore:
        auto-union
      mysql-test/r/events_logs_tests.result:
        Auto merged
      mysql-test/t/events_logs_tests.test:
        Auto merged
      mysql-test/t/events_stress.test:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_db.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/event_data_objects.cc:
        manual merge
      sql/events.cc:
        manual merge
      5d91dc25
    • unknown's avatar
      WL#3337 (Event scheduler new architecture) · 974eecc2
      unknown authored
      This patch introduces specialized Event data objects
      Event_basic as parent.
      Event_queue_element used for queue storage
      Event_timed used for SHOW EVENTS/ I_S.EVENTS / SHOW CREATE EVENT
      Event_job_data using during execution.
      Methods were moved out of Event_timed to other classes.
      
      This patch also introduces Events::LOCK_event_metadata.
      This patch gives new implementation of Events::dump_internal_status().
      Now both the Event_scheduler and Event_queue return information during
      their ::dump_internal_status().
      
      Shortened a bit the runtime for executing events test cases.
      
      
      mysql-test/r/events.result:
        update results
      mysql-test/r/events_bugs.result:
        update results
      mysql-test/r/events_logs_tests.result:
        update results
      mysql-test/r/events_scheduling.result:
        update results
      mysql-test/t/events.test:
        update test
        make --sleep more appropriate . saving some time could mean failure on loaded boxes though :(
        add tests for previously uncovered branches.
      mysql-test/t/events_bugs.test:
        update test
        make --sleep more appropriate . saving some time could mean failure on loaded boxes though :(
        add tests for previously uncovered branches.
      mysql-test/t/events_logs_tests.test:
        make the test shorter by time
      mysql-test/t/events_scheduling.test:
        when selecting always use ORDER BY
      mysql-test/t/events_stress.test:
        sleep 2.5secs for shorter stress test
      sql/event_data_objects.cc:
        Event_timed is no more used during execution.
        Event_timed is no more used during in the memory queue.
        Event_timed is only used for SHOW CREATE EVENT/ I_S.EVENTS/ SHOW EVENTS
        Event_basic is the parent of almost all Event data objects.
        Event_basic -> Event_queue_element (used for the memory queue) -> Event_timed
        Event_basic -> Event_job_data (the object used for execution)
        Sql_alloc -> Event_parse_data (used during parsing)
      sql/event_data_objects.h:
        Event_timed is no more used during execution.
        Event_timed is no more used during in the memory queue.
        Event_timed is only used for SHOW CREATE EVENT/ I_S.EVENTS/ SHOW EVENTS
        Event_basic is the parent of almost all Event data objects.
        Event_basic -> Event_queue_element (used for the memory queue) -> Event_timed
        Event_basic -> Event_job_data (the object used for execution)
        Sql_alloc -> Event_parse_data (used during parsing)
      sql/event_db_repository.cc:
        Cosmetics.
        load_named_event now uses Event_basic, for polymorphism
        find_event uses Event_basic, to be polymorphic.
        use Field **fields= table->field and then index fields[...]
        Add documentation.
        Fix documentation.
      sql/event_db_repository.h:
        Event_db_repository depends only on Event_basic's interface
      sql/event_queue.cc:
        Cosmetics.
        Don't use Event_timed for the queue and giving back object for execution.
        Event_queue_element is for the queue, Event_job_data is for execution.
        Add Event_queue::dump_internal_status() for SHOW SCHEDULER STATUS command
      sql/event_queue.h:
        Cosmetics.
        Don't use Event_timed for the queue and giving back object for execution.
        Event_queue_element is for the queue, Event_job_data is for execution.
        Add Event_queue::dump_internal_status() for SHOW SCHEDULER STATUS command
      sql/event_scheduler_ng.cc:
        Add back Event_scheduler::cond_wait()
        Add back Event_scheduler::dump_internal_status()
        Using Event_job_data for execution. Make the scheduler thread unkillable (thd->command= COM_DAEMON).
        Add a lot of documentation.
      sql/event_scheduler_ng.h:
        Add back Event_scheduler::cond_wait()
        Add back Event_scheduler::dump_internal_status()
        Using Event_job_data for execution.
      sql/events.cc:
        Documentation
        Add LOCK_event_metadata
      sql/events.h:
        Change the signature of Events::drop_event() not to use sp_name but LEX_STRING
      sql/share/errmsg.txt:
        Fix error message
      sql/sql_parse.cc:
        Events::drop_event() has new signature
      974eecc2
  5. 07 Jul, 2006 10 commits
  6. 06 Jul, 2006 24 commits
    • unknown's avatar
      After merge fixes. · 71e84df0
      unknown authored
      
      sql/event_timed.cc:
        After merge fixes: dbname can never be NULL.
      sql/events.cc:
        After merge fixes: use a new signature of sp_use_new_db
      sql/sp_head.cc:
        After merge fixes: replace assert with an if for events code to work.
      sql/sql_parse.cc:
        After merge fixes: put back free_items, it's used in partitioning.
        Whether it is not a bug is to be investigated.
        Remove check_db_used, as planned.
      71e84df0
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · 16c54768
      unknown authored
      into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge
      
      
      16c54768
    • unknown's avatar
      removed alter table partition error test since it cannot be made... · 9d332ef7
      unknown authored
      removed alter table partition error test since it cannot be made predictable... name will change of created file
      
      
      
      9d332ef7
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 · c21a6eda
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      c21a6eda
    • unknown's avatar
      Merge bodhi.netgear:/opt/local/work/tmp_merge · df9b4754
      unknown authored
      into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0
      
      
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/ps.result:
        Auto merged
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/ps.test:
        Auto merged
      mysql-test/t/sp.test:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/sp.cc:
        Auto merged
      sql/sp.h:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sp_head.h:
        Auto merged
      sql/sql_db.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_lex.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_trigger.cc:
        Auto merged
      sql/sql_view.cc:
        Auto merged
      sql/table.h:
        Auto merged
      sql/tztime.cc:
        Auto merged
      include/my_sys.h:
        Manual merge (second attempt).
      mysql-test/r/bdb.result:
        Manual merge (second attempt).
      mysql-test/t/bdb.test:
        Manual merge (second attempt).
      mysys/my_malloc.c:
        Manual merge (second attempt).
      mysys/safemalloc.c:
        Manual merge (second attempt).
      sql/ha_federated.cc:
        Manual merge (second attempt).
      sql/log_event.cc:
        Manual merge (second attempt).
      sql/set_var.cc:
        Manual merge (second attempt).
      sql/set_var.h:
        Manual merge (second attempt).
      sql/slave.cc:
        Manual merge (second attempt).
      sql/slave.h:
        Manual merge (second attempt).
      sql/sql_class.h:
        Manual merge (second attempt).
      sql/sql_table.cc:
        Manual merge (second attempt).
      sql/sql_udf.cc:
        Manual merge (second attempt).
      sql/sql_yacc.yy:
        Manual merge (second attempt).
      df9b4754
    • unknown's avatar
      Merge bodhi.netgear:/opt/local/work/mysql-5.1-root · d2b4e9c8
      unknown authored
      into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge
      
      
      BitKeeper/etc/ignore:
        auto-union
      d2b4e9c8
    • unknown's avatar
      Bug #20820 auto inc table not handled correctly when restored from cluster backup · 925fba7a
      unknown authored
      
      mysql-test/t/ndb_dd_backuprestore.test:
        make sure only run in default cluster
      mysql-test/t/rpl_ndb_dd_advance.test:
        make sure only run in default cluster
      mysql-test/t/rpl_ndb_sync.test:
        make sure only run in default cluster
      925fba7a
    • unknown's avatar
      Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 · b78304d2
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      mysql-test/r/ndb_restore.result:
        manual merge
      mysql-test/t/ndb_restore.test:
        manual merge
      storage/ndb/tools/restore/consumer_restore.cpp:
        manual merge
      b78304d2
    • unknown's avatar
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1 · b8057c4a
      unknown authored
      into trift2.:/M51/bug20216-5.1
      
      
      scripts/Makefile.am:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      b8057c4a
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1 · 1ceab206
      unknown authored
      into trift2.:/M51/merge-5.1
      
      
      1ceab206
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb · 9a15154f
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      9a15154f
    • unknown's avatar
      corrected result file · f523685c
      unknown authored
      - missing order by
      
      
      f523685c
    • unknown's avatar
      Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 · 088aad5d
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      storage/ndb/src/ndbapi/DictCache.cpp:
        Auto merged
      088aad5d
    • unknown's avatar
      Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1 · 123c0a98
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
      
      
      ndb/src/ndbapi/DictCache.cpp:
        Auto merged
      123c0a98
    • unknown's avatar
      backport of ndb DictCache fix · 7997d847
      unknown authored
      - don't invalidate tables that are in state RETRIEVING
      
      
      7997d847
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb · e7340d5c
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      e7340d5c
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 7d8ea692
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      7d8ea692
    • unknown's avatar
      After merge fixes for patch solving bug#18437 "Wrong values inserted with a · 0e47753f
      unknown authored
      before update trigger on NDB table".
      
      Two main changes:
      - We use TABLE::read_set/write_set bitmaps for marking fields used by
        statement instead of Field::query_id in 5.1.
      - Now when we mark columns used by statement we take into account columns 
        used by table's triggers instead of marking all columns as used if table
        has triggers.
      
      
      mysql-test/r/federated.result:
        Changed test in order to make it work with RBR.
        RBR changes the way in which we execute "DELETE FROM t1" statement - we don't
        use handler::delete_all_rows() method if RBR is enabled (see bug#19066).
        As result federated engine produces different sequences of statements for
        remote server in non-RBR and in RBR cases. And this changes order of the
        rows inserted by following INSERT statements.
      mysql-test/t/federated.test:
        Changed test in order to make it work with RBR.
        RBR changes the way in which we execute "DELETE FROM t1" statement - we don't
        use handler::delete_all_rows() method if RBR is enabled (see bug#19066).
        As result federated engine produces different sequences of statements for
        remote server in non-RBR and in RBR cases. And this changes order of the
        rows inserted by following INSERT statements.
      sql/ha_partition.cc:
        Added handling of HA_EXTRA_WRITE_CAN_REPLACE/HA_EXTRA_WRITE_CANNOT_REPLACE
        to ha_partition::extra().
      sql/item.cc:
        Adjusted comment after merge. In 5.1 we use TABLE::read_set/write_set
        bitmaps instead of Field::query_id for marking columns used.
      sql/log_event.cc:
        Write_rows_log_event::do_before_row_operations():
          Now we explicitly inform handler that we want to replace rows so it can
          promote operation done by write_row() to replace.
      sql/mysql_priv.h:
        Removed declaration of mark_fields_used_by_triggers_for_insert_stmt() which
        is no longer used (we have TABLE::mark_columns_needed_for_insert() instead).
      sql/sql_insert.cc:
        Adjusted code after merge. Get rid of mark_fields_used_by_triggers_for_insert_stmt()
        as now we use TABLE::mark_columns_needed_for_insert() for the same purprose.
        Aligned places where we call this method with places where we call
        mark_fields_used_by_triggers_for_insert() in 5.0.
        Finally we no longer need to call handler::extra(HA_EXTRA_WRITE_CAN_REPLACE)
        in case of REPLACE statement since in 5.1 write_record() marks all columns
        as used before doing actual row replacement.
      sql/sql_load.cc:
        Adjusted code after merge. In 5.1 we use TABLE::mark_columns_needed_for_insert() instead of
        mark_fields_used_by_triggers_for_insert_stmt() routine. We also no longer
        need to call handler::extra(HA_EXTRA_RETRIEVE_ALL_COLS) if we execute LOAD
        DATA REPLACE since in 5.1 write_record() will mark all columns as used before
        doing actual row replacement.
      sql/sql_trigger.cc:
        Table_triggers_list::mark_fields_used():
          We use TABLE::read_set/write_set bitmaps for marking fields used instead
          of Field::query_id in 5.1.
      sql/sql_trigger.h:
        TABLE::mark_columns_needed_for_* methods no longer need to be friends of
        Table_triggers_list class as intead of dirrectly accessing its private
        members they can use public Table_triggers_list::mark_fields_used() method.
        Also Table_triggers)list::mark_fields_used() no longer needs THD argument.
      sql/table.cc:
        TABLE::mark_columns_needed_for_*():
          Now we mark columns which are really used by table's triggers instead of
          marking all columns as used if table has triggers.
      0e47753f
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 086fef65
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb
      
      
      086fef65
    • unknown's avatar
      corrected results · fc3aad74
      unknown authored
      fc3aad74
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 49daaae0
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      storage/ndb/src/ndbapi/NdbScanOperation.cpp:
        SCCS merged
      49daaae0
    • unknown's avatar
      ndb - revert bug fix for bug#20442 · 0890735c
      unknown authored
      0890735c
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1 · 66764473
      unknown authored
      into  mysql.com:/home/marty/MySQL/mysql-5.1
      
      
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
        Auto merged
      66764473