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 · 8634d343
      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.
      8634d343
    • marko's avatar
      branches/zip: Fix bugs in the creation or dropping of the clustered index · 66f6a5ac
      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.
      66f6a5ac
    • marko's avatar
      branches/zip: Minor cleanup. · c541324b
      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.
      c541324b
    • marko's avatar
      branches/zip: Remove redundant type casts. Change the parameter type · 2c7f6f6a
      marko authored
      of ut_strcmp() from const void* to const char*.
      2c7f6f6a
    • marko's avatar
      branches/zip: dict0mem.h: Minor cleanup. · 064e5aae
      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.
      064e5aae
  4. 15 Aug, 2007 4 commits
    • marko's avatar
      branches/zip: Remove the error code DB_CANNOT_DROP_FOREIGN_INDEX. · 91ee8176
      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.
      91ee8176
    • marko's avatar
      branches/zip: row_mysql_handle_errors(): Replace the if-else with · dddb6592
      marko authored
      switch-case.
      dddb6592
    • marko's avatar
      branches/zip: Performance improvement: · f2186190
      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().
      f2186190
    • marko's avatar
      branches/zip: Minor cleanup. · 6b7c6cb3
      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.
      6b7c6cb3
  5. 13 Aug, 2007 8 commits
  6. 10 Aug, 2007 3 commits
    • marko's avatar
      branches/zip: Add changes that accidentally omitted from r1698: · 4d793ff8
      marko authored
      innodb-index.test, innodb-index.result: Add a test for creating
      a PRIMARY KEY on a column that contains a NULL value.
      4d793ff8
    • marko's avatar
      branches/zip: When creating a PRIMARY KEY, flag all its columns NOT NULL. · e2052eba
      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.
      e2052eba
    • marko's avatar
      branches/zip: Minor cleanup. · f304ce10
      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).
      f304ce10
  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. · f2538af4
      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.
      f2538af4