1. 10 Jul, 2006 3 commits
    • gkodinov/kgeorge@macbook.gmz's avatar
      Merge macbook.gmz:/Users/kgeorge/mysql/work/B14553-4.1-opt · 8f71e47a
      gkodinov/kgeorge@macbook.gmz authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/B14553-5.0-opt
      8f71e47a
    • gkodinov/kgeorge@macbook.gmz's avatar
      Merge rakia:mysql/4.1/B14553 · 893e9276
      gkodinov/kgeorge@macbook.gmz authored
      into  macbook.gmz:/Users/kgeorge/mysql/work/B14553-4.1-opt
      893e9276
    • gkodinov/kgeorge@mysql.com/rakia.(none)'s avatar
      BUG#14553: NULL in WHERE resets LAST_INSERT_ID · 2c9f5cc7
      To make MySQL compatible with some ODBC applications, you can find
      the AUTO_INCREMENT value for the last inserted row with the following query:
       SELECT * FROM tbl_name WHERE auto_col IS NULL.
      This is done with a special code that replaces 'auto_col IS NULL' with
      'auto_col = LAST_INSERT_ID'.
      However this also resets the LAST_INSERT_ID to 0 as it uses it for a flag
      so as to ensure that only the first SELECT ... WHERE auto_col IS NULL
      after an INSERT has this special behaviour.
      In order to avoid resetting the LAST_INSERT_ID a special flag is introduced
      in the THD class. This flag is used to restrict the second and subsequent
      SELECTs instead of LAST_INSERT_ID.
      2c9f5cc7
  2. 07 Jul, 2006 1 commit
  3. 06 Jul, 2006 6 commits
  4. 04 Jul, 2006 3 commits
    • sergefp@mysql.com's avatar
      d581287b
    • gkodinov@mysql.com's avatar
      Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean · ae0a3e0d
      gkodinov@mysql.com authored
      into  mysql.com:/home/kgeorge/mysql/5.0/B16110
      ae0a3e0d
    • gkodinov@mysql.com's avatar
      Bug #16110: insert permitted into view col w/o default value · b64089e6
      gkodinov@mysql.com authored
      When compiling INSERT statements the check whether columns are provided values
      depends on the flag whether a field is used in that query (Field::query_id).
      However the check for updatability of VIEW columns (check_view_insertability())
      was calling fix_fields() and thus setting the Field::query_id even for the 
      view fields that are not referenced in the current INSERT statement.
      So the correct check for columns without default values 
      ( check_that_all_fields_are_given_values() ) is assuming that all the VIEW
      columns were mentioned in the INSERT field list and was issuing no 
      warnings or errors.
      Fixed check_view_insertability() to turn off the flag whether or not to set
      Field::query_id (THREAD::set_query_id) before calling fix fields and restore
      it when it's done.
      b64089e6
  5. 29 Jun, 2006 27 commits