1. 17 May, 2007 8 commits
  2. 16 May, 2007 13 commits
    • dkatz@damien-katzs-computer.local's avatar
      Bug #27119 server crash with integer division by zero during filesort on huge result · 41dac222
      dkatz@damien-katzs-computer.local authored
      Added checks to detect integer overflow and fixed other bugs on the error path.
      41dac222
    • msvensson@pilot.blaudden's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint · 4fed3bd4
      msvensson@pilot.blaudden authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      4fed3bd4
    • msvensson@pilot.blaudden's avatar
    • msvensson@pilot.blaudden's avatar
      Bug#21103: "DATE column not compared as DATE" · 290b9750
      msvensson@pilot.blaudden authored
      BDB results fixed (not p/o 5.1 fix)
      290b9750
    • msvensson@pilot.blaudden's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/bk_fix/mysql-5.0-maint-patch4 · 3d723860
      msvensson@pilot.blaudden authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      3d723860
    • msvensson@pilot.blaudden's avatar
      Backport of TIME->MYSQL_TIME / Y2K fixset · a65d12a8
      msvensson@pilot.blaudden authored
         
      Made year 2000 handling more uniform
      Removed year 2000 handling out from calc_days()
      The above removes some bugs in date/datetimes with year between 0 and 200
      Now we get a note when we insert a datetime value into a date column
      For default values to CREATE, don't give errors for warning level NOTE
      Fixed some compiler failures
      Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
      Removed duplicate typedef TIME and replaced it with MYSQL_TIME
      
      Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
      Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
      Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
       
      a65d12a8
    • msvensson@pilot.blaudden's avatar
      Merge pilot.blaudden:/home/msvensson/mysql/bk_fix/mysql-5.0-maint-patch3 · ab61cfcb
      msvensson@pilot.blaudden authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      ab61cfcb
    • msvensson@pilot.blaudden's avatar
      Merge bk-internal:/home/bk/mysql-5.0-maint · 19618b53
      msvensson@pilot.blaudden authored
      into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
      19618b53
    • msvensson@pilot.blaudden's avatar
      Bug#28223: mysqldump --compact --routines restores from @OLD_SQL_MODE w/o ever setting it · e888128e
      msvensson@pilot.blaudden authored
        - mysqldump generated output that set OLD_SQL_MODE twice, to different values
          (for triggers), or not at all (for routines) in some cases.
      e888128e
    • msvensson@pilot.blaudden's avatar
      Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype · 47d3829f
      msvensson@pilot.blaudden authored
      - Since isinf() portability across various platforms and
        compilers is a complicated question, we should not use
        it directly. Instead, the my_isinf() macro should be used,
        which is defined as an alias to the system-defined isinf()
        if it is safe to use, or a workaround implementation otherwise
      47d3829f
    • kostja@vajra.(none)'s avatar
      Fix a failing assert. · bb2a43dd
      kostja@vajra.(none) authored
      bb2a43dd
    • kostja@vajra.(none)'s avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · f10effe4
      kostja@vajra.(none) authored
      into  vajra.(none):/opt/local/work/mysql-5.0-21483
      f10effe4
    • kostja@vajra.(none)'s avatar
      A fix and a test case for · 747842e1
      kostja@vajra.(none) authored
      Bug#21483 "Server abort or deadlock on INSERT DELAYED with another
      implicit insert"
      Also fixes and adds test cases for bugs:
      20497 "Trigger with INSERT DELAYED causes Error 1165"
      21714 "Wrong NEW.value and server abort on INSERT DELAYED to a
      table with a trigger".
      Post-review fixes.
      
      Problem:
      In MySQL INSERT DELAYED is a way to pipe all inserts into a
      given table through a dedicated thread. This is necessary for
      simplistic storage engines like MyISAM, which do not have internal
      concurrency control or threading and thus can not
      achieve efficient INSERT throughput without support from SQL layer.
      DELAYED INSERT works as follows:
      For every distinct table, which can accept DELAYED inserts and has
      pending data to insert, a dedicated thread is created to write data
      to disk. All user connection threads that attempt to
      delayed-insert into this table interact with the dedicated thread in
      producer/consumer fashion: all records to-be inserted are pushed
      into a queue of the dedicated thread, which fetches the records and 
      writes them.
      In this design, client connection threads never open or lock
      the delayed insert table.
      This functionality was introduced in version 3.23 and does not take 
      into account existence of triggers, views, or pre-locking.
      E.g. if INSERT DELAYED is called from a stored function, which,
      in turn, is called from another stored function that uses the delayed
      table, a deadlock can occur, because delayed locking by-passes
      pre-locking. Besides:
       * the delayed thread works directly with the subject table through
         the storage engine API and does not invoke triggers
       * even if it was patched to invoke triggers, if triggers,
         in turn, used other tables, the delayed thread would
         have to open and lock involved tables (use pre-locking).
       * even if it was patched to use pre-locking, without deadlock
         detection the delayed thread could easily lock out user 
         connection threads in case when the same table is used both
         in a trigger and on the right side of the insert query: 
         the delayed thread would not release locks until all inserts 
         are complete, and user connection can not complete inserts 
         without having locks on the tables used on the right side of the
         query.
      
      Solution:
      
      These considerations suggest two general alternatives for the
      future of INSERT DELAYED:
       * it is considered a full-fledged alternative to normal INSERT
       * it is regarded as an optimisation that is only relevant 
         for simplistic engines.
      Since we missed our chance to provide complete support of new
      features when 5.0 was in development, the first alternative
      currently renders infeasible.
      However, even the second alternative, which is to detect
      new features and convert DELAYED insert into a normal insert, 
      is not easy to implement.
      The catch-22 is that we don't know if the subject table has triggers
      or is a view before we open it, and we only open it in the
      delayed thread. We don't know if the query involves pre-locking
      until we have opened all tables, and we always first create
      the delayed thread, and only then open the remaining tables.
      This patch detects the problematic scenarios and converts
      DELAYED INSERT to a normal INSERT using the following approach:
       * if the statement is executed under pre-locking (e.g. from
         within a stored function or trigger) or the right
         side may require pre-locking, we detect the situation
         before creating a delayed insert thread and convert the statement
         to a conventional INSERT.
        * if the subject table is a view or has triggers, we shutdown
         the delayed thread and convert the statement to a conventional
         INSERT.
      747842e1
  3. 15 May, 2007 7 commits
  4. 14 May, 2007 4 commits
  5. 12 May, 2007 2 commits
    • ibabaev@bk-internal.mysql.com's avatar
      Merge bk-internal.mysql.com:/data0/bk/mysql-5.0 · 7d006ee5
      ibabaev@bk-internal.mysql.com authored
      into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
      7d006ee5
    • igor@olga.mysql.com's avatar
      Fixed bug #28375: a query with an NOT IN subquery predicate may cause · 11d5f7ee
      igor@olga.mysql.com authored
      a crash when the left operand of the predicate is evaluated to NULL.
      It happens when the rows from the inner tables (tables from the subquery)
      are accessed by index methods with key values obtained by evaluation of
      the left operand of the subquery predicate. When this predicate is
      evaluated to NULL an alternative access with full table scan is used
      to check whether the result set returned by the subquery is empty or not.
      The crash was due to the fact the info about the access methods used for
      regular key values was not properly restored after a switch back from the
      full scan access method had occurred.
      The patch restores this info properly.
      The same problem existed for queries with IN subquery predicates if they
      were used not at the top level of the queries.
      11d5f7ee
  6. 11 May, 2007 6 commits