1. 26 Nov, 2007 1 commit
    • unknown's avatar
      5.0 version of the fix for bug #9481: mysql_insert_id() returns 0 after · fe9bccc3
      unknown authored
      insert ... select.
      
      The 5.0 manual page for mysql_insert_id() does not mention anything
      about INSERT ... SELECT, though its current behavior is incosistent
      with what the manual says about the plain INSERT.
      
      Fixed by changing the AUTO_INCREMENT and mysql_insert_id() handling
      logic in INSERT ... SELECT to be consistent with the INSERT behavior,
      the manual, and the changes in 5.1 introduced by WL3146:
      
      
      - mysql_insert_id() now returns the first automatically generated
      AUTO_INCREMENT value that was successfully inserted by INSERT ... SELECT
      
      -  if an INSERT ... SELECT statement is executed, and no automatically
      generated value is successfully inserted, mysql_insert_id() now returns
      the ID of the last inserted row.
      
      
      sql/sql_class.h:
        Replaced last_insert_id with autoinc_value_of_last_inserted_row to be
        consistent with 5.1 code.
      sql/sql_insert.cc:
        Revised the AUTO_INCREMENT and mysql_insert_id() handling logic in
        INSERT ... SELECT to be consistent with INSERT behavior, the manual, and
        changes in 5.1 introduced by WL3146:
        
        - mysql_insert_id() now returns the first automatically generated
        AUTO_INCREMENT value that was successfully inserted;
        
        -  if an INSERT ... SELECT statement is executed, and no automatically
        generated value is successfully inserted, mysql_insert_id() now returns
        the ID of the last inserted row.
      tests/mysql_client_test.c:
        Backported the test cases related to INSERT ... SELECT and
        mysql_insert_id() from WL3146 patch to 5.0.
      fe9bccc3
  2. 19 Nov, 2007 2 commits
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32376/my50-bug26215 · 9eb49c48
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
      
      
      client/mysql.cc:
        Auto merged
      9eb49c48
    • unknown's avatar
      Changed the help text for --comments to make it clear which option · 6b080fa8
      unknown authored
      disables the option explicitely.
      Changed the option location in code so that --help will show it in
      lexical option order.
      
      This is for bug #26215: mysql command line client should not strip
      comments from SQL statements
      
      
      client/mysql.cc:
        Changed the help text for --comments to make it clear which option
        disables the option explicitely.
        Changed the option location in code so that --help will show it in
        lexical option order.
      6b080fa8
  3. 17 Nov, 2007 7 commits
    • unknown's avatar
      Merge gleb.loc:/work/bk/5.0-opt-32335 · 179246eb
      unknown authored
      into  gleb.loc:/work/bk/5.0-opt
      
      179246eb
    • unknown's avatar
      Fixed bug #32335. · 8aa822ee
      unknown authored
      Comparison of a BIGINT NOT NULL column with a constant arithmetic
      expression that evaluates to NULL caused error 1048: "Column '...'
      cannot be null".
      
      Made convert_constant_item() check if the constant expression is NULL
      before attempting to store it in a field. Attempts to store NULL in a
      NOT NULL field caused query errors.
      
      
      sql/item_cmpfunc.cc:
        Fixed bug #32335.
        1. Made convert_constant_item() check if the constant expression is NULL
           before attempting to store it in a field. Attempts to store NULL in
           a NOT NULL field caused query errors.
        
        2. Also minor bug has been fixed: the thd->count_cuted_fields value
           was not restored in case of successful conversion.
      mysql-test/t/select.test:
        Added test case for bug #32335.
      mysql-test/r/select.result:
        Added test case for bug #32335.
      8aa822ee
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31158/my41-31158 · da9d774f
      unknown authored
      into  mysql.com:/home/hf/work/31158/my50-31158
      
      da9d774f
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · 895e939c
      unknown authored
      into  mysql.com:/home/hf/work/31158/my41-31158
      
      895e939c
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 991c3971
      unknown authored
      into  mysql.com:/home/hf/work/31158/my50-31158
      
      
      sql/field.cc:
        Auto merged
      991c3971
    • unknown's avatar
      merging · be99cfef
      unknown authored
      be99cfef
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31158/my41-31158 · 1dfe7db5
      unknown authored
      into  mysql.com:/home/hf/work/31158/my50-31158
      
      
      mysql-test/t/gis.test:
        Auto merged
      sql/field.h:
        Auto merged
      sql/item_geofunc.cc:
        Auto merged
      mysql-test/r/gis.result:
        merging
      sql/field.cc:
        merging
      1dfe7db5
  4. 16 Nov, 2007 4 commits
  5. 15 Nov, 2007 1 commit
  6. 14 Nov, 2007 4 commits
  7. 13 Nov, 2007 6 commits
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31305/my41-31305 · 509582f4
      unknown authored
      into  mysql.com:/home/hf/work/31305/my50-31305
      
      509582f4
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 12997acd
      unknown authored
      into  mysql.com:/home/hf/work/31305/my50-31305
      
      12997acd
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · 38d1b2f5
      unknown authored
      into  mysql.com:/home/hf/work/31305/my41-31305
      
      38d1b2f5
    • unknown's avatar
      Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 062f27ee
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt
      
      
      sql/item.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      062f27ee
    • unknown's avatar
      Bug #31562: HAVING and lower case · 5dc81f4f
      unknown authored
      The columns in HAVING can reference the GROUP BY and 
      SELECT columns. There can be "table" prefixes when
      referencing these columns. And these "table" prefixes
      in HAVING use the table alias if available.
      This means that table aliases are subject to the same
      storage rules as table names and are dependent on 
      lower_case_table_names in the same way as the table 
      names are.
      Fixed by :
      1. Treating table aliases as table names
      and make them lowercase when printing out the SQL
      statement for view persistence.
      2. Using case insensitive comparison for table 
      aliases when requested by lower_case_table_names
      
      
      mysql-test/r/lowercase_view.result:
        Bug #31562: test case
      mysql-test/t/lowercase_view.test:
        Bug #31562: test case
      sql/item.cc:
        Bug #31562: lower_case_table_name contious comparison
        when searching in GROUP BY
      sql/sql_base.cc:
        Bug #31562: lower_case_table_name contious comparison
        when searching in SELECT
      sql/sql_select.cc:
        Bug #31562: treat table aliases as table names
        and make them lowercase when printing
      5dc81f4f
    • unknown's avatar
      Bug #31158 Spatial, Union, LONGBLOB vs BLOB bug (crops data) · fcfd51f6
      unknown authored
      max_length parameter for BLOB-returning functions must be big enough
      for any possible content. Otherwise the field created for a table
      will be too small.
      
      
      mysql-test/r/gis.result:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        test result
      mysql-test/t/gis.test:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        test case
      sql/field.cc:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_field_size used instead of numeric value
      sql/field.h:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_field_size constant defined
      sql/item_geofunc.cc:
        Bug #31158  Spatial, Union, LONGBLOB vs BLOB bug (crops data)
        
        max_length parameter fixed
      fcfd51f6
  8. 12 Nov, 2007 10 commits
    • unknown's avatar
      Merge mattiasj@bk-internal.mysql.com:/home/bk/mysql-5.0-engines · f01556d5
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
      
      f01556d5
    • unknown's avatar
      Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-main · 3b7f9911
      unknown authored
      into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
      
      3b7f9911
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines · 90e09bfb
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      90e09bfb
    • unknown's avatar
      symlink.test, symlink.result: · eb3c917d
      unknown authored
        Use proper variable for test.
      
      
      mysql-test/t/symlink.test:
        Use proper variable for test.
      mysql-test/r/symlink.result:
        Use proper variable for test.
      eb3c917d
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines · 7cc910a0
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
      
      
      mysql-test/r/symlink.result:
        Auto merged
      mysql-test/t/symlink.test:
        Auto merged
      mysys/my_symlink2.c:
        Auto merged
      7cc910a0
    • unknown's avatar
      After merge fix. · e8e897bc
      unknown authored
      e8e897bc
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0 · 0f7e921a
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
      
      
      mysys/my_symlink2.c:
        Auto merged
      mysql-test/r/symlink.result:
        SCCS merged
      mysql-test/t/symlink.test:
        SCCS merged
      0f7e921a
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug30666/my50-bug29131 · eb4c1727
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
      
      
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/select.result:
        Manual merge.
      mysql-test/t/select.test:
        Manual merge.
      eb4c1727
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31305/my41-31305 · b07eb0f1
      unknown authored
      into  mysql.com:/home/hf/work/31305/my50-31305
      
      
      BitKeeper/etc/ignore:
        auto-union
      myisam/mi_dynrec.c:
        Auto merged
      b07eb0f1
    • unknown's avatar
      Bug #31305 myisam tables crash when they are near capacity. · 23efd897
      unknown authored
      When we insert a record into MYISAM table which is almost 'full',
      we first write record data in the free space inside a file, and then
      check if we have enough space after the end of the file.
      So if we don't have the space, table will left corrupted.
      Similar error also happens when we updata MYISAM tables.
      
      Fixed by modifying write_dynamic_record and update_dynamic_record functions
      to check for free space before writing parts of a record
      
      
      BitKeeper/etc/ignore:
        Added libmysql_r/client_settings.h libmysqld/ha_blackhole.cc to the ignore list
      myisam/mi_dynrec.c:
        Bug #31305 myisam tables crash when they are near capacity.
        
        now we check space left in table in write_dynamic_record
        and update_dynamic_record functions.
        If we don't have enough room for the new (updated) record, return with the
        error.
      mysql-test/r/almost_full.result:
        New BitKeeper file ``mysql-test/r/almost_full.result''
      mysql-test/t/almost_full.test:
        New BitKeeper file ``mysql-test/t/almost_full.test''
      23efd897
  9. 10 Nov, 2007 5 commits
    • unknown's avatar
      Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · 26126ce0
      unknown authored
      into  mysql.com:/misc/mysql/31700/50-31700
      
      
      sql/sql_select.cc:
        Auto merged
      26126ce0
    • unknown's avatar
      Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt · c0df12e3
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      c0df12e3
    • unknown's avatar
      Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28076 · 55fad0d6
      unknown authored
      into  gleb.loc:/home/uchum/work/bk/5.0-opt
      
      
      sql/item_cmpfunc.cc:
        Auto merged
      55fad0d6
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32202/my50-bug26215 · 158e4dd1
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
      
      
      sql/sql_select.cc:
        Auto merged
      158e4dd1
    • unknown's avatar
      Fixed bug #28076: inconsistent binary/varbinary comparison. · 419eb9aa
      unknown authored
      After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
      clause returned a wrong result: the VARBINARY value was illegally padded
      with zero bytes to the length of the BINARY column for the index search.
      (<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.
      
      
      sql/item.cc:
        Fixed bug #28076.
        The Item_cache_str::save_in_field method has been overloaded
        to check cached values for an illegal padding before the saving
        into a field.
      sql/item.h:
        Fixed bug #28076.
        The Item_cache_str::is_varbinary flag has been added and the
        Item_cache_str::save_in_field method has been overloaded to prevent
        cached values from an illegal padding when saving in fields.
        The signature of the Item_cache::get_cache method has been
        changed to accept pointers to Item instead of Item_result
        values.
      sql/item_cmpfunc.cc:
        Fixed bug #28076.
        The Item_in_optimizer::fix_left method has been modified to
        to call Item_cache::get_cache in a new manner.
      sql/item_subselect.cc:
        Fixed bug #28076.
        The subselect_indexsubquery_engine::exec method has been
        modified to take into account field conversion errors
        (copy&paste from subselect_uniquesubquery_engine::exec).
      sql/sp_rcontext.cc:
        Fixed bug #28076.
        The sp_rcontext::create_case_expr_holder method has been
        modified to call Item_cache::get_cache in a new manner.
      sql/sp_rcontext.h:
        Fixed bug #28076.
        The sp_rcontext::create_case_expr_holder method signature
        has been modified to pass Item pointers to the
        Item_cache::get_cache method.
      sql/sql_class.cc:
        Fixed bug #28076.
        The select_max_min_finder_subselect::send_data method has been
        modified to call Item_cache::get_cache in a new manner.
      mysql-test/t/subselect.test:
        Added test case for bug #28076.
      mysql-test/r/subselect.result:
        Added test case for bug #28076.
      419eb9aa