1. 21 May, 2007 9 commits
  2. 20 May, 2007 1 commit
  3. 18 May, 2007 7 commits
  4. 17 May, 2007 4 commits
    • igor@olga.mysql.com's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 2189c571
      igor@olga.mysql.com authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28337
      2189c571
    • evgen@moonbone.local's avatar
      Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function · 0e3c4f67
      evgen@moonbone.local authored
      is involved.
      
      The Arg_comparator::compare_datetime() comparator caches its arguments if
      they are constants i.e. const_item() returns true. The
      Item_func_get_user_var::const_item() returns true or false based on
      the current query_id and the query_id where the variable was created.
      Thus even if a query can change its value its const_item() still will return
      true. All this leads to a wrong comparison result when an object of the
      Item_func_get_user_var class is involved.
      
      Now the Arg_comparator::can_compare_as_dates() and the
      get_datetime_value() functions never cache result of the GET_USER_VAR()
      function (the Item_func_get_user_var class).
      0e3c4f67
    • gkodinov/kgeorge@macbook.gmz's avatar
      Bug#22855: · a9b348c7
      gkodinov/kgeorge@macbook.gmz authored
      Conversion errors when constructing the condition for an
      IN predicates were treated as if the affected column contains
      NULL. If such a IN predicate is inside NOT we get wrong 
      results.
      Corrected the handling of conversion errors in an IN predicate 
      that is resolved by unique_subquery (through 
      subselect_uniquesubquery_engine).
      a9b348c7
    • igor@olga.mysql.com's avatar
      Fixed bug #28337: wrong results for grouping queries with correlated · 8c34ae26
      igor@olga.mysql.com authored
      subqueries in WHERE conditions.
      This bug was introduced by the patch for bug 27321.
      8c34ae26
  5. 16 May, 2007 17 commits
    • joerg@trift2.'s avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0-build · c9068232
      joerg@trift2. authored
      into  trift2.:/MySQL/M50/push-5.0
      c9068232
    • joerg@trift2.'s avatar
      Merge trift2.:/MySQL/M50/mysql-5.0 · a231b057
      joerg@trift2. authored
      into  trift2.:/MySQL/M50/push-5.0
      a231b057
    • holyfoot/hf@mysql.com/hfmain.(none)'s avatar
      Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 4ac1e986
      holyfoot/hf@mysql.com/hfmain.(none) authored
      into  mysql.com:/home/hf/work/8663/my50-8663
      4ac1e986
    • holyfoot/hf@mysql.com/hfmain.(none)'s avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 28eddbe1
      holyfoot/hf@mysql.com/hfmain.(none) authored
      into  mysql.com:/home/hf/work/8663/my50-8663
      28eddbe1
    • df@pippilotta.erinye.com's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build · 5e541e98
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      5e541e98
    • df@pippilotta.erinye.com's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build-work · fbd59055
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
      fbd59055
    • df@pippilotta.erinye.com's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work · 3bff0c58
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      3bff0c58
    • df@pippilotta.erinye.com's avatar
      Merge bk-internal:/home/bk/mysql-5.0-runtime · 4e0af1af
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      4e0af1af
    • df@pippilotta.erinye.com's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0 · a645ef04
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
      a645ef04
    • df@pippilotta.erinye.com's avatar
      Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build · 2ea846c5
      df@pippilotta.erinye.com authored
      into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
      2ea846c5
    • thek@adventure.(none)'s avatar
      Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime · 6d6674e7
      thek@adventure.(none) authored
      into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
      6d6674e7
    • thek@adventure.(none)'s avatar
      Bug#27415 Text Variables in stored procedures · ed43ceb1
      thek@adventure.(none) authored
       - Problem was reported as a SP variable using itself as 
         right value inside SUBSTR caused corruption of data. 
       - This bug could not be verified in either 5.0bk or 5.1bk
       - Added test case to prevent future regressions.
      ed43ceb1
    • mhansson/martin@linux-st28.site's avatar
      Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt · 364014e4
      mhansson/martin@linux-st28.site authored
      into  linux-st28.site:/home/martin/mysql/src/5.0o-bug27573
      364014e4
    • 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
    • holyfoot/hf@mysql.com/hfmain.(none)'s avatar
      bug #8663 cant use bigint unsigned as input to cast · bb089cea
      holyfoot/hf@mysql.com/hfmain.(none) authored
      in the case of the overflow in the decimal->integer conversion
      we didn't return the proper boundary value, but just the result
      of the conversion we calculated on the moment of the error
      bb089cea
  6. 15 May, 2007 2 commits
    • igor@olga.mysql.com's avatar
      Merge olga.mysql.com:/home/igor/mysql-5.0-opt · 8b829fb1
      igor@olga.mysql.com authored
      into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
      8b829fb1
    • evgen@moonbone.local's avatar
      Bug#28208: Wrong result of a non-const STRING function with a const DATETIME · fbb23326
      evgen@moonbone.local authored
      function.
      
      A wrong  condition was used to check that the
      Arg_comparator::can_compare_as_dates() function calculated the value of the
      string constant. When comparing a non-const STRING function with a constant
      DATETIME function it leads to saving an arbitrary value as a cached value of
      the DATETIME function.
      
      Now the Arg_comparator::set_cmp_func() function initializes the const_value
      variable to the impossible DATETIME value (-1) and this const_value is
      cached only if it was changed by the Arg_comparator::can_compare_as_dates()
      function.
      fbb23326