An error occurred fetching the project authors.
  1. 28 Jun, 2007 1 commit
    • unknown's avatar
      Bug #29157: UPDATE, changed rows incorrect · ba4682ae
      unknown authored
      Sometimes the number of really updated rows (with changed
      column values) cannot be determined at the server level
      alone (e.g. if the storage engine does not return enough
      column values to verify that). So the only dependable way
      in such cases is to let the storage engine return that
      information if possible.
      Fixed the bug at server level by providing a way for the 
      storage engine to return information about wether it 
      actually updated the row or the old and the new column 
      values are the same. It can do that by returning 
      HA_ERR_RECORD_IS_THE_SAME in ha_update_row().
      Note that each storage engine may choose not to try to
      return this status code, so this behaviour remains 
      storage engine specific.
      
      
      include/my_base.h:
        Bug #29157: handle the row not updated special return value
      sql/log_event.cc:
        Bug #29157: handle the row not updated special return value
      sql/sp.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_acl.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_insert.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_servers.cc:
        Bug #29157: handle the row not updated special return value
      sql/sql_update.cc:
        Bug #29157: handle the row not updated special return value
      ba4682ae
  2. 20 Jun, 2007 3 commits
    • unknown's avatar
      Fixed bug #28293. · b5eb3fcb
      unknown authored
      Occasionally mysqlbinlog --hexdump failed with error:
        ERROR 1064 (42000) at line ...: You have an error in your
        SQL syntax; check the manual that corresponds to your MySQL
        server version for the right syntax to use near
        'Query thread_id=... exec_time=... error_code=...
      
      When the length of hexadecimal dump of binlog header was
      divisible by 16, commentary sign '#' after header was lost.
      The Log_event::print_header function has been modified to always
      finish hexadecimal binlog header with "\n# ".
      
      
      sql/log_event.cc:
        Fixed bug #28293.
        The Log_event::print_header function has been modified to always
        finish hexadecimal binlog header with "\n# ".
      mysql-test/r/mysqlbinlog.result:
        Updated test case for bug #28293.
      mysql-test/t/mysqlbinlog.test:
        Updated test case for bug #28293.
      b5eb3fcb
    • unknown's avatar
      Bug #27583 slave sql fails to read from iocache when slave got stopped at pos==4 · c8bdab11
      unknown authored
      forgotten merge with 5.0. There can be some bugs waiting for this fix in 5.0 like Bug@29232
      
      
      sql/log_event.cc:
        file name is changed in step with the position.
      c8bdab11
    • unknown's avatar
      Bug #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists. · d5cc204e
      unknown authored
      slave_sql thread calls thd->clear_error() to force error to be ignored,
      though this method didn't clear thd->killed state, what causes
      slave_sql thread to stop.
      
      clear thd->killed state if we ignore an error
      
      
      mysql-test/r/rpl_skip_error.result:
        Bug #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists.
        
        test result
      mysql-test/t/rpl_skip_error.test:
        Bug #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists.
        
        test case
      sql/log_event.cc:
        Bug #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists.
        
        clear thd->killed state if we ignore the error
      d5cc204e
  3. 13 Jun, 2007 1 commit
    • unknown's avatar
      Fixing some trivial test problems. · 2b24acb2
      unknown authored
      mysql-test/r/rpl_loaddata_fatal.result:
        Result change
      mysql-test/r/rpl_slave_skip.result:
        Result change
      mysql-test/t/rpl_loaddata_fatal.test:
        Test only valid for debug build
        Adding shutdown sequence.
      mysql-test/t/rpl_slave_skip.test:
        Masking out new columns.
      sql/log_event.cc:
        Freeing memory to keep valgrind silent.
      2b24acb2
  4. 11 Jun, 2007 1 commit
    • unknown's avatar
      BUG#24954 (Last_errno and Last_error not set after master_retry_count has · abbf5941
      unknown authored
      been reached):
      
      Post-merge patch to handle all the changes to the tree since the tree
      was cloned.
      
      
      mysql-test/extra/rpl_tests/rpl_log.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/extra/rpl_tests/rpl_reset_slave.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/include/show_slave_status.inc:
        Column change.
      mysql-test/r/rpl_000015.result:
        Result file change.
      mysql-test/r/rpl_change_master.result:
        Result file change.
      mysql-test/r/rpl_empty_master_crash.result:
        Result file change.
      mysql-test/r/rpl_extraCol_innodb.result:
        Result file change.
      mysql-test/r/rpl_extraCol_myisam.result:
        Result file change.
      mysql-test/r/rpl_flushlog_loop.result:
        Result file change.
      mysql-test/r/rpl_incident.result:
        Result file change.
      mysql-test/r/rpl_known_bugs_detection.result:
        Result file change.
      mysql-test/r/rpl_loaddata.result:
        Result file change.
      mysql-test/r/rpl_loaddata_fatal.result:
        Result file change.
      mysql-test/r/rpl_log_pos.result:
        Result file change.
      mysql-test/r/rpl_ndb_basic.result:
        Result file change.
      mysql-test/r/rpl_ndb_circular.result:
        Result file change.
      mysql-test/r/rpl_ndb_extraCol.result:
        Result file change.
      mysql-test/r/rpl_ndb_idempotent.result:
        Result file change.
      mysql-test/r/rpl_ndb_log.result:
        Result file change.
      mysql-test/r/rpl_ndb_sync.result:
        Result file change.
      mysql-test/r/rpl_rbr_to_sbr.result:
        Result file change.
      mysql-test/r/rpl_redirect.result:
        Result file change.
      mysql-test/r/rpl_replicate_do.result:
        Result file change.
      mysql-test/r/rpl_rotate_logs.result:
        Result file change.
      mysql-test/r/rpl_row_inexist_tbl.result:
        Result file change.
      mysql-test/r/rpl_row_log.result:
        Result file change.
      mysql-test/r/rpl_row_log_innodb.result:
        Result file change.
      mysql-test/r/rpl_row_max_relay_size.result:
        Result file change.
      mysql-test/r/rpl_row_reset_slave.result:
        Result file change.
      mysql-test/r/rpl_row_tabledefs_2myisam.result:
        Result file change.
      mysql-test/r/rpl_row_tabledefs_3innodb.result:
        Result file change.
      mysql-test/r/rpl_row_until.result:
        Result file change.
      mysql-test/r/rpl_server_id1.result:
        Result file change.
      mysql-test/r/rpl_server_id2.result:
        Result file change.
      mysql-test/r/rpl_slave_skip.result:
        Result file change.
      mysql-test/r/rpl_ssl.result:
        Result file change.
      mysql-test/r/rpl_ssl1.result:
        Result file change.
      mysql-test/r/rpl_stm_log.result:
        Result file change.
      mysql-test/r/rpl_stm_max_relay_size.result:
        Result file change.
      mysql-test/r/rpl_stm_reset_slave.result:
        Result file change.
      mysql-test/r/rpl_stm_until.result:
        Result file change.
      mysql-test/t/rpl_000015.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_change_master.test:
        Column position change.
        Making result of SHOW SLAVE STATUS vertical.
      mysql-test/t/rpl_empty_master_crash.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_log_pos.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_ndb_basic.test:
        Column position change.
      mysql-test/t/rpl_ndb_idempotent.test:
        Column position change.
      mysql-test/t/rpl_ndb_sync.test:
        Column position change.
        Making result of SHOW SLAVE STATUS vertical.
      mysql-test/t/rpl_redirect.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_replicate_do.test:
        Column position change.
        Making result of SHOW SLAVE STATUS vertical.
      mysql-test/t/rpl_rotate_logs.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_row_inexist_tbl.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_row_until.test:
        Replacing SHOW SLAVE STATUS with include file.
      mysql-test/t/rpl_server_id1.test:
        Column position change.
        Making result of SHOW SLAVE STATUS vertical.
      mysql-test/t/rpl_server_id2.test:
        Column position change.
        Making result of SHOW SLAVE STATUS vertical.
      mysql-test/t/rpl_slave_status.test:
        Column position change.
      mysql-test/t/rpl_ssl.test:
        Column position change.
      mysql-test/t/rpl_ssl1.test:
        Column position change.
      mysql-test/t/rpl_stm_until.test:
        Replacing SHOW SLAVE STATUS with include file.
      sql/log_event.cc:
        Using member function last_error() instead of member variable.
        Replacing use of 'table' with 'm_table'.
        Suppressing warnings in debug printout.
        Setting thd->net.last_error on error return from unpack_row() to get
        a non-zero error message.  The error codes for are being harmonized
        in another worklog.
        Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
      sql/rpl_mi.h:
        Moving order of include files since they are dependent (!).
      sql/rpl_record.cc:
        Adding missing include file.
        Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
      sql/rpl_record_old.cc:
        Adding missing include file.
        Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
      sql/rpl_reporting.cc:
        Adding const modifier to member function.
        Using renamed member variable m_last_error.
      sql/rpl_reporting.h:
        Adding missing constant MAX_SLAVE_ERRMSG.
        Adding const modifier to Slave_reporting_capability::report().
        Hiding and renaming member variable last_error and incorporating
        member function for access in order to make it mutable.
      sql/rpl_rli.h:
        Moving constant MAX_SLAVE_ERRMSG.
      sql/rpl_utility.cc:
        Adding missing include file rpl_rli.h.
      sql/slave.cc:
        Replacing use of member variable last_error with call to member function
        last_error().
        Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
      abbf5941
  5. 09 Jun, 2007 1 commit
    • unknown's avatar
      BUG#24954 (Last_errno and Last_error not set after master_retry_count was reached): · 79a609aa
      unknown authored
      Adding new fields Last_{IO,SQL}_Errno and Last_{IO,SQL}_Error to output
      of SHOW SLAVE STATUS to hold errors from I/O and SQL thread respectively.
      Old fields Last_Error and Last_Errno are aliases for Last_SQL_Error and
      Last_SQL_Errno respectively.
      
      Fields are added last to output of SHOW SLAVE STATUS to allow old applications
      to use the same positional arguments into the row, while allowing new
      application to benefit from the added information.
      
      In addition, some new error codes are added (especially for the I/O
      thread) to be able to provide sensible error message.
      
      
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        Result change
      mysql-test/r/rpl_000015.result:
        Result change
      mysql-test/r/rpl_change_master.result:
        Result change
      mysql-test/r/rpl_deadlock_innodb.result:
        Result change
      mysql-test/r/rpl_empty_master_crash.result:
        Result change
      mysql-test/r/rpl_extraCol_innodb.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_extraCol_myisam.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_flushlog_loop.result:
        Result change
      mysql-test/r/rpl_loaddata.result:
        Result change
      mysql-test/r/rpl_log_pos.result:
        Result change
      mysql-test/r/rpl_ndb_basic.result:
        Result change
      mysql-test/r/rpl_ndb_extraCol.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_ndb_idempotent.result:
        Result change
      mysql-test/r/rpl_ndb_log.result:
        Result change
      mysql-test/r/rpl_openssl.result:
        Result change
      mysql-test/r/rpl_rbr_to_sbr.result:
        Result change
      mysql-test/r/rpl_redirect.result:
        Result change
      mysql-test/r/rpl_replicate_do.result:
        Result change
      mysql-test/r/rpl_rotate_logs.result:
        Result change
      mysql-test/r/rpl_row_inexist_tbl.result:
        Result change
      mysql-test/r/rpl_row_log.result:
        Result change
      mysql-test/r/rpl_row_log_innodb.result:
        Result change
      mysql-test/r/rpl_row_max_relay_size.result:
        Result change
      mysql-test/r/rpl_row_reset_slave.result:
        Result change
      mysql-test/r/rpl_row_tabledefs_2myisam.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_row_tabledefs_3innodb.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_row_until.result:
        Result change
      mysql-test/r/rpl_server_id1.result:
        Result change
      mysql-test/r/rpl_server_id2.result:
        Result change
      mysql-test/r/rpl_slave_status.result:
        Result change
      mysql-test/r/rpl_stm_log.result:
        Result change
      mysql-test/r/rpl_stm_max_relay_size.result:
        Result change
        ---
        Result change.
      mysql-test/r/rpl_stm_reset_slave.result:
        Result change
      mysql-test/r/rpl_stm_until.result:
        Result change
      mysql-test/t/binlog_row_mix_innodb_myisam.test:
        Test fixed.
      mysql-test/t/rpl_000015.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_change_master.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_empty_master_crash.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_flushlog_loop.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_log_pos.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_ndb_bank.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_ndb_basic.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_ndb_idempotent.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_ndb_sync.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_openssl.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_rbr_to_sbr.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_redirect.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_replicate_do.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_rotate_logs.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_row_inexist_tbl.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_row_until.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_server_id1.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_server_id2.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_slave_status.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      mysql-test/t/rpl_stm_until.test:
        Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
      sql/Makefile.am:
        Adding new files
      sql/log_event.cc:
        Changes to use Slave_reporting_capability for reporting errors.
        
        Adding debug variable to stop slave with an out-of-memory error or with
        a fatal error. The checks are put both in the new Execute_load_query_
        log_event and in the old Load_log_event which is used for Execute_load_
        log_event.
        
        Adding code to generate fatal error message.
        
        Eliminating redundant arguments when printing ER_NO_DEFAULT_FOR_FIELD
        message.
      sql/rpl_mi.cc:
        Using Slave_reporting_capability for error reporting.
      sql/rpl_mi.h:
        Using Slave_reporting_capability to handle I/O thread errors and other messages.
      sql/rpl_rli.cc:
        Using Slave_reporting_capability to handle SQL thread errors and other messages.
      sql/rpl_rli.h:
        Changes to use Slave_reporting_capability for reporting SQL thread error and other messages.
      sql/rpl_utility.cc:
        Changes to use Slave_reporting_capability for reporting errors.
      sql/slave.cc:
        Changes to use Slave_reporting_capability for reporting errors.
      sql/slave.h:
        Removing slave_print_msg()
      sql/share/errmsg.txt:
        New error messages.
        
        Making message for ER_NO_DEFAULT_FOR_FIELD consistent over languages
        (actually restoring old message).
        
        Adding argument to ER_SLAVE_FATAL_ERROR message.
      sql/sql_repl.cc:
        Using new names for thread masks.
      mysql-test/t/rpl_loaddata_fatal-slave.opt:
        New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal-slave.opt''
      sql/rpl_reporting.cc:
        New BitKeeper file ``sql/rpl_reporting.cc''
      sql/rpl_reporting.h:
        New BitKeeper file ``sql/rpl_reporting.h''
      mysql-test/include/show_slave_status.inc:
        New BitKeeper file ``mysql-test/include/show_slave_status.inc''
      mysql-test/r/rpl_loaddata_fatal.result:
        New BitKeeper file ``mysql-test/r/rpl_loaddata_fatal.result''
      mysql-test/t/rpl_loaddata_fatal.test:
        New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal.test''
      79a609aa
  6. 31 May, 2007 1 commit
    • unknown's avatar
      BUG#28618 (Skipping into the middle of a group with · e9adcac2
      unknown authored
      SQL_SLAVE_SKIP_COUNTER is possible):
      
      By setting the SQL_SLAVE_SKIP_COUNTER it was possible to start the
      from the middle of a group. This patch adds code so that events that
      do not end a statement are ignored instead of skip counted when the
      slave skip counter is 1.
      
      
      sql/log_event.cc:
        Adding code so that for rows log events where the STMT_END_F is clear
        and for table map events, the event is ignored when the slave skip
        counter is 1 instead of skip counted, or described another way, the
        slave skip counter can only be decreased from 1 to 0 when the
        STMT_END_F flag is set.
      sql/log_event.h:
        Adding functions Table_map_log_event::do_shall_skip() and
        Rows_log_event::do_shall_skip().
      e9adcac2
  7. 30 May, 2007 2 commits
    • unknown's avatar
      Fix for bug #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump · e7ad04ea
      unknown authored
      Problem: there is an ASSERT() in the Log_event::read_log_event() checking the integrity 
      of the event's data that may fail.
      Fix: move the assert's condition to an explicit check.
      
      
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Fix for bug #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump
          - test result.
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Fix for bug #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump
          - test case.
      sql/log_event.cc:
        Fix for bug #28436: Incorrect position in SHOW BINLOG EVENTS causes server coredump
          - assert's condition moved to the explicit integrity check.
      e7ad04ea
    • unknown's avatar
      Added extra parenthesis to remove compiler warning · d57f3bbb
      unknown authored
      Fixed test case rpl_incident.test (synchronize drop table, masked IO thread behaviour)
      
      
      mysql-test/r/rpl_incident.result:
        Masking master_log_file since IO thread is not synchronized in rpl_incident.test
      mysql-test/t/rpl_incident.test:
        Masking master_log_file since IO thread is not synchronized in rpl_incident.test
        Correcting drop of table so it is synchronized
      sql/log_event.cc:
        Added extra parenthesis to remove compiler warning
      d57f3bbb
  8. 29 May, 2007 1 commit
    • unknown's avatar
      Bug#27044 replicated with unique field ndb table allows duplkey inserts · 814e4dd2
      unknown authored
      The bug in that slave version of a table with unique field still was
      able to execute INSERT query as replace whereas it's impossible on master.
      
      The reason of this artifact is wrong usage of ndb->extra:s.
      
      Fixed with resetting flags at do_after.
      There is open issue with symmetrical resetting
         table->file->extra(HA_EXTRA_NO_IGNORE_NO_KEY)
      which i had to hand to bug#27077.
      The test for the current bug was committed in a cset for bug#27320.
      
      
      sql/log_event.cc:
        fixing do_after_row_operation to reset the effect of the extra engine's 
        flags set at do_before;
        comments on meaning of extra flags added;
        execution of table->file->ha_end_bulk_insert() in do_after is not dependant on error;
      814e4dd2
  9. 28 May, 2007 1 commit
    • unknown's avatar
      Bug#22725 Replication outages from ER_SERVER_SHUTDOWN (1053) set in replication events · f27bf2b4
      unknown authored
        
      The reason for the bug was that replaying of a query on slave could not be possible since its event
      was recorded with the killed error. Due to the specific of handling INSERT, which per-row-while-loop is 
      unbreakable to killing, the query on transactional table should have not appeared in binlog unless
      there was  a call to a stored routine that got interrupted with killing (and then there must be an error
      returned out of the loop).
         
      The offered solution added the following rule for binlogging of INSERT that accounts the above
      specifics:
      For INSERT on transactional-table if the error was not set the only raised flag
      is harmless and is ignored via masking out on time of creation of binlog event.
         
      For both table types the combination of raised error and KILLED flag indicates that there
      was potentially partial execution on master and consistency is under the question.
      In that case the code continues to binlog an event with an appropriate killed error.
       
      The fix relies on the specified behaviour of stored routine that must propagate the error 
      to the top level query handling if the thd->killed flag was raised in the routine execution.
         
      The patch adds an arg with the default killed-status-unset value to Query_log_event::Query_log_event.
      
      
      sql/log_event.cc:
        killed_status as the value of thd->killed can be passed as an arg to the constructor.
        if the value is different from the default the arg is set to the current thd->killed value.
        A caller might need to masquerade thd->killed with THD::NOT_KILLED.
        So far only mysql_insert() uses such explicit way to tell the constructor about killing status.
      sql/log_event.h:
        default arg to the constructor with meaning of killed status of the query. 
        if the arg is not explicitly provided the status of thd->killed will be snapshot 
        inside of the constuctor, which is potentially incorrect (see bug#27571)
      sql/sql_class.h:
        extending killed_state with no-state member.
      sql/sql_insert.cc:
        ignore the KILLED flag incl KILL_BAD_DATA when the INSERT query event 
        is created without an `error';
      sql/sql_update.cc:
        Suggestion how to fix bug#27571 as comments.
      mysql-test/r/binlog_killed.result:
        new result file
      mysql-test/t/binlog_killed.test:
        regression tests also apply for bug27563, BUG#27565
      f27bf2b4
  10. 10 May, 2007 1 commit
    • unknown's avatar
      WL#3817: Simplify string / memory area types and make things more consistent (first part) · f252f924
      unknown authored
      The following type conversions was done:
      
      - Changed byte to uchar
      - Changed gptr to uchar*
      - Change my_string to char *
      - Change my_size_t to size_t
      - Change size_s to size_t
      
      Removed declaration of byte, gptr, my_string, my_size_t and size_s. 
      
      Following function parameter changes was done:
      - All string functions in mysys/strings was changed to use size_t
        instead of uint for string lengths.
      - All read()/write() functions changed to use size_t (including vio).
      - All protocoll functions changed to use size_t instead of uint
      - Functions that used a pointer to a string length was changed to use size_t*
      - Changed malloc(), free() and related functions from using gptr to use void *
        as this requires fewer casts in the code and is more in line with how the
        standard functions work.
      - Added extra length argument to dirname_part() to return the length of the
        created string.
      - Changed (at least) following functions to take uchar* as argument:
        - db_dump()
        - my_net_write()
        - net_write_command()
        - net_store_data()
        - DBUG_DUMP()
        - decimal2bin() & bin2decimal()
      - Changed my_compress() and my_uncompress() to use size_t. Changed one
        argument to my_uncompress() from a pointer to a value as we only return
        one value (makes function easier to use).
      - Changed type of 'pack_data' argument to packfrm() to avoid casts.
      - Changed in readfrm() and writefrom(), ha_discover and handler::discover()
        the type for argument 'frmdata' to uchar** to avoid casts.
      - Changed most Field functions to use uchar* instead of char* (reduced a lot of
        casts).
      - Changed field->val_xxx(xxx, new_ptr) to take const pointers.
      
      Other changes:
      - Removed a lot of not needed casts
      - Added a few new cast required by other changes
      - Added some cast to my_multi_malloc() arguments for safety (as string lengths
        needs to be uint, not size_t).
      - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
        explicitely as this conflict was often hided by casting the function to
        hash_get_key).
      - Changed some buffers to memory regions to uchar* to avoid casts.
      - Changed some string lengths from uint to size_t.
      - Changed field->ptr to be uchar* instead of char*. This allowed us to
        get rid of a lot of casts.
      - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
      - Include zlib.h in some files as we needed declaration of crc32()
      - Changed MY_FILE_ERROR to be (size_t) -1.
      - Changed many variables to hold the result of my_read() / my_write() to be
        size_t. This was needed to properly detect errors (which are
        returned as (size_t) -1).
      - Removed some very old VMS code
      - Changed packfrm()/unpackfrm() to not be depending on uint size
        (portability fix)
      - Removed windows specific code to restore cursor position as this
        causes slowdown on windows and we should not mix read() and pread()
        calls anyway as this is not thread safe. Updated function comment to
        reflect this. Changed function that depended on original behavior of
        my_pwrite() to itself restore the cursor position (one such case).
      - Added some missing checking of return value of malloc().
      - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
      - Changed type of table_def::m_size from my_size_t to ulong to reflect that
        m_size is the number of elements in the array, not a string/memory
        length.
      - Moved THD::max_row_length() to table.cc (as it's not depending on THD).
        Inlined max_row_length_blob() into this function.
      - More function comments
      - Fixed some compiler warnings when compiled without partitions.
      - Removed setting of LEX_STRING() arguments in declaration (portability fix).
      - Some trivial indentation/variable name changes.
      - Some trivial code simplifications:
        - Replaced some calls to alloc_root + memcpy to use
          strmake_root()/strdup_root().
        - Changed some calls from memdup() to strmake() (Safety fix)
        - Simpler loops in client-simple.c
      
      
      BitKeeper/etc/ignore:
        added libmysqld/ha_ndbcluster_cond.cc
        ---
        added debian/defs.mk debian/control
      client/completion_hash.cc:
        Remove not needed casts
      client/my_readline.h:
        Remove some old types
      client/mysql.cc:
        Simplify types
      client/mysql_upgrade.c:
        Remove some old types
        Update call to dirname_part
      client/mysqladmin.cc:
        Remove some old types
      client/mysqlbinlog.cc:
        Remove some old types
        Change some buffers to be uchar to avoid casts
      client/mysqlcheck.c:
        Remove some old types
      client/mysqldump.c:
        Remove some old types
        Remove some not needed casts
        Change some string lengths to size_t
      client/mysqlimport.c:
        Remove some old types
      client/mysqlshow.c:
        Remove some old types
      client/mysqlslap.c:
        Remove some old types
        Remove some not needed casts
      client/mysqltest.c:
        Removed some old types
        Removed some not needed casts
        Updated hash-get-key function arguments
        Updated parameters to dirname_part()
      client/readline.cc:
        Removed some old types
        Removed some not needed casts
        Changed some string lengths to use size_t
      client/sql_string.cc:
        Removed some old types
      dbug/dbug.c:
        Removed some old types
        Changed some string lengths to use size_t
        Changed some prototypes to avoid casts
      extra/comp_err.c:
        Removed some old types
      extra/innochecksum.c:
        Removed some old types
      extra/my_print_defaults.c:
        Removed some old types
      extra/mysql_waitpid.c:
        Removed some old types
      extra/perror.c:
        Removed some old types
      extra/replace.c:
        Removed some old types
        Updated parameters to dirname_part()
      extra/resolve_stack_dump.c:
        Removed some old types
      extra/resolveip.c:
        Removed some old types
      include/config-win.h:
        Removed some old types
      include/decimal.h:
        Changed binary strings to be uchar* instead of char*
      include/ft_global.h:
        Removed some old types
      include/hash.h:
        Removed some old types
      include/heap.h:
        Removed some old types
        Changed records_under_level to be 'ulong' instead of 'uint' to clarify usage of variable
      include/keycache.h:
        Removed some old types
      include/m_ctype.h:
        Removed some old types
        Changed some string lengths to use size_t
        Changed character length functions to return uint
        unsigned char -> uchar
      include/m_string.h:
        Removed some old types
        Changed some string lengths to use size_t
      include/my_alloc.h:
        Changed some string lengths to use size_t
      include/my_base.h:
        Removed some old types
      include/my_dbug.h:
        Removed some old types
        Changed some string lengths to use size_t
        Changed db_dump() to take uchar * as argument for memory to reduce number of casts in usage
      include/my_getopt.h:
        Removed some old types
      include/my_global.h:
        Removed old types:
        my_size_t -> size_t
        byte -> uchar
        gptr -> uchar *
      include/my_list.h:
        Removed some old types
      include/my_nosys.h:
        Removed some old types
      include/my_pthread.h:
        Removed some old types
      include/my_sys.h:
        Removed some old types
        Changed MY_FILE_ERROR to be in line with new definitions of my_write()/my_read()
        Changed some string lengths to use size_t
        my_malloc() / my_free() now uses void *
        Updated parameters to dirname_part() & my_uncompress()
      include/my_tree.h:
        Removed some old types
      include/my_trie.h:
        Removed some old types
      include/my_user.h:
        Changed some string lengths to use size_t
      include/my_vle.h:
        Removed some old types
      include/my_xml.h:
        Removed some old types
        Changed some string lengths to use size_t
      include/myisam.h:
        Removed some old types
      include/myisammrg.h:
        Removed some old types
      include/mysql.h:
        Removed some old types
        Changed byte streams to use uchar* instead of char*
      include/mysql_com.h:
        Removed some old types
        Changed some string lengths to use size_t
        Changed some buffers to be uchar* to avoid casts
      include/queues.h:
        Removed some old types
      include/sql_common.h:
        Removed some old types
      include/sslopt-longopts.h:
        Removed some old types
      include/violite.h:
        Removed some old types
        Changed some string lengths to use size_t
      libmysql/client_settings.h:
        Removed some old types
      libmysql/libmysql.c:
        Removed some old types
      libmysql/manager.c:
        Removed some old types
      libmysqld/emb_qcache.cc:
        Removed some old types
      libmysqld/emb_qcache.h:
        Removed some old types
      libmysqld/lib_sql.cc:
        Removed some old types
        Removed some not needed casts
        Changed some buffers to be uchar* to avoid casts
        true -> TRUE, false -> FALSE
      mysys/array.c:
        Removed some old types
      mysys/charset.c:
        Changed some string lengths to use size_t
      mysys/checksum.c:
        Include zlib to get definition for crc32
        Removed some old types
      mysys/default.c:
        Removed some old types
        Changed some string lengths to use size_t
      mysys/default_modify.c:
        Changed some string lengths to use size_t
        Removed some not needed casts
      mysys/hash.c:
        Removed some old types
        Changed some string lengths to use size_t
        Note: Prototype of hash_key() has changed which may cause problems if client uses hash_init() with a cast for the hash-get-key function.
        hash_element now takes 'ulong' as the index type (cleanup)
      mysys/list.c:
        Removed some old types
      mysys/mf_cache.c:
        Changed some string lengths to use size_t
      mysys/mf_dirname.c:
        Removed some old types
        Changed some string lengths to use size_t
        Added argument to dirname_part() to avoid calculation of length for 'to'
      mysys/mf_fn_ext.c:
        Removed some old types
        Updated parameters to dirname_part()
      mysys/mf_format.c:
        Removed some old types
        Changed some string lengths to use size_t
      mysys/mf_getdate.c:
        Removed some old types
      mysys/mf_iocache.c:
        Removed some old types
        Changed some string lengths to use size_t
        Changed calculation of 'max_length' to be done the same way in all functions
      mysys/mf_iocache2.c:
        Removed some old types
        Changed some string lengths to use size_t
        Clean up comments
        Removed not needed indentation
      mysys/mf_keycache.c:
        Removed some old types
      mysys/mf_keycaches.c:
        Removed some old types
      mysys/mf_loadpath.c:
        Removed some old types
      mysys/mf_pack.c:
        Removed some old types
        Changed some string lengths to use size_t
        Removed some not needed casts
        Removed very old VMS code
        Updated parameters to dirname_part()
        Use result of dirnam_part() to remove call to strcat()
      mysys/mf_path.c:
        Removed some old types
      mysys/mf_radix.c:
        Removed some old types
      mysys/mf_same.c:
        Removed some old types
      mysys/mf_sort.c:
        Removed some old types
      mysys/mf_soundex.c:
        Removed some old types
      mysys/mf_strip.c:
        Removed some old types
      mysys/mf_tempdir.c:
        Removed some old types
      mysys/mf_unixpath.c:
        Removed some old types
      mysys/mf_wfile.c:
        Removed some old types
      mysys/mulalloc.c:
        Removed some old types
      mysys/my_alloc.c:
        Removed some old types
        Changed some string lengths to use size_t
        Use void* as type for allocated memory area
        Removed some not needed casts
        Changed argument 'Size' to 'length' according coding guidelines
      mysys/my_chsize.c:
        Changed some buffers to be uchar* to avoid casts
      mysys/my_compress.c:
        More comments
        Removed some old types
        Changed string lengths to use size_t
        Changed arguments to my_uncompress() to make them easier to understand
        Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix)
        Changed type of 'pack_data' argument to packfrm() to avoid casts.
      mysys/my_conio.c:
        Changed some string lengths to use size_t
      mysys/my_create.c:
        Removed some old types
      mysys/my_div.c:
        Removed some old types
      mysys/my_error.c:
        Removed some old types
      mysys/my_fopen.c:
        Removed some old types
      mysys/my_fstream.c:
        Removed some old types
        Changed some string lengths to use size_t
        writen -> written
      mysys/my_getopt.c:
        Removed some old types
      mysys/my_getwd.c:
        Removed some old types
        More comments
      mysys/my_init.c:
        Removed some old types
      mysys/my_largepage.c:
        Removed some old types
        Changed some string lengths to use size_t
      mysys/my_lib.c:
        Removed some old types
      mysys/my_lockmem.c:
        Removed some old types
      mysys/my_malloc.c:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
        Changed all functions to use size_t
      mysys/my_memmem.c:
        Indentation cleanup
      mysys/my_once.c:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
      mysys/my_open.c:
        Removed some old types
      mysys/my_pread.c:
        Removed some old types
        Changed all functions to use size_t
        Added comment for how my_pread() / my_pwrite() are supposed to work.
        Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe.
        (If we ever would really need this, it should be enabled only with a flag argument)
      mysys/my_quick.c:
        Removed some old types
        Changed all functions to use size_t
      mysys/my_read.c:
        Removed some old types
        Changed all functions to use size_t
      mysys/my_realloc.c:
        Removed some old types
        Use void* as type for allocated memory area
        Changed all functions to use size_t
      mysys/my_static.c:
        Removed some old types
      mysys/my_static.h:
        Removed some old types
      mysys/my_vle.c:
        Removed some old types
      mysys/my_wincond.c:
        Removed some old types
      mysys/my_windac.c:
        Removed some old types
      mysys/my_write.c:
        Removed some old types
        Changed all functions to use size_t
      mysys/ptr_cmp.c:
        Removed some old types
        Changed all functions to use size_t
      mysys/queues.c:
        Removed some old types
      mysys/safemalloc.c:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
        Changed all functions to use size_t
      mysys/string.c:
        Removed some old types
        Changed all functions to use size_t
      mysys/testhash.c:
        Removed some old types
      mysys/thr_alarm.c:
        Removed some old types
      mysys/thr_lock.c:
        Removed some old types
      mysys/tree.c:
        Removed some old types
      mysys/trie.c:
        Removed some old types
      mysys/typelib.c:
        Removed some old types
      plugin/daemon_example/daemon_example.cc:
        Removed some old types
      regex/reginit.c:
        Removed some old types
      server-tools/instance-manager/buffer.cc:
        Changed some string lengths to use size_t
        Changed buffer to be of type uchar*
      server-tools/instance-manager/buffer.h:
        Changed some string lengths to use size_t
        Changed buffer to be of type uchar*
      server-tools/instance-manager/commands.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed buffer to be of type uchar*
      server-tools/instance-manager/instance_map.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed buffer to be of type uchar*
      server-tools/instance-manager/instance_options.cc:
        Changed buffer to be of type uchar*
        Replaced alloc_root + strcpy() with strdup_root()
      server-tools/instance-manager/mysql_connection.cc:
        Changed buffer to be of type uchar*
      server-tools/instance-manager/options.cc:
        Removed some old types
      server-tools/instance-manager/parse.cc:
        Changed some string lengths to use size_t
      server-tools/instance-manager/parse.h:
        Removed some old types
        Changed some string lengths to use size_t
      server-tools/instance-manager/protocol.cc:
        Changed some buffers to be uchar* to avoid casts
        Changed some string lengths to use size_t
      server-tools/instance-manager/protocol.h:
        Changed some string lengths to use size_t
      server-tools/instance-manager/user_map.cc:
        Removed some old types
        Changed some string lengths to use size_t
      sql/derror.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Changed some string lengths to use size_t
      sql/discover.cc:
        Changed in readfrm() and writefrom() the type for argument 'frmdata' to uchar** to avoid casts
        Changed some string lengths to use size_t
        Changed some buffers to be uchar* to avoid casts
      sql/event_data_objects.cc:
        Removed some old types
        Added missing casts for alloc() and sprintf()
      sql/event_db_repository.cc:
        Changed some buffers to be uchar* to avoid casts
        Added missing casts for sprintf()
      sql/event_queue.cc:
        Removed some old types
      sql/field.cc:
        Removed some old types
        Changed memory buffers to be uchar*
        Changed some string lengths to use size_t
        Removed a lot of casts
        Safety fix in Field_blob::val_decimal() to not access zero pointer
      sql/field.h:
        Removed some old types
        Changed memory buffers to be uchar* (except of store() as this would have caused too many other changes). 
        Changed some string lengths to use size_t
        Removed some not needed casts
        Changed val_xxx(xxx, new_ptr) to take const pointers
      sql/field_conv.cc:
        Removed some old types
        Added casts required because memory area pointers are now uchar*
      sql/filesort.cc:
        Initalize variable that was used unitialized in error conditions
      sql/gen_lex_hash.cc:
        Removed some old types
        Changed memory buffers to be uchar*
        Changed some string lengths to use size_t
        Removed a lot of casts
        Safety fix in Field_blob::val_decimal() to not access zero pointer
      sql/gstream.h:
        Added required cast
      sql/ha_ndbcluster.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Changed some buffers to be uchar* to avoid casts
        Added required casts
        Removed some not needed casts
      sql/ha_ndbcluster.h:
        Removed some old types
      sql/ha_ndbcluster_binlog.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Replaced sql_alloc() + memcpy() + set end 0 with sql_strmake()
        Changed some string lengths to use size_t
        Added missing casts for alloc() and sprintf()
      sql/ha_ndbcluster_binlog.h:
        Removed some old types
      sql/ha_ndbcluster_cond.cc:
        Removed some old types
        Removed some not needed casts
      sql/ha_ndbcluster_cond.h:
        Removed some old types
      sql/ha_partition.cc:
        Removed some old types
        Changed prototype for change_partition() to avoid casts
      sql/ha_partition.h:
        Removed some old types
      sql/handler.cc:
        Removed some old types
        Changed some string lengths to use size_t
      sql/handler.h:
        Removed some old types
        Changed some string lengths to use size_t
        Changed type for 'frmblob' parameter for discover() and ha_discover() to get fewer casts
      sql/hash_filo.h:
        Removed some old types
        Changed all functions to use size_t
      sql/hostname.cc:
        Removed some old types
      sql/item.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Use strmake() instead of memdup() to create a null terminated string.
        Updated calls to new Field()
      sql/item.h:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
        Changed some buffers to be uchar* to avoid casts
      sql/item_cmpfunc.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/item_cmpfunc.h:
        Removed some old types
      sql/item_create.cc:
        Removed some old types
      sql/item_func.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
        Added test for failing alloc() in init_result_field()
        Remove old confusing comment
        Fixed compiler warning
      sql/item_func.h:
        Removed some old types
      sql/item_row.cc:
        Removed some old types
      sql/item_row.h:
        Removed some old types
      sql/item_strfunc.cc:
        Include zlib (needed becasue we call crc32)
        Removed some old types
      sql/item_strfunc.h:
        Removed some old types
        Changed some types to match new function prototypes
      sql/item_subselect.cc:
        Removed some old types
      sql/item_subselect.h:
        Removed some old types
      sql/item_sum.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/item_sum.h:
        Removed some old types
      sql/item_timefunc.cc:
        Removed some old types
        Changed some string lengths to use size_t
      sql/item_timefunc.h:
        Removed some old types
      sql/item_xmlfunc.cc:
        Changed some string lengths to use size_t
      sql/item_xmlfunc.h:
        Removed some old types
      sql/key.cc:
        Removed some old types
        Removed some not needed casts
      sql/lock.cc:
        Removed some old types
        Added some cast to my_multi_malloc() arguments for safety
      sql/log.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed some buffers to be uchar* to avoid casts
        Changed usage of pwrite() to not assume it holds the cursor position for the file
        Made usage of my_read() safer
      sql/log_event.cc:
        Removed some old types
        Added checking of return value of malloc() in pack_info()
        Changed some buffers to be uchar* to avoid casts
        Removed some 'const' to avoid casts
        Added missing casts for alloc() and sprintf()
        Added required casts
        Removed some not needed casts
        Added some cast to my_multi_malloc() arguments for safety
      sql/log_event.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/log_event_old.cc:
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/log_event_old.h:
        Changed some buffers to be uchar* to avoid casts
      sql/mf_iocache.cc:
        Removed some old types
      sql/my_decimal.cc:
        Changed memory area to use uchar*
      sql/my_decimal.h:
        Changed memory area to use uchar*
      sql/mysql_priv.h:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
        Changed some string lengths to use size_t
        Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid long overflow
        Changed some buffers to be uchar* to avoid casts
      sql/mysqld.cc:
        Removed some old types
      sql/net_serv.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed some buffers to be uchar* to avoid casts
        Ensure that vio_read()/vio_write() return values are stored in a size_t variable
        Removed some not needed casts
      sql/opt_range.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/opt_range.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/opt_sum.cc:
        Removed some old types
        Removed some not needed casts
      sql/parse_file.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed alloc_root + memcpy + set end 0 -> strmake_root()
      sql/parse_file.h:
        Removed some old types
      sql/partition_info.cc:
        Removed some old types
        Added missing casts for alloc()
        Changed some buffers to be uchar* to avoid casts
      sql/partition_info.h:
        Changed some buffers to be uchar* to avoid casts
      sql/protocol.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/protocol.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Changed some string lengths to use size_t
      sql/records.cc:
        Removed some old types
      sql/repl_failsafe.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Added required casts
      sql/rpl_filter.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Changed some string lengths to use size_t
      sql/rpl_filter.h:
        Changed some string lengths to use size_t
      sql/rpl_injector.h:
        Removed some old types
      sql/rpl_record.cc:
        Removed some old types
        Removed some not needed casts
        Changed some buffers to be uchar* to avoid casts
      sql/rpl_record.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/rpl_record_old.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/rpl_record_old.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid cast
      sql/rpl_rli.cc:
        Removed some old types
      sql/rpl_tblmap.cc:
        Removed some old types
      sql/rpl_tblmap.h:
        Removed some old types
      sql/rpl_utility.cc:
        Removed some old types
      sql/rpl_utility.h:
        Removed some old types
        Changed type of m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length
      sql/set_var.cc:
        Removed some old types
        Updated parameters to dirname_part()
      sql/set_var.h:
        Removed some old types
      sql/slave.cc:
        Removed some old types
        Changed some string lengths to use size_t
      sql/slave.h:
        Removed some old types
      sql/sp.cc:
        Removed some old types
        Added missing casts for printf()
      sql/sp.h:
        Removed some old types
        Updated hash-get-key function arguments
      sql/sp_cache.cc:
        Removed some old types
        Added missing casts for printf()
        Updated hash-get-key function arguments
      sql/sp_head.cc:
        Removed some old types
        Added missing casts for alloc() and printf()
        Added required casts
        Updated hash-get-key function arguments
      sql/sp_head.h:
        Removed some old types
      sql/sp_pcontext.cc:
        Removed some old types
      sql/sp_pcontext.h:
        Removed some old types
      sql/sql_acl.cc:
        Removed some old types
        Changed some string lengths to use size_t
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
        Added required casts
      sql/sql_analyse.cc:
        Changed some buffers to be uchar* to avoid casts
      sql/sql_analyse.h:
        Changed some buffers to be uchar* to avoid casts
      sql/sql_array.h:
        Removed some old types
      sql/sql_base.cc:
        Removed some old types
        Updated hash-get-key function arguments
      sql/sql_binlog.cc:
        Removed some old types
        Added missing casts for printf()
      sql/sql_cache.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Removed some not needed casts
        Changed some string lengths to use size_t
      sql/sql_cache.h:
        Removed some old types
        Removed reference to not existing function cache_key()
        Updated hash-get-key function arguments
      sql/sql_class.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Added missing casts for alloc()
        Updated hash-get-key function arguments
        Moved THD::max_row_length() to table.cc (as it's not depending on THD)
        Removed some not needed casts
      sql/sql_class.h:
        Removed some old types
        Changed malloc(), free() and related functions to use void *
        Removed some not needed casts
        Changed some string lengths to use size_t
        Moved max_row_length and max_row_length_blob() to table.cc, as they are not depending on THD
      sql/sql_connect.cc:
        Removed some old types
        Added required casts
      sql/sql_db.cc:
        Removed some old types
        Removed some not needed casts
        Added some cast to my_multi_malloc() arguments for safety
        Added missing casts for alloc()
      sql/sql_delete.cc:
        Removed some old types
      sql/sql_handler.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Added some cast to my_multi_malloc() arguments for safety
      sql/sql_help.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/sql_insert.cc:
        Removed some old types
        Added missing casts for alloc() and printf()
      sql/sql_lex.cc:
        Removed some old types
      sql/sql_lex.h:
        Removed some old types
        Removed some not needed casts
      sql/sql_list.h:
        Removed some old types
        Removed some not needed casts
      sql/sql_load.cc:
        Removed some old types
        Removed compiler warning
      sql/sql_manager.cc:
        Removed some old types
      sql/sql_map.cc:
        Removed some old types
      sql/sql_map.h:
        Removed some old types
      sql/sql_olap.cc:
        Removed some old types
      sql/sql_parse.cc:
        Removed some old types
        Trivial move of code lines to make things more readable
        Changed some string lengths to use size_t
        Added missing casts for alloc()
      sql/sql_partition.cc:
        Removed some old types
        Removed compiler warnings about not used functions
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/sql_partition.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/sql_plugin.cc:
        Removed some old types
        Added missing casts for alloc()
        Updated hash-get-key function arguments
      sql/sql_prepare.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Added missing casts for alloc() and printf()
      sql-common/client.c:
        Removed some old types
        Changed some memory areas to use uchar*
      sql-common/my_user.c:
        Changed some string lengths to use size_t
      sql-common/pack.c:
        Changed some buffers to be uchar* to avoid casts
      sql/sql_repl.cc:
        Added required casts
        Changed some buffers to be uchar* to avoid casts
        Changed some string lengths to use size_t
      sql/sql_select.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some old types
      sql/sql_select.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      sql/sql_servers.cc:
        Removed some old types
        Updated hash-get-key function arguments
      sql/sql_show.cc:
        Removed some old types
        Added missing casts for alloc()
        Removed some not needed casts
      sql/sql_string.cc:
        Removed some old types
        Added required casts
      sql/sql_table.cc:
        Removed some old types
        Removed compiler warning about not used variable
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
      sql/sql_test.cc:
        Removed some old types
      sql/sql_trigger.cc:
        Removed some old types
        Added missing casts for alloc()
      sql/sql_udf.cc:
        Removed some old types
        Updated hash-get-key function arguments
      sql/sql_union.cc:
        Removed some old types
      sql/sql_update.cc:
        Removed some old types
        Removed some not needed casts
      sql/sql_view.cc:
        Removed some old types
      sql/sql_yacc.yy:
        Removed some old types
        Changed some string lengths to use size_t
        Added missing casts for alloc()
      sql/stacktrace.c:
        Removed some old types
      sql/stacktrace.h:
        Removed some old types
      sql/structs.h:
        Removed some old types
      sql/table.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Changed some buffers to be uchar* to avoid casts
        Removed setting of LEX_STRING() arguments in declaration
        Added required casts
        More function comments
        Moved max_row_length() here from sql_class.cc/sql_class.h
      sql/table.h:
        Removed some old types
        Changed some string lengths to use size_t
      sql/thr_malloc.cc:
        Use void* as type for allocated memory area
        Changed all functions to use size_t
      sql/tzfile.h:
        Changed some buffers to be uchar* to avoid casts
      sql/tztime.cc:
        Changed some buffers to be uchar* to avoid casts
        Updated hash-get-key function arguments
        Added missing casts for alloc()
        Removed some not needed casts
      sql/uniques.cc:
        Removed some old types
        Removed some not needed casts
      sql/unireg.cc:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
        Removed some not needed casts
        Added missing casts for alloc()
      storage/archive/archive_reader.c:
        Removed some old types
      storage/archive/azio.c:
        Removed some old types
        Removed some not needed casts
      storage/archive/ha_archive.cc:
        Removed some old types
        Changed type for 'frmblob' in archive_discover() to match handler
        Updated hash-get-key function arguments
        Removed some not needed casts
      storage/archive/ha_archive.h:
        Removed some old types
      storage/blackhole/ha_blackhole.cc:
        Removed some old types
      storage/blackhole/ha_blackhole.h:
        Removed some old types
      storage/csv/ha_tina.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Changed some buffers to be uchar* to avoid casts
      storage/csv/ha_tina.h:
        Removed some old types
        Removed some not needed casts
      storage/csv/transparent_file.cc:
        Removed some old types
        Changed type of 'bytes_read' to be able to detect read errors
        Fixed indentation
      storage/csv/transparent_file.h:
        Removed some old types
      storage/example/ha_example.cc:
        Removed some old types
        Updated hash-get-key function arguments
      storage/example/ha_example.h:
        Removed some old types
      storage/federated/ha_federated.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Removed some not needed casts
      storage/federated/ha_federated.h:
        Removed some old types
      storage/heap/_check.c:
        Changed some buffers to be uchar* to avoid casts
      storage/heap/_rectest.c:
        Removed some old types
      storage/heap/ha_heap.cc:
        Removed some old types
      storage/heap/ha_heap.h:
        Removed some old types
      storage/heap/heapdef.h:
        Removed some old types
      storage/heap/hp_block.c:
        Removed some old types
        Changed some string lengths to use size_t
      storage/heap/hp_clear.c:
        Removed some old types
      storage/heap/hp_close.c:
        Removed some old types
      storage/heap/hp_create.c:
        Removed some old types
      storage/heap/hp_delete.c:
        Removed some old types
      storage/heap/hp_hash.c:
        Removed some old types
      storage/heap/hp_info.c:
        Removed some old types
      storage/heap/hp_open.c:
        Removed some old types
      storage/heap/hp_rfirst.c:
        Removed some old types
      storage/heap/hp_rkey.c:
        Removed some old types
      storage/heap/hp_rlast.c:
        Removed some old types
      storage/heap/hp_rnext.c:
        Removed some old types
      storage/heap/hp_rprev.c:
        Removed some old types
      storage/heap/hp_rrnd.c:
        Removed some old types
      storage/heap/hp_rsame.c:
        Removed some old types
      storage/heap/hp_scan.c:
        Removed some old types
      storage/heap/hp_test1.c:
        Removed some old types
      storage/heap/hp_test2.c:
        Removed some old types
      storage/heap/hp_update.c:
        Removed some old types
      storage/heap/hp_write.c:
        Removed some old types
        Changed some string lengths to use size_t
      storage/innobase/handler/ha_innodb.cc:
        Removed some old types
        Updated hash-get-key function arguments
        Added missing casts for alloc() and printf()
        Removed some not needed casts
      storage/innobase/handler/ha_innodb.h:
        Removed some old types
      storage/myisam/ft_boolean_search.c:
        Removed some old types
      storage/myisam/ft_nlq_search.c:
        Removed some old types
      storage/myisam/ft_parser.c:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      storage/myisam/ft_static.c:
        Removed some old types
      storage/myisam/ft_stopwords.c:
        Removed some old types
      storage/myisam/ft_update.c:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      storage/myisam/ftdefs.h:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      storage/myisam/fulltext.h:
        Removed some old types
      storage/myisam/ha_myisam.cc:
        Removed some old types
      storage/myisam/ha_myisam.h:
        Removed some old types
      storage/myisam/mi_cache.c:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      storage/myisam/mi_check.c:
        Removed some old types
      storage/myisam/mi_checksum.c:
        Removed some old types
      storage/myisam/mi_close.c:
        Removed some old types
      storage/myisam/mi_create.c:
        Removed some old types
      storage/myisam/mi_delete.c:
        Removed some old types
      storage/myisam/mi_delete_all.c:
        Removed some old types
      storage/myisam/mi_dynrec.c:
        Removed some old types
      storage/myisam/mi_extra.c:
        Removed some old types
      storage/myisam/mi_key.c:
        Removed some old types
      storage/myisam/mi_locking.c:
        Removed some old types
      storage/myisam/mi_log.c:
        Removed some old types
      storage/myisam/mi_open.c:
        Removed some old types
        Removed some not needed casts
        Check argument of my_write()/my_pwrite() in functions returning int
        Added casting of string lengths to size_t
      storage/myisam/mi_packrec.c:
        Removed some old types
        Changed some buffers to be uchar* to avoid casts
      storage/myisam/mi_page.c:
        Removed some old types
      storage/myisam/mi_preload.c:
        Removed some old types
      storage/myisam/mi_range.c:
        Removed some old types
      storage/myisam/mi_rfirst.c:
        Removed some old types
      storage/myisam/mi_rkey.c:
        Removed some old types
      storage/myisam/mi_rlast.c:
        Removed some old types
      storage/myisam/mi_rnext.c:
        Removed some old types
      storage/myisam/mi_rnext_same.c:
        Removed some old types
      storage/myisam/mi_rprev.c:
        Removed some old types
      storage/myisam/mi_rrnd.c:
        Removed some old types
      storage/myisam/mi_rsame.c:
        Removed some old types
      storage/myisam/mi_rsamepos.c:
        Removed some old types
      storage/myisam/mi_scan.c:
        Removed some old types
      storage/myisam/mi_search.c:
        Removed some old types
      storage/myisam/mi_static.c:
        Removed some old types
      storage/myisam/mi_statrec.c:
        Removed some old types
      storage/myisam/mi_test1.c:
        Removed some old types
      storage/myisam/mi_test2.c:
        Removed some old types
      storage/myisam/mi_test3.c:
        Removed some old types
      storage/myisam/mi_unique.c:
        Removed some old types
      storage/myisam/mi_update.c:
        Removed some old types
      storage/myisam/mi_write.c:
        Removed some old types
      storage/myisam/myisam_ftdump.c:
        Removed some old types
      storage/myisam/myisamchk.c:
        Removed some old types
      storage/myisam/myisamdef.h:
        Removed some old types
      storage/myisam/myisamlog.c:
        Removed some old types
        Indentation fix
      storage/myisam/myisampack.c:
        Removed some old types
      storage/myisam/rt_index.c:
        Removed some old types
      storage/myisam/rt_split.c:
        Removed some old types
      storage/myisam/sort.c:
        Removed some old types
      storage/myisam/sp_defs.h:
        Removed some old types
      storage/myisam/sp_key.c:
        Removed some old types
      storage/myisammrg/ha_myisammrg.cc:
        Removed some old types
      storage/myisammrg/ha_myisammrg.h:
        Removed some old types
      storage/myisammrg/myrg_close.c:
        Removed some old types
      storage/myisammrg/myrg_def.h:
        Removed some old types
      storage/myisammrg/myrg_delete.c:
        Removed some old types
      storage/myisammrg/myrg_open.c:
        Removed some old types
        Updated parameters to dirname_part()
      storage/myisammrg/myrg_queue.c:
        Removed some old types
      storage/myisammrg/myrg_rfirst.c:
        Removed some old types
      storage/myisammrg/myrg_rkey.c:
        Removed some old types
      storage/myisammrg/myrg_rlast.c:
        Removed some old types
      storage/myisammrg/myrg_rnext.c:
        Removed some old types
      storage/myisammrg/myrg_rnext_same.c:
        Removed some old types
      storage/myisammrg/myrg_rprev.c:
        Removed some old types
      storage/myisammrg/myrg_rrnd.c:
        Removed some old types
      storage/myisammrg/myrg_rsame.c:
        Removed some old types
      storage/myisammrg/myrg_update.c:
        Removed some old types
      storage/myisammrg/myrg_write.c:
        Removed some old types
      storage/ndb/include/util/ndb_opts.h:
        Removed some old types
      storage/ndb/src/cw/cpcd/main.cpp:
        Removed some old types
      storage/ndb/src/kernel/vm/Configuration.cpp:
        Removed some old types
      storage/ndb/src/mgmclient/main.cpp:
        Removed some old types
      storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
        Removed some old types
        Removed old disabled code
      storage/ndb/src/mgmsrv/main.cpp:
        Removed some old types
      storage/ndb/src/ndbapi/NdbBlob.cpp:
        Removed some old types
      storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
        Removed not used variable
      storage/ndb/src/ndbapi/NdbOperationInt.cpp:
        Added required casts
      storage/ndb/src/ndbapi/NdbScanOperation.cpp:
        Added required casts
      storage/ndb/tools/delete_all.cpp:
        Removed some old types
      storage/ndb/tools/desc.cpp:
        Removed some old types
      storage/ndb/tools/drop_index.cpp:
        Removed some old types
      storage/ndb/tools/drop_tab.cpp:
        Removed some old types
      storage/ndb/tools/listTables.cpp:
        Removed some old types
      storage/ndb/tools/ndb_config.cpp:
        Removed some old types
      storage/ndb/tools/restore/consumer_restore.cpp:
        Changed some buffers to be uchar* to avoid casts with new defintion of packfrm()
      storage/ndb/tools/restore/restore_main.cpp:
        Removed some old types
      storage/ndb/tools/select_all.cpp:
        Removed some old types
      storage/ndb/tools/select_count.cpp:
        Removed some old types
      storage/ndb/tools/waiter.cpp:
        Removed some old types
      strings/bchange.c:
        Changed function to use uchar * and size_t
      strings/bcmp.c:
        Changed function to use uchar * and size_t
      strings/bmove512.c:
        Changed function to use uchar * and size_t
      strings/bmove_upp.c:
        Changed function to use uchar * and size_t
      strings/ctype-big5.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-bin.c:
        Changed functions to use size_t
      strings/ctype-cp932.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-czech.c:
        Fixed indentation
        Changed functions to use size_t
      strings/ctype-euc_kr.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-eucjpms.c:
        Changed functions to use size_t
        Changed character length functions to return uint
        unsigned char -> uchar
      strings/ctype-gb2312.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-gbk.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-latin1.c:
        Changed functions to use size_t
        Changed character length functions to return uint
        unsigned char -> uchar
      strings/ctype-mb.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-simple.c:
        Changed functions to use size_t
        Simpler loops for caseup/casedown
        unsigned int -> uint
        unsigned char -> uchar
      strings/ctype-sjis.c:
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-tis620.c:
        Changed functions to use size_t
        Changed character length functions to return uint
        unsigned char -> uchar
      strings/ctype-uca.c:
        Changed functions to use size_t
        unsigned char -> uchar
      strings/ctype-ucs2.c:
        Moved inclusion of stdarg.h to other includes
        usigned char -> uchar
        Changed functions to use size_t
        Changed character length functions to return uint
      strings/ctype-ujis.c:
        Changed functions to use size_t
        Changed character length functions to return uint
        unsigned char -> uchar
      strings/ctype-utf8.c:
        Changed functions to use size_t
        unsigned char -> uchar
        Indentation fixes
      strings/ctype-win1250ch.c:
        Indentation fixes
        Changed functions to use size_t
      strings/ctype.c:
        Changed functions to use size_t
      strings/decimal.c:
        Changed type for memory argument to uchar *
      strings/do_ctype.c:
        Indentation fixes
      strings/my_strtoll10.c:
        unsigned char -> uchar
      strings/my_vsnprintf.c:
        Changed functions to use size_t
      strings/r_strinstr.c:
        Removed some old types
        Changed functions to use size_t
      strings/str_test.c:
        Removed some old types
      strings/strappend.c:
        Changed functions to use size_t
      strings/strcont.c:
        Removed some old types
      strings/strfill.c:
        Removed some old types
      strings/strinstr.c:
        Changed functions to use size_t
      strings/strlen.c:
        Changed functions to use size_t
      strings/strmake.c:
        Changed functions to use size_t
      strings/strnlen.c:
        Changed functions to use size_t
      strings/strnmov.c:
        Changed functions to use size_t
      strings/strto.c:
        unsigned char -> uchar
      strings/strtod.c:
        Changed functions to use size_t
      strings/strxnmov.c:
        Changed functions to use size_t
      strings/xml.c:
        Changed functions to use size_t
        Indentation fixes
      tests/mysql_client_test.c:
        Removed some old types
      tests/thread_test.c:
        Removed some old types
      vio/test-ssl.c:
        Removed some old types
      vio/test-sslclient.c:
        Removed some old types
      vio/test-sslserver.c:
        Removed some old types
      vio/vio.c:
        Removed some old types
      vio/vio_priv.h:
        Removed some old types
        Changed vio_read()/vio_write() to work with size_t
      vio/viosocket.c:
        Changed vio_read()/vio_write() to work with size_t
        Indentation fixes
      vio/viossl.c:
        Changed vio_read()/vio_write() to work with size_t
        Indentation fixes
      vio/viosslfactories.c:
        Removed some old types
      vio/viotest-ssl.c:
        Removed some old types
      win/README:
        More explanations
      f252f924
  11. 26 Apr, 2007 1 commit
  12. 24 Apr, 2007 1 commit
    • unknown's avatar
      Bug#25411 (trigger code truncated), PART I · 3eff7d4d
      unknown authored
      The issue found with bug 25411 is due to the function skip_rear_comments()
      which damages the source code while implementing a work around.
      The root cause of the problem is in the lexical analyser, which does not
      process special comments properly.
      For special comments like :
      [1] aaa /*!50000 bbb */ ccc
      since 5.0 is a version older that the current code, the parser is in lining
      the content of the special comment, so that the query to process is
      [2] aaa bbb ccc
      However, the text of the query captured when processing a stored procedure,
      stored function or trigger (or event in 5.1), can be after rebuilding it:
      [3] aaa bbb */ ccc
      which is wrong.
      
      To fix bug 25411 properly, the lexical analyser needs to return [2] when
      in lining special comments.
      In order to implement this, some preliminary cleanup is required in the code,
      which is implemented by this patch.
      
      Before this change, the structure named LEX (or st_lex) contains attributes
      that belong to lexical analysis, as well as attributes that represents the
      abstract syntax tree (AST) of a statement.
      Creating a new LEX structure for each statements (which makes sense for the
      AST part) also re-initialized the lexical analysis phase each time, which
      is conceptually wrong.
      
      With this patch, the previous st_lex structure has been split in two:
      - st_lex represents the Abstract Syntax Tree for a statement. The name "lex"
      has not been changed to avoid a bigger impact in the code base.
      - class lex_input_stream represents the internal state of the lexical
        analyser, which by definition should *not* be reinitialized when parsing
        multiple statements from the same input stream.
      
      This change is a pre-requisite for bug 25411, since the implementation of
      lex_input_stream will later improve to deal properly with special comments,
      and this processing can not be done with the current implementation of
      sp_head::reset_lex and sp_head::restore_lex, which interfere with the lexer.
      
      This change set alone does not fix bug 25411.
      
      
      sql/item_func.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/log_event.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/mysql_priv.h:
        Refactoring, separate lex_input_stream from st_lex.
      sql/slave.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sp.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sp_head.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sp_head.h:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_class.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_class.h:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_lex.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_lex.h:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_parse.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_prepare.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_trigger.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_view.cc:
        Refactoring, separate lex_input_stream from st_lex.
      sql/sql_yacc.yy:
        Refactoring, separate lex_input_stream from st_lex.
      3eff7d4d
  13. 23 Apr, 2007 1 commit
  14. 13 Apr, 2007 2 commits
    • unknown's avatar
      Fixes to make it compile when using Sun CC and restoring some changes · a8bcc697
      unknown authored
      done in previous patches.
      
      There is an error in the Sun CC compiler that treats parameters that
      differ in only qualifier as different, even though this is not
      allowed by the standard (ISO/IEC 14882:2003, Section 13.1).
      
      
      sql/log_event.cc:
        Removing const qualifier since it causes linker error.
      sql/log_event.h:
        Restoring time_t instead of my_time_t since it causes warnings
        elsewhere.  Renaming parameters to functions since they hide
        member variable (which causes warnings on Sun CC).
      sql/rpl_record.cc:
        Removing const qualifier since it causes linker error.
      sql/rpl_rli.cc:
        Restoring time_t instead of my_time_t since it causes warnings
        elsewhere. Removing const qualifier since it causes linker error.
      sql/rpl_rli.h:
        Restoring time_t instead of my_time_t since it causes warnings
        elsewhere. Removing const qualifier since it causes linker error.
      a8bcc697
    • unknown's avatar
      WL#2735: Refactor replication · 0d3f926a
      unknown authored
      Factoring out pack_row() and unpack_row() into new files
      rpl_record.{cc,h}.
      
      
      libmysqld/Makefile.am:
        Adding file rpl_record.cc
      sql/CMakeLists.txt:
        Adding file rpl_record.cc
      sql/Makefile.am:
        Adding file rpl_record.cc and rpl_record.h
      sql/log_event.cc:
        Moving implementation of unpack_row() into "rpl_record.cc".
        Adding inclusion of header file "rpl_record.h".
      sql/log_event_old.cc:
        Signature of do_prepare_row() changed.
      sql/log_event_old.h:
        Adding copyright.
      sql/rpl_record_old.cc:
        Signature of do_prepare_row() changed.
      sql/rpl_record_old.h:
        Adding copyright.
        Signature of do_prepare_row() changed.
      sql/sql_class.cc:
        Moving implementation THD::pack_row() into "rpl_record.cc" and rewriting
        it to be a global function.
        Adding inclusion of header file "rpl_record.h".
      sql/sql_class.h:
        Removing pack_row() as THD member function.
      sql/rpl_record.cc:
        New BitKeeper file ``sql/rpl_record.cc''
      sql/rpl_record.h:
        New BitKeeper file ``sql/rpl_record.h''
      0d3f926a
  15. 12 Apr, 2007 2 commits
    • unknown's avatar
      BUG#27779 (Slave cannot read old rows log events): · 5c35b417
      unknown authored
      Taking code from before BUG#22583 and incorporating as events to be able
      to read old events. Also incorporating old pack and unpack functions
      into patch.
      
      
      client/Makefile.am:
        Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
      client/mysqlbinlog.cc:
        Adding log_event_old.cc.
      libmysqld/Makefile.am:
        Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
      sql/CMakeLists.txt:
        Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
      sql/Makefile.am:
        Adding files log_event_old.{h,cc} and rpl_record_old.{h,cc}
      sql/log_event.cc:
        Adding code to read pre-GA rows events.
      sql/log_event.h:
        Refactoring to support inheritance and including "old" events definitions.
      sql/log_event_old.cc:
        New BitKeeper file ``sql/log_event_old.cc''
      sql/log_event_old.h:
        New BitKeeper file ``sql/log_event_old.h''
      sql/rpl_record_old.cc:
        New BitKeeper file ``sql/rpl_record_old.cc''
      sql/rpl_record_old.h:
        New BitKeeper file ``sql/rpl_record_old.h''
      5c35b417
    • unknown's avatar
      BUG#25688 (RBR: circular replication may cause STMT_END_F flags to be · 6ed9fc6b
      unknown authored
      skipped):
      
      By moving statement end actions from Rows_log_event::do_apply_event() to
      Rows_log_event::do_update_pos() they will always be executed, even if
      Rows_log_event::do_apply_event() is skipped because the event originated
      at the same server. This because Rows_log_event::do_update_pos() is always
      executed (unless Rows_log_event::do_apply_event() failed with an error,
      in which case the slave stops with an error anyway). 
      
      Adding test case.
      
      Fixing logic to detect if inside a group. If a rotate event occured
      when an initial prefix of events for a statement, but for which the
      table did contain a key, last_event_start_time is set to zero, causing
      rotate to end the group but without unlocking any tables. This left a
      lock hanging around, which subsequently triggered an assertion when a
      second attempt was made to lock the same sequence of tables.
      
      In order to solve the above problem, a new flag was added to the relay
      log info structure that is used to indicate that the replication thread
      is currently executing a statement. Using this flag, the replication
      thread is in a group if it is either in a statement or inside a trans-
      action.
      
      The patch also eliminates some gratuitous header file inclusions that
      were not needed (and caused compile errors) and replaced them with
      forward definitions.
      
      
      sql/item_func.cc:
        Including definition of MASTER_INFO.
      sql/log.cc:
        Including definition of RELAY_LOG_INFO since it is used in the file.
      sql/log_event.cc:
        Moving statement end actions from Rows_log_event::do_apply_event() to
        Rows_log_event::do_update_pos().
        Factoring out code to update group positions and event positions into
        relay log info structure.
        ---
        Adding debugging printouts.
        Fixing logic to detect if inside a group.
      sql/log_event.h:
        Adding Rows_log_event::do_update_pos().
      sql/mysqld.cc:
        Including definition of MASTER_INFO.
      sql/repl_failsafe.cc:
        Including definition of MASTER_INFO.
      sql/rpl_mi.h:
        Including definition of RELAY_LOG_INFO since it is used in the file.
      sql/rpl_rli.cc:
        Adding member function stmt_done() to do after-statement updates of the
        relay log info structure.
      sql/rpl_rli.h:
        Adding member function stmt_done() to do after-statement updates of the
        relay log info structure.
      sql/set_var.cc:
        Including definition of MASTER_INFO.
      sql/slave.cc:
        Adding debuging printouts.
      sql/slave.h:
        Removing inclusion definitions of MASTER_INFO and RELAY_LOG_INFO and
        replacing them with forward declarations since the classes are not
        used in the file. The gratuitous inclusion lead to compile errors in
        the two classes above in files that used neither.
      sql/sql_binlog.cc:
        Including definition of RELAY_LOG_INFO since it is used in the file.
      sql/sql_class.cc:
        Including definition of RELAY_LOG_INFO since it is used in the file.
      sql/sql_class.h:
        Removing inclusion definitions of RELAY_LOG_INFO and replacing it
        with forward declaration since the class is not used in the file.
        The gratuitous inclusion lead to compile errors in the class above
        in files didn't use the class.
      sql/sql_insert.cc:
        Including definition of MASTER_INFO.
      sql/sql_repl.cc:
        Including definition of MASTER_INFO.
      mysql-test/r/rpl_ndb_circular_simplex.result:
        New BitKeeper file ``mysql-test/r/rpl_ndb_circular_simplex.result''
      mysql-test/t/rpl_ndb_circular_simplex.test:
        New BitKeeper file ``mysql-test/t/rpl_ndb_circular_simplex.test''
      6ed9fc6b
  16. 11 Apr, 2007 1 commit
    • unknown's avatar
      BUG#27583 (slave sql fails to read from iocache when slave got · 7c086fc7
      unknown authored
      stopped at pos==4):
      
      Submitting patch on behalf of Andrei, who discovered the problem
      and provided the patch.
      
      An update of the group relay log coordinates when rotating forgot to
      update the group relay log name and only updated the group relay log
      position (and group master log name and position).
      
      This patch adds code to update the group relay log *name* as well as
      the position 
      
      
      sql/log_event.cc:
        Setting group relay log name as well when rotating, not just the group
        relay log position.
      7c086fc7
  17. 30 Mar, 2007 2 commits
    • unknown's avatar
      WL#3464 (Add replication event to denote gap in replication): · ccc65d8e
      unknown authored
      Fixing automerge problem and updating comments referring to exec_event().
      
      
      mysql-test/r/rpl_incident.result:
        Result change
      sql/log_event.cc:
        Renaming exec_event() to do_apply_event().
      sql/log_event.h:
        Renaming exec_event() to do_apply_event().
      sql/rpl_rli.cc:
        Fixing comments referring to exec_event(), which does not exist any more.
      sql/sql_class.h:
        Fixing comments referring to exec_event(), which does not exist any more.
      ccc65d8e
    • unknown's avatar
      - Fixing binary log positions · 5a7b2fc7
      unknown authored
      - Eliminating some compiler warnings
      
      
      mysql-test/extra/binlog_tests/blackhole.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/extra/binlog_tests/drop_temp_table.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/extra/binlog_tests/insert_select-binlog.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/extra/rpl_tests/rpl_log.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
        Using include file for SHOW BINLOG EVENTS.
      mysql-test/include/show_binlog_events.inc:
        Fixing regex replace to handle XIDs as well.
      mysql-test/r/binlog_row_binlog.result:
        Result change
      mysql-test/r/binlog_row_blackhole.result:
        Result change
      mysql-test/r/binlog_row_ctype_ucs.result:
        Result change
      mysql-test/r/binlog_row_drop_tmp_tbl.result:
        Result change
      mysql-test/r/binlog_row_insert_select.result:
        Result change
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        Result change
      mysql-test/r/binlog_stm_binlog.result:
        Result change
      mysql-test/r/binlog_stm_blackhole.result:
        Result change
      mysql-test/r/binlog_stm_drop_tmp_tbl.result:
        Result change
      mysql-test/r/binlog_stm_insert_select.result:
        Result change
      mysql-test/r/binlog_stm_mix_innodb_myisam.result:
        Result change
      mysql-test/r/ctype_cp932_binlog_row.result:
        Result change
      mysql-test/r/rpl_ndb_charset.result:
        Result change
      mysql-test/r/rpl_ndb_log.result:
        Result change
      mysql-test/r/rpl_ndb_multi.result:
        Result change
      mysql-test/r/rpl_row_basic_11bugs.result:
        Result change
      mysql-test/r/rpl_row_charset.result:
        Result change
      mysql-test/r/rpl_row_create_table.result:
        Result change
      mysql-test/r/rpl_row_delayed_ins.result:
        Result change
      mysql-test/r/rpl_row_drop.result:
        Result change
      mysql-test/r/rpl_row_flsh_tbls.result:
        Result change
      mysql-test/r/rpl_row_inexist_tbl.result:
        Result change
      mysql-test/r/rpl_row_log.result:
        Result change
      mysql-test/r/rpl_row_log_innodb.result:
        Result change
      mysql-test/r/rpl_row_reset_slave.result:
        Result change
      mysql-test/r/rpl_row_until.result:
        Result change
      mysql-test/r/rpl_stm_log.result:
        Result change
      mysql-test/r/rpl_truncate_2myisam.result:
        Result change
      mysql-test/r/rpl_truncate_3innodb.result:
        Result change
      mysql-test/r/rpl_udf.result:
        Result change
      mysql-test/t/binlog_row_mix_innodb_myisam.test:
        Fixing binary log position
      mysql-test/t/binlog_stm_mix_innodb_myisam.test:
        Fixing binary log position.
      sql/log_event.cc:
        Eliminating compiler warnings.
      5a7b2fc7
  18. 29 Mar, 2007 1 commit
    • unknown's avatar
      WL#3464: Add replication event to denote gap in replication · adaf162b
      unknown authored
      Adding an event that can be used to denote that an incident occured
      on the master. The event can be used to denote a gap in the replication
      stream, but can also be used to denote other incidents.
      
      In addition, the injector interface is extended with functions to
      generate an incident event. The function will also rotate the binary
      log after generating an incident event to get a fresh binary log.
      
      
      client/Makefile.am:
        Adding file rpl_constants.h with constants for replication.
      mysql-test/extra/binlog_tests/binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
        Binlog position change
      mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_log.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_multi_query.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_row_charset.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_row_sp002.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_row_sp003.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_stm_charset.test:
        Binlog position change
      mysql-test/include/show_binlog_events.inc:
        Binlog position change
      mysql-test/r/binlog_row_binlog.result:
        Result change
      mysql-test/r/binlog_row_ctype_ucs.result:
        Result change
      mysql-test/r/binlog_row_insert_select.result:
        Result change
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        Result change
      mysql-test/r/binlog_stm_binlog.result:
        Result change
      mysql-test/r/binlog_stm_ctype_ucs.result:
        Result change
      mysql-test/r/binlog_stm_insert_select.result:
        Result change
      mysql-test/r/binlog_stm_mix_innodb_myisam.result:
        Result change
      mysql-test/r/ctype_cp932_binlog_row.result:
        Result change
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Result change
      mysql-test/r/flush_block_commit_notembedded.result:
        Result change
      mysql-test/r/rpl_000015.result:
        Result change
      mysql-test/r/rpl_change_master.result:
        Result change
      mysql-test/r/rpl_deadlock_innodb.result:
        Result change
      mysql-test/r/rpl_flushlog_loop.result:
        Result change
      mysql-test/r/rpl_loaddata.result:
        Result change
      mysql-test/r/rpl_loaddata_s.result:
        Result change
      mysql-test/r/rpl_log_pos.result:
        Result change
      mysql-test/r/rpl_ndb_charset.result:
        Result change
      mysql-test/r/rpl_ndb_log.result:
        Result change
      mysql-test/r/rpl_ndb_multi.result:
        Result change
      mysql-test/r/rpl_rbr_to_sbr.result:
        Result change
      mysql-test/r/rpl_rotate_logs.result:
        Result change
      mysql-test/r/rpl_row_basic_11bugs.result:
        Result change
      mysql-test/r/rpl_row_charset.result:
        Result change
      mysql-test/r/rpl_row_create_table.result:
        Result change
      mysql-test/r/rpl_row_delayed_ins.result:
        Result change
      mysql-test/r/rpl_row_drop.result:
        Result change
      mysql-test/r/rpl_row_flsh_tbls.result:
        Result change
      mysql-test/r/rpl_row_inexist_tbl.result:
        Result change
      mysql-test/r/rpl_row_log.result:
        Result change
      mysql-test/r/rpl_row_log_innodb.result:
        Result change
      mysql-test/r/rpl_row_max_relay_size.result:
        Result change
      mysql-test/r/rpl_row_reset_slave.result:
        Result change
      mysql-test/r/rpl_row_until.result:
        Result change
      mysql-test/r/rpl_server_id1.result:
        Result change
      mysql-test/r/rpl_server_id2.result:
        Result change
      mysql-test/r/rpl_sp.result:
        Result change
      mysql-test/r/rpl_stm_charset.result:
        Result change
      mysql-test/r/rpl_stm_flsh_tbls.result:
        Result change
      mysql-test/r/rpl_stm_log.result:
        Result change
      mysql-test/r/rpl_stm_max_relay_size.result:
        Result change
      mysql-test/r/rpl_stm_multi_query.result:
        Result change
      mysql-test/r/rpl_stm_reset_slave.result:
        Result change
      mysql-test/r/rpl_stm_until.result:
        Result change
      mysql-test/r/rpl_switch_stm_row_mixed.result:
        Result change
      mysql-test/r/rpl_truncate_2myisam.result:
        Result change
      mysql-test/r/rpl_truncate_3innodb.result:
        Result change
      mysql-test/r/rpl_truncate_7ndb.result:
        Result change
      mysql-test/r/user_var-binlog.result:
        Result change
      mysql-test/t/binlog_row_mix_innodb_myisam.test:
        Binlog position change
      mysql-test/t/binlog_stm_mix_innodb_myisam.test:
        Binlog position change
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Binlog position change
      mysql-test/t/mysqlbinlog.test:
        Binlog position change
      mysql-test/t/mysqlbinlog2.test:
        Binlog position change
      mysql-test/t/rpl_loaddata_s.test:
        Binlog position change
      mysql-test/t/rpl_log_pos.test:
        Binlog position change
      mysql-test/t/rpl_row_basic_11bugs.test:
        Binlog position change
      mysql-test/t/rpl_row_create_table.test:
        Binlog position change
      mysql-test/t/rpl_row_flsh_tbls.test:
        Binlog position change
      mysql-test/t/rpl_row_mysqlbinlog.test:
        Binlog position change
      mysql-test/t/rpl_sp.test:
        Binlog position change
      mysql-test/t/rpl_stm_flsh_tbls.test:
        Binlog position change
      mysql-test/t/rpl_switch_stm_row_mixed.test:
        Binlog position change
      mysql-test/t/user_var-binlog.test:
        Binlog position change
      sql/Makefile.am:
        Adding file rpl_constants.h with constants for replication.
      sql/log_event.cc:
        Changing prototype for read_str() to be const-correct and changing code to match that.
        Adding incident log event.
      sql/log_event.h:
        Adding incident log event.
      sql/rpl_injector.cc:
        Adding support for generating incidents into the binary log.
      sql/rpl_injector.h:
        Adding support for generating incidents into the binary log.
      sql/share/errmsg.txt:
        Adding new error message to indicate an incident.
      sql/sql_parse.cc:
        Adding code to generate an incident log event just before executing a REPLACE
        if the variable "incident_database_resync_on_replace" is set.
      mysql-test/r/rpl_incident.result:
        New BitKeeper file ``mysql-test/r/rpl_incident.result''
      mysql-test/t/rpl_incident.test:
        New BitKeeper file ``mysql-test/t/rpl_incident.test''
      sql/rpl_constants.h:
        New BitKeeper file ``sql/rpl_constants.h''
      adaf162b
  19. 28 Mar, 2007 1 commit
    • unknown's avatar
      Eliminating some warnings. · 8de46d0d
      unknown authored
      sql/field.h:
        Using my_ptrdiff_t for offset instead of uint.
      sql/log_event.cc:
        Removing debug code that generated warnings on Windows build.
      8de46d0d
  20. 27 Mar, 2007 3 commits
    • unknown's avatar
      0e9a844f
    • unknown's avatar
      Eliminating some compiler warnings. · 04c0f3cb
      unknown authored
      sql/log_event.cc:
        Adding non-reachable return statement at end of function to keep compiler
        happy.
      sql/slave.cc:
        In order to keep compiler happy: using variable only used in debug code
        instead of recalling virtual function.
      04c0f3cb
    • unknown's avatar
      BUG#27441 (There is no COLS bitmap for the after image of an update · 32b9ab07
      unknown authored
      rows event):
      
      Adding a after image COLS bitmap to Update_rows_log_event (for telling
      what columns that are present in the after image of each row update).
      
      Also fixing case where Rows_log_event length was not correctly computed
      (happened when the number of columns in a table was more than 251). 
      
      
      mysql-test/r/rpl_row_inexist_tbl.result:
        Result change.
      sql/log_event.cc:
        Extending Rows_log_event with two new fields: m_bitbuf_ai and m_cols_ai.  These fields are only used for the Update_rows_log_event.
        Adding implementation of Update_rows_log_event destructor.
        Using new after image fields inside the Update_rows_log_event.
        Factoring out common constructor bodies into Update_rows_log_event::init()
        function.
        
        Fixing case where length of Rows_log_event was not correctly computed (for
        tables with more than 251 columns).
      sql/log_event.h:
        Moving implementation of Rows_log_event::get_data_size() into .cc file.
        Adding Update_rows_log_event constructor accepting both before image
        and after image COLS vector.
        Adding Update_rows_log_vector destructor.
        Adding fields m_bitbuf_ai and m_cols_ai to Rows_log_event.
        Fixing is_valid() to look at m_cols_ai as well.
      32b9ab07
  21. 23 Mar, 2007 1 commit
  22. 22 Mar, 2007 4 commits
    • unknown's avatar
      Fixed compiler warnings. · 7eb3881b
      unknown authored
      mysys/default.c:
        Fixed bug.
      ndb/src/mgmclient/CommandInterpreter.cpp:
        Added parenthesis around the expression.
      sql/mysqld.cc:
        Fixed compiler warnings.
        
        Added a missing component in options struct (bug).
      sql-common/my_time.c:
        Removed garbage.
      sql/sql_table.cc:
        A possible use of a variable uninitialized.
      support-files/compiler_warnings.supp:
        BitKeeper file /home/my/bk/mysql-4.1-main/support-files/compiler_warnings.supp
      7eb3881b
    • unknown's avatar
      Fix for BUG#26194 "mysqlbinlog --base64-output produces invalid SQL"; · 8ceea7c4
      unknown authored
      when it was printing a Query event, it produced invalid SQL (missing
      the BINLOG keyword, so the SQL started with the base64 string, which
      is incorrect).
      Note: no testcase; I have a .test which shows that the bugfix works,
      but it triggers BUG#26361 and so gives Valgrind warnings. I'm sending
      this test to the fixer of BUG#26361 for her/him to push when she/he
      fixes BUG#26361.
      
      
      client/mysqlbinlog.cc:
        writing the header (a line started with "#", i.e. a comment) and the
        body (the real operation) of an event to the same IO_CACHE
        (result_cache) confused the logic of Log_event::print_base64()
        (which is that if the cache is not empty then the BINLOG keyword
        should not be printed); it caused the BINLOG keyword to miss hence
        a syntactically wrong output of "mysqlbinlog --base64-output"
        for Query events.
        So we just use the two IO_CACHE already available in "print_event_info".
      sql/log_event.cc:
        using the new small inline function.
        Note that the replication code should one day be fixed to trap all
        errors (like disk write errors).
      sql/log_event.h:
        small inline function to group two operations: copying an IO_CACHE
        to a FILE, and reinitializing this IO_CACHE for being filled again.
      sql/records.cc:
        fix after merge
      8ceea7c4
    • unknown's avatar
      BUG#23171: Illegal group log position · 05861963
      unknown authored
      Post-merge fixes.
      
      
      mysql-test/r/rpl_ndb_basic.result:
        Result change.
      sql/log_event.cc:
        Adding const-cast.
      05861963
    • unknown's avatar
      BUG#23171: Illegal group log position · 8666675f
      unknown authored
      Tail fixes after re-applying patches to older version of clone.
      
      
      sql/log_event.cc:
        Name change of shall_skip() -> do_shall_skip()
        Introducing public shall_skip().
        Name change of skip reason enumeration constants.
        Removing extreneous argument to slave_print_msg() causing compiler warning.
      sql/log_event.h:
        Adding enumeration for skip reason.
        Factoring out exec_event() into exec_relay_log_event().
        Making public interface to event execution primitives.
        Adding documentation.
        Making some (internal) functions const-correct.
      sql/rpl_rli.cc:
        replicate_same_server_id is now a member variable of RLI.
      sql/rpl_rli.h:
        replicate_same_server_id is now a member variable of RLI.
      sql/slave.cc:
        Using RLI-specific member variable replicate_same_server_id instead of
        global instance.
        Moving comments about skipping logic to exec_relay_log_event().
        Moving event execution logic to exec_relay_log_event().
      sql/sql_binlog.cc:
        Using apply_event() directly and adding comment with explenation.
      8666675f
  23. 20 Mar, 2007 1 commit
    • unknown's avatar
      BUG#22583: RBR between MyISAM and non-MyISAM tables containing a BIT · a0e0166b
      unknown authored
                 field does not work
      
      Fix to prevent MyISAM from reading data from NULL BLOB.
      Fix to make record comparison independent of values of unused bits in
      record.
      Updating binlog positions in tests.
      
      
      mysql-test/extra/rpl_tests/rpl_multi_query.test:
        Binlog position change
      mysql-test/extra/rpl_tests/rpl_stm_charset.test:
        Binlog position change
      mysql-test/include/show_binlog_events.inc:
        Binlog position change
      mysql-test/r/binlog_stm_binlog.result:
        Result change
      mysql-test/r/binlog_stm_ctype_ucs.result:
        Result change
      mysql-test/r/binlog_stm_insert_select.result:
        Result change
      mysql-test/r/binlog_stm_mix_innodb_myisam.result:
        Result change
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Result change
      mysql-test/r/ndb_binlog_multi.result:
        Result change
      mysql-test/r/rpl_known_bugs_detection.result:
        Result change
      mysql-test/r/rpl_loaddata.result:
        Result change
      mysql-test/r/rpl_loaddata_s.result:
        Result change
      mysql-test/r/rpl_ndb_charset.result:
        Result change
      mysql-test/r/rpl_ndb_extraCol.result:
        Result change
      mysql-test/r/rpl_ndb_log.result:
        Result change
      mysql-test/r/rpl_ndb_multi.result:
        Result change
      mysql-test/r/rpl_rbr_to_sbr.result:
        Result change
      mysql-test/r/rpl_rotate_logs.result:
        Result change
      mysql-test/r/rpl_sp.result:
        Result change
      mysql-test/r/rpl_stm_charset.result:
        Result change
      mysql-test/r/rpl_stm_flsh_tbls.result:
        Result change
      mysql-test/r/rpl_stm_log.result:
        Result change
      mysql-test/r/rpl_stm_max_relay_size.result:
        Result change
      mysql-test/r/rpl_stm_multi_query.result:
        Result change
      mysql-test/r/rpl_stm_reset_slave.result:
        Result change
      mysql-test/r/rpl_stm_until.result:
        Result change
      mysql-test/r/rpl_truncate_7ndb.result:
        Result change
      mysql-test/r/user_var-binlog.result:
        Result change
      mysql-test/t/binlog_stm_mix_innodb_myisam.test:
        Binlog position change
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Binlog position change
      mysql-test/t/mysqlbinlog.test:
        Binlog position change
      mysql-test/t/mysqlbinlog2.test:
        Binlog position change
      mysql-test/t/rpl_sp.test:
        Binlog position change
      mysql-test/t/rpl_stm_flsh_tbls.test:
        Binlog position change
      sql/log_event.cc:
        Emptying the record entirely since it appears MyISAM reads blob column
        data even when they are NULL.
        
        Adding code to set unused bits of the records before doing a comparison,
        and restoring the original values after. Setting the unused bits is necessary
        since NDB does not set them correctly, and resetting them afterwards is needed
        because MyISAM compares the record with the one located when updating
        or deleting it.
      mysql-test/r/rpl_row_basic_11bugs-master.opt:
        New BitKeeper file ``mysql-test/r/rpl_row_basic_11bugs-master.opt''
      mysql-test/r/rpl_row_basic_11bugs-slave.opt:
        New BitKeeper file ``mysql-test/r/rpl_row_basic_11bugs-slave.opt''
      a0e0166b
  24. 16 Mar, 2007 1 commit
    • unknown's avatar
      wl#3700 - post-review fixes: · 7d383909
      unknown authored
      s/ulonglong/key_part_map/, comments
      
      
      include/heap.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/my_base.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/myisam.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      include/myisammrg.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/event_db_repository.cc:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/ha_partition.cc:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/ha_partition.h:
        wl#3700 - post-review fixes:
        s/ulonglong/key_part_map/
      sql/sql_select.h:
        wl#3700 - post-review fixes:
        remove tab_to_keypart_map()
      7d383909
  25. 09 Mar, 2007 2 commits
    • unknown's avatar
      BUG#9953: CONVERT_TZ requires mysql.time_zone_name to be locked · 0ea47f3e
      unknown authored
      The problem was that some facilities (like CONVERT_TZ() function or
      server HELP statement) may require implicit access to some tables in
      'mysql' database.  This access was done by ordinary means of adding
      such tables to the list of tables the query is going to open.
      However, if we issued LOCK TABLES before that, we would get "table
      was not locked" error trying to open such implicit tables.
      
      The solution is to treat certain tables as MySQL system tables, like
      we already do for mysql.proc.  Such tables may be opened for reading
      at any moment regardless of any locks in effect.  The cost of this is
      that system table may be locked for writing only together with other
      system tables, it is disallowed to lock system tables for writing and
      have any other lock on any other table.
      
      After this patch the following tables are treated as MySQL system
      tables:
        mysql.help_category
        mysql.help_keyword
        mysql.help_relation
        mysql.help_topic
        mysql.proc (it already was)
        mysql.time_zone
        mysql.time_zone_leap_second
        mysql.time_zone_name
        mysql.time_zone_transition
        mysql.time_zone_transition_type
      
      These tables are now opened with open_system_tables_for_read() and
      closed with close_system_tables(), or one table may be opened with
      open_system_table_for_update() and closed with close_thread_tables()
      (the latter is used for mysql.proc table, which is updated as part of
      normal MySQL server operation).  These functions may be used when
      some tables were opened and locked already.
      
      NOTE: online update of time zone tables is not possible during
      replication, because there's no time zone cache flush neither on LOCK
      TABLES, nor on FLUSH TABLES, so the master may serve stale time zone
      data from cache, while on slave updated data will be loaded from the
      time zone tables.
      
      
      mysql-test/r/help.result:
        Update result.
      mysql-test/r/lock.result:
        Update result.
      mysql-test/r/sp-error.result:
        Update result.
      mysql-test/r/timezone2.result:
        Add result for bug#9953: CONVERT_TZ requires mysql.time_zone_name
        to be locked.
      mysql-test/r/view.result:
        Update result: use table t3 rather than utilize MySQL system table.
      mysql-test/t/help.test:
        Test that we can use HELP even under LOCK TABLES.
      mysql-test/t/lock.test:
        Test LOCK TABLE on system tables.
      mysql-test/t/timezone2.test:
        Add test case for bug#9953: CONVERT_TZ requires mysql.time_zone_name
        to be locked.
      mysql-test/t/view.test:
        Update test: use table t3 rather that utilize MySQL system table.
      sql/handler.h:
        Fix comment for 'count' parameter of check_if_locking_is_allowed().
        Add 'current' and 'system_count' parameters.
      sql/item_create.cc:
        We no longer have LEX::add_time_zone_tables_to_query_tables().
      sql/item_timefunc.cc:
        We no longer have LEX::time_zone_tables_used, so
        Item_func_convert_tz::fix_fields() became the same as base
        Item_date_func::fix_fields().
        
        my_tz_find() no longer takes table list, but takes THD pointer now.
      sql/item_timefunc.h:
        Remove dead field and method.
      sql/lock.cc:
        Pass values for 'current' and 'system_count' to
        check_if_locking_is_allowed().
      sql/log_event.cc:
        We no longer have my_tz_find_with_opening_tz_tables(), its functions is
        performed by my_tz_find().
      sql/mysql_priv.h:
        Add functions to work with MySQL system tables.
      sql/set_var.cc:
        my_tz_find() no longer takes table list, but takes THD pointer now.
      sql/sp.cc:
        Remove close_proc_table().  Use close_system_tables() instead.
        
        Use open_system_tables_for_read() and open_system_table_for_update().
      sql/sp.h:
        Remove close_proc_table() declaration.
      sql/sql_base.cc:
        Add implementation of open_system_tables_for_read(),
        close_system_tables(), open_system_table_for_update().
      sql/sql_help.cc:
        Operate on MySQL system tables mysql.help_* with
        open_system_tables_for_read() and close_system_tables() to allow the
        usage of HELP statement under LOCK TABLES.
      sql/sql_lex.cc:
        Remove LEX::time_zone_tables_used and
        LEX::add_time_zone_tables_to_query_tables() which are no longer used.
      sql/sql_lex.h:
        Remove LEX::time_zone_tables_used and
        LEX::add_time_zone_tables_to_query_tables() which are no longer used.
      sql/sql_parse.cc:
        Remove references to LEX::time_zone_tables_used and
        my_tz_check_n_skip_implicit_tables() which are no longer used.
      sql/sql_show.cc:
        Use close_system_tables() instead of removed close_proc_table().
      sql/sql_view.cc:
        LEX::time_zone_tables_used is no longer there.
      sql/sql_yacc.yy:
        LEX::add_time_zone_tables_to_query_tables() is no longer there.
      sql/table.cc:
        Add more tables that should be treated as MySQL system tables.
      sql/share/errmsg.txt:
        Change the error message, as now we allow write-locking of several
        system tables if not mixed with ordinary tables.
      sql/tztime.cc:
        Do not add time zone tables to the list of query tables in
        tz_init_table_list().
        
        Remove fake_time_zone_tables_list and my_tz_get_tables_list().
        
        In my_tz_init(), open mysql.time_zone_leap_second with
        simple_open_n_lock_tables(), but pass time zone name to my_tz_find(),
        which will open and close time zone tables as necessary.
        
        In tz_load_from_open_tables() do not call table->use_all_columns(), as
        this was already done in open_system_tables_for_read().
        
        my_tz_find() takes THD pointer instead of table list, and calls
        open_system_tables_for_read() and close_system_tables() as necessary.
        
        Remove my_tz_find_with_opening_tz_tables().
      sql/tztime.h:
        Remove declarations of my_tz_get_table_list(),
        my_tz_find_with_opening_tz_tables(), fake_time_zone_tables_list,
        definition of my_tz_check_n_skip_implicit_tables().
        Update prototype for my_tz_find().
      storage/csv/ha_tina.cc:
        Add new parameters to check_if_locking_is_allowed().
      storage/csv/ha_tina.h:
        Add new parameters to check_if_locking_is_allowed().
      storage/myisam/ha_myisam.cc:
        Add new parameters to check_if_locking_is_allowed().  In this
        function we count system tables.  If there are system tables, but
        there are also non-system tables, we report an error.
      storage/myisam/ha_myisam.h:
        Add new parameters to check_if_locking_is_allowed().
      0ea47f3e
    • unknown's avatar
      Polishing: use constants instead of magic numbers. · a0521cd7
      unknown authored
      include/my_global.h:
        Introduce constants to be used instead of magic numbers.
      sql/field.cc:
        Polishing: use contants instead of magic numbers.
      sql/ha_innodb.cc:
        Polishing: use contants instead of magic numbers.
      sql/handler.cc:
        Polishing: use contants instead of magic numbers.
      sql/item.cc:
        Polishing: use contants instead of magic numbers.
      sql/item.h:
        Polishing: use contants instead of magic numbers.
      sql/item_func.cc:
        Polishing: use contants instead of magic numbers.
      sql/item_subselect.cc:
        Polishing: use contants instead of magic numbers.
      sql/log_event.cc:
        Polishing: use contants instead of magic numbers.
      sql/sql_base.cc:
        Polishing: use contants instead of magic numbers.
      sql/sql_select.cc:
        Polishing: use contants instead of magic numbers.
      sql/sql_show.cc:
        Polishing: use contants instead of magic numbers.
      sql/sql_table.cc:
        Polishing: use contants instead of magic numbers.
      a0521cd7
  26. 07 Mar, 2007 2 commits
    • unknown's avatar
      BUG#22583 (RBR between MyISAM and non-MyISAM tables does not work): · a2f9bcea
      unknown authored
      Post-merge fixes.
      
      
      mysql-test/extra/binlog_tests/binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
        Binlog position change
      mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
        Binlog position change
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        Binlog position change
      mysql-test/r/binlog_row_binlog.result:
        Result change
      mysql-test/r/binlog_row_ctype_ucs.result:
        Result change
      mysql-test/r/binlog_row_insert_select.result:
        Result change
      mysql-test/r/binlog_row_mix_innodb_myisam.result:
        Result change
      mysql-test/r/ctype_cp932_binlog_row.result:
        Result change
      mysql-test/r/flush_block_commit_notembedded.result:
        Result change
      mysql-test/r/rpl_row_create_table.result:
        Result change
      mysql-test/r/rpl_row_delayed_ins.result:
        Result change
      mysql-test/t/binlog_row_mix_innodb_myisam.test:
        Binlog position change
      mysql-test/t/rpl_row_create_table.test:
        Removing blinding of end_log_pos in SHOW BINLOG EVENTS output.
        Binlog position change.
      sql/log_event.cc:
        Post-merge fixes.
      a2f9bcea
    • unknown's avatar
      A fix for Bug#26750 "valgrind leak in sp_head" (and post-review · 053c6c01
      unknown authored
      fixes).
      
      The legend: on a replication slave, in case a trigger creation
      was filtered out because of application of replicate-do-table/
      replicate-ignore-table rule, the parsed definition of a trigger was not 
      cleaned up properly. LEX::sphead member was left around and leaked 
      memory. Until the actual implementation of support of 
      replicate-ignore-table rules for triggers by the patch for Bug 24478 it 
      was never the case that "case SQLCOM_CREATE_TRIGGER"
      was not executed once a trigger was parsed,
      so the deletion of lex->sphead there worked and the memory did not leak.
      
      The fix: 
      
      The real cause of the bug is that there is no 1 or 2 places where
      we can clean up the main LEX after parse. And the reason we 
      can not have just one or two places where we clean up the LEX is
      asymmetric behaviour of MYSQLparse in case of success or error. 
      
      One of the root causes of this behaviour is the code in Item::Item()
      constructor. There, a newly created item adds itself to THD::free_list
      - a single-linked list of Items used in a statement. Yuck. This code
      is unaware that we may have more than one statement active at a time,
      and always assumes that the free_list of the current statement is
      located in THD::free_list. One day we need to be able to explicitly
      allocate an item in a given Query_arena.
      Thus, when parsing a definition of a stored procedure, like
      CREATE PROCEDURE p1() BEGIN SELECT a FROM t1; SELECT b FROM t1; END;
      we actually need to reset THD::mem_root, THD::free_list and THD::lex
      to parse the nested procedure statement (SELECT *).
      The actual reset and restore is implemented in semantic actions
      attached to sp_proc_stmt grammar rule.
      The problem is that in case of a parsing error inside a nested statement
      Bison generated parser would abort immediately, without executing the
      restore part of the semantic action. This would leave THD in an 
      in-the-middle-of-parsing state.
      This is why we couldn't have had a single place where we clean up the LEX
      after MYSQLparse - in case of an error we needed to do a clean up
      immediately, in case of success a clean up could have been delayed.
      This left the door open for a memory leak.
      
      One of the following possibilities were considered when working on a fix:
      - patch the replication logic to do the clean up. Rejected
      as breaks module borders, replication code should not need to know the
      gory details of clean up procedure after CREATE TRIGGER.
      - wrap MYSQLparse with a function that would do a clean up.
      Rejected as ideally we should fix the problem when it happens, not
      adjust for it outside of the problematic code.
      - make sure MYSQLparse cleans up after itself by invoking the clean up
      functionality in the appropriate places before return. Implemented in 
      this patch.
      - use %destructor rule for sp_proc_stmt to restore THD - cleaner
      than the prevoius approach, but rejected
      because needs a careful analysis of the side effects, and this patch is 
      for 5.0, and long term we need to use the next alternative anyway
      - make sure that sp_proc_stmt doesn't juggle with THD - this is a 
      large work that will affect many modules.
      
      Cleanup: move main_lex and main_mem_root from Statement to its
      only two descendants Prepared_statement and THD. This ensures that
      when a Statement instance was created for purposes of statement backup,
      we do not involve LEX constructor/destructor, which is fairly expensive.
      In order to track that the transformation produces equivalent 
      functionality please check the respective constructors and destructors
      of Statement, Prepared_statement and THD - these members were
      used only there.
      This cleanup is unrelated to the patch.
      
      
      sql/log_event.cc:
        THD::main_lex is private and should not be used.
      sql/mysqld.cc:
        Move MYSQLerror to sql_yacc.yy as it depends on LEX headers now.
      sql/sql_class.cc:
        Cleanup: move main_lex and main_mem_root to THD and Prepared_statement
      sql/sql_class.h:
        Cleanup: move main_lex and main_mem_root to THD and Prepared_statement
      sql/sql_lex.cc:
        Implement st_lex::restore_lex()
      sql/sql_lex.h:
        Declare st_lex::restore_lex().
      sql/sql_parse.cc:
        Consolidate the calls to unit.cleanup() and deletion of lex->sphead
        in mysql_parse (COM_QUERY handler)
      sql/sql_prepare.cc:
        No need to delete lex->sphead to restore memory roots now in case of a 
        parse error - this is done automatically inside MYSQLparse
      sql/sql_trigger.cc:
        This code could lead to double deletion apparently, as in case
        of an error lex.sphead was never reset.
      sql/sql_yacc.yy:
        Trap all returns from the parser to ensure that MySQL-specific cleanup
        is invoked: we need to restore the global state of THD and LEX in 
        case of a parsing error. In case of a parsing success this happens as 
        part of normal grammar reduction process.
      053c6c01
  27. 01 Mar, 2007 1 commit
    • unknown's avatar
      After merge fix · 683c1e6a
      unknown authored
      mysql-test/t/rpl_loaddata_simple.test:
        Rename: mysql-test/t/rpl_loaddata2.test -> mysql-test/t/rpl_loaddata_simple.test
      mysql-test/r/rpl_loaddata_simple.result:
        Rename: mysql-test/r/rpl_loaddata2.result -> mysql-test/r/rpl_loaddata_simple.result
      683c1e6a