1. 30 Jun, 2006 1 commit
    • unknown's avatar
      BUG#20769: Dangling pointer in ctype_recoding test case. · d9cb536a
      unknown authored
      In some functions dealing with strings and character sets, the wrong
      pointers were saved for restoration in THD::rollback_item_tree_changes().
      This could potentially cause random corruption or crashes.
      
      Fixed by passing the original Item ** locations, not local stack copies.
      
      Also remove unnecessary use of default arguments.
      
      
      sql/item.cc:
        Function agg_item_charsets() now handles non-consequtive Item *'s.
      sql/item.h:
        Remove use of default argument.
      sql/item_cmpfunc.cc:
        Remove use of default argument.
      sql/item_func.cc:
        Remove use of default argument.
      sql/item_func.h:
        Function agg_item_charsets() now handles non-consequtive Item *'s.
      sql/item_strfunc.cc:
        Pass original Item **'s to agg_arg_charsets(), not local copies, to ensure
        proper restoration in THD::rollback_item_tree_changes().
      sql/item_sum.cc:
        Remove use of default argument.
      d9cb536a
  2. 29 Jun, 2006 7 commits
  3. 28 Jun, 2006 12 commits
    • unknown's avatar
      A fix for Bug#19022 "Memory bug when switching db during trigger execution". · 88843709
      unknown authored
      No test case as the bug is in an existing test case (rpl_trigger.test
      when it is run under valgrind).
      The warning was caused by memory corruption in replication slave: thd->db
      was pointing at a stack address that was previously used by 
      sp_head::execute()::old_db. This happened because mysql_change_db
      behaved differently in replication slave and did not make a copy of the 
      argument to assign to thd->db. 
      The solution is to always free the old value of thd->db and allocate a new
      copy, regardless whether we're running in a replication slave or not.
      
      
      sql/log_event.cc:
        Move rewrite_db to log_event.cc, the only place where it is used.
      sql/slave.cc:
        Move rewrite_db to log_event.cc
      sql/slave.h:
        Remove an unneeded declaration.
      sql/sql_class.h:
        Fix set_db to always free the old db, even if the argument is NULL.
        Add a comment.
      sql/sql_db.cc:
        Always make a deep copy of the argument in mysql_change_db, even 
        if running in a replication slave. This is necessary because 
        sp_use_new_db (stored procedures) assumes that mysql_change_db always makes
        a deep copy of the argument, and thus passes a pointer to stack into it.
        This assumption was true for all cases except the replication slave thread.
      88843709
    • unknown's avatar
      BUG #19773 · 9016a6be
      unknown authored
      Pushbuild fixes to result file, test, and header file for federated.
      
      
      mysql-test/r/federated.result:
        BUG #19773
        
        Pushbuild fixes - result file had hard-coded port
      mysql-test/t/federated.test:
        BUG #19773
        
        Pushbuild fixes Test was missing --replace_result
      sql/ha_federated.h:
        BUG #19773
        
        HPUX and Windows failed with variable named row and *row in method declaration
      9016a6be
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0-runtime · d127fa3b
      unknown authored
      into  mysql.com:/home/jimw/my/mysql-5.0-18005
      
      
      sql/sql_trigger.cc:
        Auto merged
      d127fa3b
    • unknown's avatar
      Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0 · 7f9a6aa9
      unknown authored
      into  govinda.patg.net:/home/patg/mysql-build/mysql-5.0-engines-bug19773
      
      
      sql/ha_federated.cc:
        Auto merged
      7f9a6aa9
    • unknown's avatar
      Merge xiphis.org:/home/antony/work2/p4-bug12096.2 · 76d0badd
      unknown authored
      into  xiphis.org:/home/antony/work2/p4-bug12096.2-merge
      
      
      configure.in:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      76d0badd
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0 · 2f45384b
      unknown authored
      into  mysql.com:/home/tnurnberg/mysql-5.0
      
      
      2f45384b
    • unknown's avatar
      Merge mysql.com:/home/tnurnberg/work/mysql-5.0-maint-19857 · 03ce4312
      unknown authored
      into  mysql.com:/home/tnurnberg/mysql-5.0
      
      
      03ce4312
    • unknown's avatar
      Bug#19857: When a user with CREATE ROUTINE priv creates a routine it results in NULL p/w · 5312b349
      unknown authored
        
      sp_grant_privileges(), the function that GRANTs EXECUTE + ALTER privs on a SP,
      did so creating a user-entry with not password; mysql_routine_grant() would then
      write that "change" to the user-table.
      
      
      mysql-test/r/sp-security.result:
        prove that creating a stored procedure will not destroy the creator's password
      mysql-test/t/sp-security.test:
        prove that creating a stored procedure will not destroy the creator's password
      sql/sql_acl.cc:
        get password from ACLs, convert to correct format, and use it when
        forcing GRANTS for SPs
      5312b349
    • unknown's avatar
      Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0 · b5f89708
      unknown authored
      into mysql.com:/home/gluh/MySQL/Merge/5.0-kt
      
      
      sql/set_var.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      b5f89708
    • unknown's avatar
      BUG #19773 · 2ee3ef2e
      unknown authored
        
      Final-review fixes per Monty, pre-push. OK'd for 
      push. Please see each file's comments.
      
      
      
      mysql-test/r/federated.result:
        BUG #19773
            
        Results for multi-table deletes, updates
      mysql-test/t/federated.test:
        BUG #19773
            
        Test multi table update and delete. Added drop table to end of previous test.
      sql/ha_federated.cc:
        BUG #19773 
            
        Post-review changes, per Monty. 3rd patch, OK'd for push.
        - Added index_read_idx_with_result_set, which uses the result set passed to it
        - Hash by entire connection scheme
        - Protected store_result result set for table scan by adding a method result set
          to index_read_idx and index_read which is passed to index_read_with_result, which
          in turn iterates over the single record via read_next.
          This is a change from having two result sets in the first two patches. 
          This keeps the code clean and avoids the need for yet another result set.
        - Rewrote ::position and ::rnd_pos to store position - if primary key use 
          primary key, if not, use record buffer.
        - Rewrote get_share to store hash with connect string vs. table name
        - delete_row added subtration of "records" by affected->rows
        - Added read_next to handle what rnd_next used to do (converting raw record
           to query and vice versa)
        - Removed many DBUG_PRINT lines
        - Removed memset initialisation since subsequent loop accomplishes
        - Removed un-necessary mysql_free_result lines
      sql/ha_federated.h:
         BUG #19773
            
            Fixed "SET " to " SET " to make sure built statements are built with 
            "UPDATE `t1` SET .." instead of "UPDATE `t1`SET"
      2ee3ef2e
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · a4c95a18
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
      
      
      a4c95a18
    • unknown's avatar
      Bug #18005: Creating a trigger on mysql.event leads to server crash on scheduler startup · 88afd72b
      unknown authored
      Bug #18361: Triggers on mysql.user table cause server crash
      
       Because they do not work, we do not allow creating triggers on tables
       within the 'mysql' schema.
      
       (They may be made to work and re-enabled at some later date, but not
       in 5.0 or 5.1.)
      
      
      mysql-test/r/trigger.result:
        Add new results
      mysql-test/t/trigger.test:
        Add new regression test for creating triggers on system schema
      sql/share/errmsg.txt:
        Add new error message
      sql/sql_trigger.cc:
        Disallow creating triggers on tables in the 'mysql' schema
      88afd72b
  4. 27 Jun, 2006 16 commits
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0 · 1e22a12d
      unknown authored
      into mysql.com:/M50/autopush20216-5.0
      
      
      scripts/make_binary_distribution.sh:
        Auto merged
      1e22a12d
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 7279446f
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
      
      
      7279446f
    • unknown's avatar
      Manual merge for bug#20216. · b024b6c0
      unknown authored
      
      support-files/mysql.spec.sh:
        Manual merge for bug#20216, due to some conflict in the changenotes.
      b024b6c0
    • unknown's avatar
      Revert all previous attempts to call "mysql_upgrade" during RPM upgrade. · 0604daa4
      unknown authored
      This finishes bug#18516, as far as "generic RPMs" are concerned.
      
      
      support-files/mysql.spec.sh:
        Revert all previous attempts to call "mysql_upgrade" during RPM upgrade,
        there are some more aspects which need to be solved before this is possible.
        For now, just ensure the binary "mysql_upgrade" is delivered and installed.
        This finishes bug#18516, as far as "generic RPMs" are concerned.
      0604daa4
    • unknown's avatar
      Merge mysql.com:/M50/bug19353-5.0-2 into mysql.com:/M50/bug20216-5.0 · 0b6de748
      unknown authored
      
      support-files/mysql.spec.sh:
        Auto merged
      0b6de748
    • unknown's avatar
      Merge mysql.com:/home/tomash/src/mysql_ab/mysql-5.0 · d5d217c0
      unknown authored
      into  mysql.com:/home/tomash/src/mysql_ab/mysql-5.0-bug17203
      
      
      d5d217c0
    • unknown's avatar
      Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement · 90cb4c03
      unknown authored
      The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
      statement from internal structures based on value set later at runtime, not
      the original value set by the user.
      
      The solution is to remember that original value.
      
      
      mysql-test/r/auto_increment.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/func_compress.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/func_math.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/func_system.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/func_time.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/information_schema.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/query_cache.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/rpl_get_lock.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/rpl_master_pos_wait.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/show_check.result:
        Add result for bug#17203.
      mysql-test/r/subselect.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/type_blob.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/variables.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/r/view.result:
        Update result to not report SQL_NO_CACHE if it wasn't there at first place.
      mysql-test/t/show_check.test:
        Add test case for bug#17203.
      sql/sql_lex.cc:
        Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
      sql/sql_lex.h:
        Add SELECT_LEX::sql_cache field to store original user setting.
      sql/sql_select.cc:
        Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
      sql/sql_yacc.yy:
        Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive.  Ignore
        SQL_CACHE if SQL_NO_CACHE was used.  Remember what was set by the user.
        Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
      90cb4c03
    • unknown's avatar
      Move "mysqldumpslow" from the client RPM to the server RPM (bug#20216), · 30b1d658
      unknown authored
      manual merge from 4.0.
      
      
      support-files/mysql.spec.sh:
        Manual merge of the fix for bug#20216.
        (became necessary because 4.0 and 4.1 spec files use different file sort order).
      30b1d658
    • unknown's avatar
    • unknown's avatar
      7982816b
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · cee3b44d
      unknown authored
      into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
      
      
      mysql-test/mysql-test-run.sh:
        Auto merged
      ndb/include/kernel/GlobalSignalNumbers.h:
        Auto merged
      ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
        Auto merged
      ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      cee3b44d
    • unknown's avatar
      merging fix · e8329641
      unknown authored
      e8329641
    • unknown's avatar
      Fix yet another place with an obsolete explicit cast to byte *. · 44672ae5
      unknown authored
      
      sql/set_var.h:
        Fix yet another place with an obsolete explicit cast to byte *
      44672ae5
    • unknown's avatar
      Fix compilation failures on Windows caused by the patch for Bug#17199. · e3ef15ea
      unknown authored
      Fix a minor issue with Bug#16206 (bdb.test failed if the tree is compiled 
      without blackhole).
      
      
      include/my_sys.h:
        Change declaration of my_strdup_with_length to accept const char *,
        not const byte *: in 5 places out of 6 where this function is used,
        it's being passed char *, not byte *
      mysql-test/r/bdb.result:
        Remove dependency on an optional engine (updated test results).
      mysql-test/t/bdb.test:
        Remove dependency on an optional engine.
      mysys/my_malloc.c:
        my_strdup_with_length: const byte * -> const char *
      mysys/safemalloc.c:
        my_strdup_with_length: const byte * -> const char *
      sql/ha_federated.cc:
        my_strdup_with_length: const byte * -> const char *
      sql/log_event.cc:
        my_strdup_with_length: const byte * -> const char *
      sql/set_var.cc:
        my_strdup_with_length: const byte * -> const char *
      sql/sql_class.h:
        Change db_length type to uint from uint32 (see also table.h)
      sql/table.h:
        Change the type of db_length to uint from uint32: LEX_STRING uses uint for 
        length, we need a small and consistent set of types to store length to 
        minimize cast and compile failures.
      e3ef15ea
    • unknown's avatar
      Bug #19852 Restoring backup made from cluster with full data memory fails · d2da3c96
      unknown authored
      - correction of previous patch
      
      
      d2da3c96
    • unknown's avatar
      Bug #19852 Restoring backup made from cluster with full data memory fails · 0335013f
      unknown authored
      - make sure to allocate just enough pages in the fragments by using the actual
        row count from the backup, to avoid over allocation of pages to fragments, and
        thus avoid the bug
      
      
      ndb/include/kernel/GlobalSignalNumbers.h:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - distribute fragment complete to all participants to update row count
      ndb/include/kernel/signaldata/BackupContinueB.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - time slica writing of fragment info to ctl file
      ndb/include/kernel/signaldata/BackupImpl.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bit on bytes and records
        - new signal fragment complete to all participants
      ndb/include/kernel/signaldata/BackupSignalData.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bit on bytes and records
      ndb/include/kernel/signaldata/DictTabInfo.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - add min and max rows to dict tab info
      ndb/include/kernel/signaldata/LqhFrag.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to add frag req
      ndb/include/kernel/signaldata/TupFrag.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to add frag req
      ndb/include/ndbapi/NdbDictionary.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added get/set of min max rows
      ndb/src/common/debugger/signaldata/BackupImpl.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bit on bytes and records
      ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bit on bytes and records
      ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to dict tab info
      ndb/src/common/debugger/signaldata/LqhFrag.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to frag req
      ndb/src/kernel/blocks/backup/Backup.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - new section in backup with per fragment info in ctl file
        - 32 -> 64 bit on bytes and records
      ndb/src/kernel/blocks/backup/Backup.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - new section in backup with per fragment info in ctl file
        - 32 -> 64 bit on bytes and records
      ndb/src/kernel/blocks/backup/BackupFormat.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - new section in backup with per fragment info in ctl file
        - 32 -> 64 bit on bytes and records
      ndb/src/kernel/blocks/backup/BackupInit.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - new signal fragment complete to all participants
      ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added max and min rows to dict table object
      ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added max and min rows to dict table object
      ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to frag req
      ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to frag req
      ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to frag req
      ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - added min and max rows to frag req
        - move memory allocation to fragment to after adding of attributes to get correct headsize
        - allocate pages to fragments according to min rows setting
      ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - grow page allocation starting from 2 irrespective of first page allocation
      ndb/src/mgmsrv/MgmtSrvr.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bits on bytes and records
      ndb/src/mgmsrv/MgmtSrvr.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - 32 -> 64 bits on bytes and records
      ndb/src/ndbapi/NdbDictionary.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - min and max rows in dict
      ndb/src/ndbapi/NdbDictionaryImpl.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - min and max rows in dict
      ndb/src/ndbapi/NdbDictionaryImpl.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - min and max rows in dict
      ndb/tools/restore/Restore.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - add retrieval of fragment info
      ndb/tools/restore/Restore.hpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - add retrieval of fragment info
      ndb/tools/restore/consumer_restore.cpp:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - set min in restore to the actual row count (this is the actual bug fix)
      sql/ha_ndbcluster.cc:
        Bug #19852  	Restoring backup made from cluster with full data memory fails
        - set min and max rows according to sql definition
      0335013f
  5. 26 Jun, 2006 4 commits