1. 29 Mar, 2006 2 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 1b458888
      unknown authored
      into  mysql.com:/home/dlenev/mysql-5.0-bg17764
      
      
      mysql-test/r/trigger.result:
        Auto merged
      mysql-test/t/trigger.test:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      1b458888
    • unknown's avatar
      Proposed fix for bug #17764 "Trigger crashes MyISAM table" · 1d166b17
      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.
      1d166b17
  2. 28 Mar, 2006 7 commits
    • unknown's avatar
      Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime · 53595c70
      unknown authored
      into  mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime
      
      
      53595c70
    • unknown's avatar
      Removed forgotten comment line in sql_select.cc. · c47405e2
      unknown authored
      
      sql/sql_select.cc:
        Forgot to remove commented line in previous commit.
      c47405e2
    • unknown's avatar
      Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime · 44238389
      unknown authored
      into  mysql.com:/extern/mysql/5.0/bug17015/mysql-5.0-runtime
      
      
      mysql-test/r/sp-error.result:
        Auto merged
      mysql-test/t/sp-error.test:
        Auto merged
      sql/field.h:
        Auto merged
      sql/sp.cc:
        Auto merged
      44238389
    • unknown's avatar
      Review fix for BUG#17015: Routine name truncation not an error · e550d6e7
      unknown authored
      
      sql/field.h:
        Added new method to Field class: char_length()
      sql/sp.cc:
        Use Field::char_length() to check number of characters in the name field.
      e550d6e7
    • unknown's avatar
      Merge mysql.com:/extern/mysql/bk/mysql-5.0-runtime · 9a139c3a
      unknown authored
      into  mysql.com:/extern/mysql/5.0/bug16474/mysql-5.0-runtime
      
      
      mysql-test/t/sp.test:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/sp.result:
        Manual merge.
      9a139c3a
    • unknown's avatar
      Post review fixes for BUG#16474: SP crashed MySQL. · 537ec1e6
      unknown authored
      
      mysql-test/r/ps.result:
        Added test coverage for "order by" in prepared statements (related to BUG#16474).
      mysql-test/r/sp.result:
        Added reference to test case for BUG#16474.
      mysql-test/t/ps.test:
        Added test coverage for "order by" in prepared statements (related to BUG#16474).
      mysql-test/t/sp.test:
        Added reference to test case for BUG#16474.
      sql/sql_select.cc:
        Fixed comment and test for basic_const_item() instead of is_splocal().
      537ec1e6
    • unknown's avatar
      A fix and a test case for Bug#15683 "crash, Function on nested · 1d73c16b
      unknown authored
      VIEWs, Prepared statement": we didn't mark the nested views
      as 'prelockng placeholders' when building the prelocking list. 
      This resulted in these views being processed (merged, materialized)
      before they are actually used. 
      
      
      mysql-test/r/sp-prelocking.result:
        Test results fixed (Bug#15683)
      mysql-test/t/sp-prelocking.test:
        Add a test case for Bug#15683
      sql/sql_view.cc:
        When initializing tables used in a view, inherite 
        its 'prelocking_placeholder' flag. This flag is set when we're 
        opening the view in order to build the prelocking list for a query.
        In this case we should only calculate the list to 
        prelock, and should not merge neither this view nor any of the 
        nested views, of there are any. The flag is used to indicate this 
        mode.
      1d73c16b
  3. 27 Mar, 2006 17 commits
  4. 24 Mar, 2006 13 commits
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-5.0 · 2a704405
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
      
      
      2a704405
    • unknown's avatar
      Fixed bug #17164. · c0579144
      unknown authored
      If the WHERE condition of a query contained an ORed FALSE term
      then the set of tables whose rows cannot serve for null complements
      in outer joins was determined incorrectly. It resulted in blocking 
      possible conversions of outer joins into joins for such queries.
      
      
      mysql-test/r/join_outer.result:
        Added a test case for bug #17164.
      mysql-test/t/join_outer.test:
        Added a test case for bug #17164.
      c0579144
    • unknown's avatar
      Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on transactional · bb7e6828
      unknown authored
      tables corrupt triggers".
      
      It turned out that we also have relied at certain places that
      (new_table != table_name) were always true on Windows and for transactional
      tables. Since our fix for the bug brakes this assumption we have to add new
      flag to pass this information around.
      This code needs to be refactored but I dare not to do this in 5.0.
      
      
      sql/sql_table.cc:
        mysql_alter_table():
          Follow-up for the fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on
          transactional tables corrupt triggers". It turned out that we also have
          relied at certain places that (new_table != table_name) were always true
          on Windows and for transactional tables. Since our fix for the bug brakes
          this assumption we have to add new flag to pass this information around.
          This code needs to be refactored but I dare not to do this in 5.0.
      bb7e6828
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0 · d29e9a20
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      
      d29e9a20
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · 98dfa6a1
      unknown authored
      into  mysql.com:/home/dlenev/mysql-5.0-bg18153
      
      
      98dfa6a1
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 77a92169
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      
      mysql-test/lib/mtr_timer.pl:
        Auto merged
      ndb/src/ndbapi/NdbTransaction.cpp:
        Auto merged
      sql/ha_innodb.cc:
        Auto merged
      77a92169
    • unknown's avatar
      Merge bk-internal:/home/bk/mysql-5.0 · 5d119bf6
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
      
      
      5d119bf6
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0 · 0abaf88c
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
      
      
      0abaf88c
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0 · c62de1d5
      unknown authored
      into  mysql.com:/home/dlenev/mysql-5.0-bg18153
      
      
      c62de1d5
    • unknown's avatar
      Fix for bug #18153 "ALTER/OPTIMIZE/REPAIR on transactional tables corrupt · a389ec0b
      unknown authored
      triggers".
      
      Applying ALTER/OPTIMIZE/REPAIR TABLE statements to transactional table or to
      table of any type on Windows caused disappearance of its triggers.
      Bug was introduced in 5.0.19 by my fix for bug #13525 "Rename table does not
      keep info of triggers" (see comment for sql_table.cc for more info).
      .
      
      
      mysql-test/r/trigger.result:
        Added test-case covering handling of triggers when one does ALTER TABLE which
        should move table to different database.
      mysql-test/t/trigger.test:
        Added test-case covering handling of triggers when one does ALTER TABLE which
        should move table to different database.
      sql/sql_table.cc:
        mysql_alter_table():
          Removal of strdup() which is no longer necessary allows us to preserve
          nice assumption that "(new_db != db || new_table != table_name) indicates
          that table will be renamed. So now we really can use this condition to
          avoid updating trigger definitions when table is not renamed.
          Note that we can't use (alter_info->flags & ALTER_RENAME) condition instead
          since it can be also true when we do "ALTER TABLE t1 RENAME TO t1".
      sql/sql_trigger.cc:
        Table_triggers_list::change_table_name():
          Mentioned assumption that subject table is not renamed to itself in method
          description. Added DBUG_ASSERT() to catch wrong usage of this method.
      mysql-test/r/trigger-trans.result:
        New BitKeeper file ``mysql-test/r/trigger-trans.result''
      mysql-test/t/trigger-trans.test:
        New BitKeeper file ``mysql-test/t/trigger-trans.test''
      a389ec0b
    • unknown's avatar
      Fix 'metaphon' function to correctly calculate the length of the returned string · 7c8acd59
      unknown authored
      
      sql/udf_example.cc:
        Calculate length of returned string correctly
      7c8acd59
    • unknown's avatar
      Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0 · 72470a98
      unknown authored
      into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
      
      
      72470a98
    • unknown's avatar
      If doing write, then peeking is not needed · cebcd282
      unknown authored
      cebcd282
  5. 23 Mar, 2006 1 commit