1. 21 Aug, 2007 5 commits
  2. 20 Aug, 2007 8 commits
  3. 16 Aug, 2007 5 commits
    • marko's avatar
      branches/zip: Rename mem_heap_calloc() and mem_calloc() to · e1c3be5e
      marko authored
      mem_heap_zalloc() and mem_zalloc(), because calloc() in the C runtime
      library takes two size parameters, not one.
      
      mem_heap_zalloc(): Add debug assertions.  Document that the return value
      is never NULL.
      e1c3be5e
    • marko's avatar
      branches/zip: Fix bugs in the creation or dropping of the clustered index · 1bbbcbfe
      marko authored
      (PRIMARY KEY or UNIQUE INDEX on NOT NULL columns).
      
      innodb-index.test: Remove the --replace_regex directives.  Replace correct
      values to the "Duplicate entry" messages.  This will cause the test to
      fail until we somehow return the duplicate key values to MySQL.
      Add test cases for creating or dropping UNIQUE INDEX or PRIMARY KEY.
      
      innobase_copy_index_def(): Allow the function to copy a clustered index
      definition to a secondary one (UNIQUE INDEX).
      
      innobase_create_key_def(): Check the NOT NULL flag from the correct
      place.  Copy the clustered index if it is a UNIQUE INDEX.
      
      ha_innobase::prepare_drop_index(): Refuse to drop the clustered index.
      1bbbcbfe
    • marko's avatar
      branches/zip: Minor cleanup. · 62295123
      marko authored
      ha_innobase::add_index(), ha_innobase::prepare_drop_index():
      Remove the redundant thd_test_options() calls.
      The options are tested in check_trx_exists().
      
      ha_innobase::prepare_drop_index(): key cannot be NULL; remove the tests.
      Move the condition for checking foreign keys outside of the loop.
      Remove the redundant error log printout about foreign key dependency.
      62295123
    • marko's avatar
      branches/zip: Remove redundant type casts. Change the parameter type · 31ba41df
      marko authored
      of ut_strcmp() from const void* to const char*.
      31ba41df
    • marko's avatar
      branches/zip: dict0mem.h: Minor cleanup. · 78618828
      marko authored
      Remove the unused constant DICT_NOT_READY.
      Make dict_index_t::type a bit-field, and move it next to other bit-fields.
      Add a const qualifier to dict_index_t::name.
      78618828
  4. 15 Aug, 2007 4 commits
    • marko's avatar
      branches/zip: Remove the error code DB_CANNOT_DROP_FOREIGN_INDEX. · c67c3b90
      marko authored
      It was only set by ha_innobase::prepare_drop_index(), which can return
      the appropriate MySQL error code (HA_ERR_DROP_INDEX_FK) directly.
      
      ha_innobase::add_index(): Correct the function comment.
      
      ha_innobase::prepare_drop_index(): Correct the function comment.
      Return MySQL error codes directly.
      
      ha_innobase::final_drop_index(): Correct the function comment.
      c67c3b90
    • marko's avatar
      branches/zip: row_mysql_handle_errors(): Replace the if-else with · a0f9faf6
      marko authored
      switch-case.
      a0f9faf6
    • marko's avatar
      branches/zip: Performance improvement: · 6fe4dd01
      marko authored
      row_merge_buf_add(): Add a prefetch instruction to row->fields.
      Eliminate a variable from the copying loop, and move the termination
      condition to the end of the loop.
      
      row_merge_build_indexes(): Remove the second call to
      trx_start_if_not_started().
      6fe4dd01
    • marko's avatar
      branches/zip: Minor cleanup. · 9be35934
      marko authored
      trx_t: Change the type of error_info from void* to const dict_index_t*.
      
      trx_get_error_info(): Add const qualifier to trx_t*.  Make this an
      inline function.
      9be35934
  5. 13 Aug, 2007 8 commits
  6. 10 Aug, 2007 3 commits
    • marko's avatar
      branches/zip: Add changes that accidentally omitted from r1698: · 56c41b13
      marko authored
      innodb-index.test, innodb-index.result: Add a test for creating
      a PRIMARY KEY on a column that contains a NULL value.
      56c41b13
    • marko's avatar
      branches/zip: When creating a PRIMARY KEY, flag all its columns NOT NULL. · 99fbb510
      marko authored
      row_merge_create_temporary_table(): Add the parameter index_defs.
      
      DB_PRIMARY_KEY_IS_NULL: New error code, mapped to ER_PRIMARY_CANT_HAVE_NULL.
      
      row_merge_read_clustered_index(): Replace the parameter "table" with the
      two parameters "old_table" and "new_table".  Detect NULL values of columns
      that are supposed to be NOT NULL.
      
      row_merge_col_prtype(): New auxiliary function, used by
      row_merge_create_temporary_table() to flag NOT NULL any columns
      contained in an added PRIMARY KEY.
      99fbb510
    • marko's avatar
      branches/zip: Minor cleanup. · 1d99fcc5
      marko authored
      innobase_copy_index_field_def(): Remove parameter heap.  The field->name
      will not be deallocated before the copied index has been added to the
      data dictionary cache.
      
      innobase_copy_index_def(): Add const qualifier to dict_index_t*.
      Add an assertion !dict_index_is_clust(index).
      
      ha_innobase::add_index(): Add the missing user_thd parameter to the
      convert_error_code_to_mysql() call that was forgotten from r1686.
      
      merge_index_field_struct: Add const qualifier to field_name.
      
      merge_index_def_struct: Add const qualifier to name.
      
      row_merge_build_indexes(): Improve the function comment.
      
      row_merge_drop_table(): Remove bogus assertion ut_a(table->to_be_dropped).
      1d99fcc5
  7. 08 Aug, 2007 6 commits
  8. 03 Aug, 2007 1 commit
    • marko's avatar
      branches/zip: Fix memory management errors in row_merge_buf_t. · 3e7e12c5
      marko authored
      row_merge_buf_create_low(): Swap the parameters max_tuples and buf_size,
      because the callers had them swapped.  Add debug assertions about
      these parameters.
      
      row_merge_buf_empty(): Return the emptied buffer.  In some cases, the
      buffer may be relocated.
      3e7e12c5