1. 29 Mar, 2006 1 commit
    • unknown's avatar
      Proposed fix for bug #17764 "Trigger crashes MyISAM table" · 297c18ad
      unknown authored
      A table with an on insert trigger was reported as crashed when the insert
      was processed with bulk insert mode on (handler::start_bulk_insert).
      The trigger was also selecting from the same table, and that caused
      the "crash".
      The same problem was present when an insert statement, which was processed
      in bulk mode, also used a stored function that was reading the same table.
      
      This fix disables bulk inserts if a statement uses functions or invokes
      triggers. Implementing more granular checks will require much more code and
      therefore can hardly be done in 5.0
      
      
      mysql-test/r/trigger.result:
        Added test bug #17764 "Trigger crashes MyISAM table".
      mysql-test/t/trigger.test:
        Added test bug #17764 "Trigger crashes MyISAM table".
      sql/sql_insert.cc:
        We should not start bulk inserts for INSERT (or similar) statement if it uses
        functions or invokes triggers since they may access to the same table and
        therefore should not see its inconsistent state created by this optimization.
      sql/sql_load.cc:
        We should not start bulk inserts for INSERT (or similar) statement if it uses
        functions or invokes triggers since they may access to the same table and
        therefore should not see its inconsistent state created by this optimization.
      297c18ad
  2. 11 Mar, 2006 2 commits
  3. 10 Mar, 2006 16 commits
    • unknown's avatar
      Merge mysql.com:/home/mydev/mysql-5.0 · 210bdd43
      unknown authored
      into  mysql.com:/home/mydev/mysql-5.0-bug14980
      
      210bdd43
    • unknown's avatar
    • unknown's avatar
      Fix version of DEFINER-clause in mysqldump. · 4f83f961
      unknown authored
      Now DEFINER-clause in stored routines is expected to appear
      in 5.0.20 release, not in 5.0.19. as it was supposed before.
      
      
      client/mysqldump.c:
        Fixing version.
      mysql-test/r/mysqldump.result:
        Updated the result file.
      4f83f961
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0 · fbead2ec
      unknown authored
      into mysql.com:/M50/merge-5.0
      
      fbead2ec
    • unknown's avatar
      Merge mysql.com:/M50/clone-5.0 into mysql.com:/M50/merge-5.0 · ee156df1
      unknown authored
      
      libmysql/libmysql.c:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      ee156df1
    • unknown's avatar
      Include the system header file "pthread.h" even in a non-threaded build. · 77389376
      unknown authored
      Fixes bug#15861
      
      
      include/my_no_pthread.h:
        Even in a non-threaded build, some modules (at least "mysys/mf_keycache.c")
        need some type definitions provided by the system header file "pthread.h".
        Rather than add complexity to the code, include the header.
        
        Fixes bug#15861
      77389376
    • unknown's avatar
      Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/5.0 · 49ae5ba2
      unknown authored
      into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/5.0.20-bug15101-sysdate
      
      49ae5ba2
    • unknown's avatar
      BUG#15101 SYSDATE() disregards SET TIMESTAMP. · 6d9a1ae7
      unknown authored
         After the ChangeSet 1.1892.20.1 2005/08/24 (Bug #12562) SYSDATE() is not an alias
         of NOW() and is unsafe for replication.
         `SYSDATE()' backward compatible aliasing clashes with the idea #12562 
         fix. To make it safe-replicatable we have to either use RBR or to restore
         the pre-5.0 style.
         --sysdate-is-now command line flag was introduced to provide backward compatibility.
      
      
      sql/mysqld.cc:
        New option to force SYSDATE's backward compatible with 4.1 aliasing to NOW (not default)
      sql/sql_class.h:
        new slot to fill at init time and check at parse
      sql/sql_yacc.yy:
        calling NOW's branches when --sysdate-is-now
      mysql-test/r/sysdate_is_now.result:
        New BitKeeper file ``mysql-test/r/sysdate_is_now.result''
      mysql-test/t/sysdate_is_now-master.opt:
        New BitKeeper file ``mysql-test/t/sysdate_is_now-master.opt''
      mysql-test/t/sysdate_is_now.test:
        New BitKeeper file ``mysql-test/t/sysdate_is_now.test''
      6d9a1ae7
    • unknown's avatar
      Merge mysql.com:/home/mydev/mysql-4.1-bug14980 · 95408957
      unknown authored
      into  mysql.com:/home/mydev/mysql-5.0-bug14980
      
      
      include/my_base.h:
        Auto merged
      myisam/mi_delete.c:
        Auto merged
      myisam/mi_key.c:
        Auto merged
      myisam/mi_rnext_same.c:
        Auto merged
      myisam/mi_unique.c:
        Auto merged
      myisam/mi_update.c:
        Auto merged
      myisam/mi_write.c:
        Auto merged
      mysql-test/r/myisam.result:
        SCCS merged
      mysql-test/t/myisam.test:
        SCCS merged
      95408957
    • unknown's avatar
      Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX · d8b4d419
      unknown authored
      For "count(*) while index_column = value" an index read
      is done. It consists of an index scan and retrieval of
      each key.
      
      For efficiency reasons the index scan stores the key in
      the special buffer 'lastkey2' once only. At the first 
      iteration it notes this fact with the flag 
      HA_STATE_RNEXT_SAME in 'info->update'.
      
      For efficiency reasons, the key retrieval for blobs
      does not allocate a new buffer, but uses 'lastkey2'...
      
      Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
      buffer has been polluted. In this case, the index scan
      copies the key value again (and sets the flag again).
      
      
      include/my_base.h:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Changed the comment for HA_STATE_RNEXT_SAME as a warning
        for future uses.
      myisam/mi_delete.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_key.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_rnext_same.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removed trailing space and fixed a comment.
      myisam/mi_unique.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_update.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_write.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      mysql-test/r/myisam.result:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Added test result.
      mysql-test/t/myisam.test:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Added test.
      d8b4d419
    • unknown's avatar
      Additional fix for BUG#16777: Can not create trigger nor view · 8947b799
      unknown authored
      w/o definer if --skip-grant-tables specified.
        
      The previous patch does not allow to specify empty host name in
      DEFINER-clause explicitly.
      
      
      mysql-test/r/skip_grants.result:
        Updated the result file.
      mysql-test/r/view_grant.result:
        Updated the result file.
      mysql-test/t/skip_grants.test:
        Added test cases for BUG#16777; re-organized tests.
      mysql-test/t/view_grant.test:
        Updated after final fix of BUG#16777.
      sql/sql_parse.cc:
        The final part of fixing BUG#16777: allow empty host name in explicitly
        specified DEFINER-clause.
      sql/sql_show.cc:
        Quote an identifier if it is empty.
      8947b799
    • unknown's avatar
      Merge mysql.com:/M41/comment-4.1 into mysql.com:/M50/mysql-5.0 · 16541334
      unknown authored
      
      scripts/make_binary_distribution.sh:
        Auto merged
      16541334
    • unknown's avatar
      Fixed bug#13575: SP funcs in select with distinct/group and order by can · 6f8c1f6d
      unknown authored
      produce wrong data
      
      By default Item_sp_func::val_str() returns string from it's result_field 
      internal buffer. When grouping is present Item_copy_string is used to 
      store SP function result, but it doesn't additionally buffer the result.
      When the next record is read, internal buffer is overwritten, due to
      this Item_copy_string::val_str() will have wrong data. Thus producing
      weird query result.
      
      The Item_func_sp::val_str() now makes a copy of returned value to prevent
      occasional corruption.
      
      
      mysql-test/t/sp.test:
        Added test case for bug#13575: SP funcs in select with distinct/group and order by can
        produce wrong data
      mysql-test/r/sp.result:
        Added test case for bug#13575: SP funcs in select with distinct/group and
            order by can produce wrong data
      sql/item_func.h:
        Fixed bug#13575: SP funcs in select with distinct/group and order by can
            produce wrong data
            The Item_func_sp::val_str() now makes a copy of returned value to prevent
            occasinal corruption.
      6f8c1f6d
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · a7717c72
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      a7717c72
    • unknown's avatar
      Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0 · 44a38121
      unknown authored
      into  zim.(none):/home/brian/mysql/mysql-5.0
      
      44a38121
    • unknown's avatar
      This patch does 1) fix my build breakage 2) Complete the removal of all... · e9f80a4a
      unknown authored
      This patch does 1) fix my build breakage  2) Complete the removal of all symbols which could clash with another parser. 
      
      
      sql/mysql_priv.h:
        Porting update
      sql/mysqld.cc:
        Porting update
      sql/sp.cc:
        Porting update
      sql/sql_lex.cc:
        Porting update
      sql/sql_lex.h:
        Porting update
      sql/sql_parse.cc:
        Porting update
      sql/sql_prepare.cc:
        Portinng update
      sql/sql_trigger.cc:
        Porting update
      sql/sql_view.cc:
        Porting update
      e9f80a4a
  4. 09 Mar, 2006 12 commits
  5. 08 Mar, 2006 9 commits
    • unknown's avatar
      Merge · e345f28b
      unknown authored
      
      mysql-test/lib/mtr_cases.pl:
        Auto merged
      mysql-test/lib/mtr_misc.pl:
        Auto merged
      e345f28b
    • unknown's avatar
      mysql-test-run.pl, mtr_cases.pl · 11cf49ac
      unknown authored
        - Back porting of some changes in later releases
        - Corrected valgrind support
        - Removed work around for TZ needed in VisualStudio 6
        - Don't restart master to add special settings from "<testcase>-master.opt",
          if same settngs as running master, feature request in bug#12433
        - With --reorder, keep tests with same *-master.opt content together,
          to save even more master restarts
      
      
      mysql-test/lib/mtr_misc.pl:
        Added functions to compare lists of options
      mysql-test/lib/mtr_cases.pl:
        Removed special code for Windows as in VC6 we unset
        TZ to avoid library bug
      mysql-test/mysql-test-run.pl:
        Handle pseudo option --timezone=<spec> that sets TZ
      11cf49ac
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · e65726c6
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysqltestrun_ndbclusterstart/my50-mysqltestrun_ndbclusterstart
      
      e65726c6
    • unknown's avatar
      BUG#17574 Detect cluster start failure and "fail" ndb_* tests · 49f6a18d
      unknown authored
       - Fix problems that occur when ndbcluster is not supported
      
      
      mysql-test/lib/mtr_cases.pl:
        Marked test to be skipped if it is a ndb test but ndb is not supported
      mysql-test/mysql-test-run.pl:
        Check "opt_with_ndbcluster" before deciding to stop masters and when dciding if cluster needs to be started.
      49f6a18d
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · afdf3256
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug17137/my50-bug17137
      
      afdf3256
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0 · e8a6f9be
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug17137/my50-bug17137
      
      e8a6f9be
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 · ddc5d1b3
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
      
      ddc5d1b3
    • unknown's avatar
      After merge · e570f80d
      unknown authored
      
      mysql-test/t/rpl_trunc_temp.test:
        Remove final "connection master" it's already disconnected
      e570f80d
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137 · afedb18e
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug17137/my50-bug17137
      
      
      sql/sql_delete.cc:
        Auto merged
      afedb18e