An error occurred fetching the project authors.
  1. 28 Oct, 2008 1 commit
  2. 23 Oct, 2008 1 commit
    • sunny's avatar
      branches/zip: · f3c6e06e
      sunny authored
      Merge revisions 2852:2854 from branches/5.1:
      
        ------------------------------------------------------------------------
        r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
        Changed paths:
           M /branches/5.1/dict/dict0dict.c
           M /branches/5.1/dict/dict0mem.c
           M /branches/5.1/handler/ha_innodb.cc
           M /branches/5.1/handler/ha_innodb.h
           M /branches/5.1/include/dict0dict.h
           M /branches/5.1/include/dict0mem.h
           M /branches/5.1/row/row0mysql.c
        
        branches/5.1: Backport changes from branches/zip r2725
        
        Simplify the autoinc initialization code. This removes the
        non-determinism related to reading the table's autoinc value for the first
        time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
        bytes because we don't need the dict_table_t::autoinc_inited field anymore.
        
        Bug#39830 Table autoinc value not updated on first insert.
        Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
        Bug#36411 Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc
        rb://16
        
        
        ------------------------------------------------------------------------
      f3c6e06e
  3. 04 Oct, 2008 1 commit
    • sunny's avatar
      branches/zip: Simplify the autoinc initialization code. This removes the · 47db86be
      sunny authored
      non-determinism related to reading the table's autoinc value for the first
      time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
      bytes because we don't need the dict_table_t::autoinc_inited field anymore.
      
      This also fixes Bug#39830 Table autoinc value not updated on first insert.
      rb://16
      47db86be
  4. 18 Sep, 2008 1 commit
    • marko's avatar
      branches/zip: When creating an index in innodb_strict_mode, check that · 3b2f5c05
      marko authored
      the maximum record size will never exceed the B-tree page size limit.
      For uncompressed tables, there should always be enough space for two
      records in an empty B-tree page.  For compressed tables, there should
      be enough space for storing two node pointer records or one data
      record in an empty page in uncompressed format.
      
      dict_build_table_def_step(): Remove the inaccurate check for table row
      size.
      
      dict_index_too_big_for_tree(): New function: check if the index
      records would be too big for a B-tree page.
      
      dict_index_add_to_cache(): Add the parameter "strict".  Invoke
      dict_index_too_big_for_tree() if it is set.
      
      trx_is_strict(), thd_is_strict(): New functions, for determining if
      innodb_strict_mode is enabled for the current transaction.
      
      dict_create_index_step(): Pass the new parameter strict of
      dict_index_add_to_cache() as trx_is_strict(trx).  All other callers
      pass it as FALSE.
      
      innodb.test: Enable innodb_strict_mode before attempting to create a
      table with a too big record size.
      
      innodb-zip.test: Remove the test of inserting random data.  Add tests
      for checking that the maximum record lengths are enforced at table
      creation time.
      3b2f5c05
  5. 09 Sep, 2008 1 commit
    • marko's avatar
      branches/zip: ha_innobase::prepare_drop_index(): When there is a · 31ef5d07
      marko authored
      foreign key constraint, find a truly equivalent index for it.
      If none is available, refuse to drop the index.  MySQL can drop
      an index when creating a "stronger" index.
      
      This was reported as Mantis issue #70 and MySQL Bug #38786.
      
      innodb-index.test: Add a test case.
      
      dict_foreign_find_equiv_index(): New function, to replace the
      incorrectly written function dict_table_find_equivalent_index().
      
      dict_table_replace_index_in_foreign_list(): Simplify the implementation.
      31ef5d07
  6. 21 Aug, 2008 1 commit
    • marko's avatar
      branches/zip: Minor cleanup. · 157b8eeb
      marko authored
      dict_table_get_referenced_constraint(), dict_table_get_foreign_constraint():
      Simplify the iteration loop.
      
      dict_table_find_equivalent_index(): Correct the function comment.
      157b8eeb
  7. 20 Aug, 2008 1 commit
  8. 17 Mar, 2008 2 commits
  9. 10 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Implement the configuration parameter and settable global · a9ae7311
      marko authored
      variable innodb_file_format.  Implement file format version stamping of
      *.ibd files and SYS_TABLES.TYPE.
      
      This change breaks introduces an incompatible change for for
      compressed tables.  We can do this, as we have not released yet.
      
      innodb-zip.test: Add tests for stricter KEY_BLOCK_SIZE and ROW_FORMAT
      checks.
      
      DICT_TF_COMPRESSED_MASK, DICT_TF_COMPRESSED_SHIFT: Replace with
      DICT_TF_ZSSIZE_MASK, DICT_TF_ZSSIZE_SHIFT.
      
      DICT_TF_FORMAT_MASK, DICT_TF_FORMAT_SHIFT, DICT_TF_FORMAT_51,
      DICT_TF_FORMAT_ZIP: File format version, stored in table->flags,
      in the .ibd file header, and in SYS_TABLES.TYPE.
      
      dict_create_sys_tables_tuple(): Write the table flags to SYS_TABLES.TYPE
      if the format is at least DICT_TF_FORMAT_ZIP.  For old formats
      (DICT_TF_FORMAT_51), write DICT_TABLE_ORDINARY as the table type.
      
      DB_TABLE_ZIP_NO_IBD: Remove the error code.  The error handling is done
      in ha_innodb.cc; as a failsafe measure, dict_build_table_def_step() will
      silently clear the compression and format flags instead of returning this
      error.
      
      dict_mem_table_create(): Assert that no extra bits are set in the flags.
      
      dict_sys_tables_get_zip_size(): Rename to dict_sys_tables_get_flags().
      Check all flag bits, and return ULINT_UNDEFINED if the combination is
      unsupported.
      
      dict_boot(): Document the SYS_TABLES columns N_COLS and TYPE.
      
      dict_table_get_format(), dict_table_set_format(),
      dict_table_flags_to_zip_size(): New accessors to table->flags.
      
      dtuple_convert_big_rec(): Introduce the auxiliary variables
      local_len, local_prefix_len.  Store a 768-byte prefix locally
      if the file format is less than DICT_TF_FORMAT_ZIP.
      
      dtuple_convert_back_big_rec(): Restore the columns.
      
      srv_file_format: New variable: innodb_file_format.
      
      fil_create_new_single_table_tablespace(): Replace the parameter zip_size
      with table->flags.
      
      fil_open_single_table_tablespace(): Replace the parameter zip_size_in_k
      with table->flags.  Check the flags.
      
      fil_space_struct, fil_space_create(), fil_op_write_log():
      Replace zip_size with flags.
      
      fil_node_open_file(): Note a TODO item for InnoDB Hot Backup.
      Check that the tablespace flags match.
      
      fil_space_get_zip_size(): Rename to fil_space_get_flags().  Add a
      wrapper for fil_space_get_zip_size().
      
      fsp_header_get_flags(): New function.
      
      fsp_header_init_fields(): Replace zip_size with flags.
      
      FSP_SPACE_FLAGS: New name for the tablespace flags.  This field used
      to be called FSP_PAGE_ZIP_SIZE, or FSP_LOWEST_NO_WRITE.  It has always
      been written as 0 in MySQL/InnoDB versions 4.1 to 5.1.
      
      MLOG_ZIP_FILE_CREATE: Rename to MLOG_FILE_CREATE2.  Add a 32-bit
      parameter for the tablespace flags.
      
      ha_innobase::create(): Check the table attributes ROW_FORMAT and
      KEY_BLOCK_SIZE.  Issue errors if they are inappropriate, or warnings
      if the inherited attributes (in ALTER TABLE) will be ignored.
      
      PAGE_ZIP_MIN_SIZE_SHIFT: New constant: the 2-logarithm of PAGE_ZIP_MIN_SIZE.
      a9ae7311
  10. 18 Feb, 2008 1 commit
  11. 25 Jan, 2008 1 commit
  12. 19 Dec, 2007 1 commit
    • marko's avatar
      branches/zip: Implement a limit for the size of undo log records. · adbb92be
      marko authored
      innodb-index.test: Add a test with a large number of externally stored
      columns.  Check that there may not be prefix indexes on too many columns.
      
      dict_index_too_big_for_undo(): New function: Check if the undo log may
      overflow.
      
      dict_index_add_to_cache(): Return DB_SUCCESS or DB_TOO_BIG_RECORD.
      Postpone the creation and linking of some data structures, so that
      when dict_index_too_big_for_undo() holds, it will be easier to clean up.
      Check the return status in all callers.
      adbb92be
  13. 07 Dec, 2007 1 commit
    • marko's avatar
      branches/zip: dict_table_copy_types(): Initialize all fields to the SQL NULL · 7c5511ef
      marko authored
      value.  Document this change in behaviour, and make all callers invoke
      the function right after dtuple_create().
      
      dict_create_sys_fields_tuple(): Add a missing "break" statement to the loop
      that checks if there are any column prefixes in the index.
      
      row_get_prebuilt_insert_row(): Do not set the fields to the SQL NULL value,
      now that dict_table_copy_types() takes care of it.
      7c5511ef
  14. 01 Oct, 2007 1 commit
  15. 26 Sep, 2007 1 commit
    • marko's avatar
      branches/zip: Minor cleanup. · f44bec19
      marko authored
      dict_find_index_by_max_id(): Rename this static function to its
      only caller, dict_table_get_index_by_max_id().
      
      dict_table_get_index_by_max_id(): Copy the function comment from
      dict_find_index_by_max_id().
      f44bec19
  16. 24 Sep, 2007 1 commit
  17. 19 Sep, 2007 1 commit
  18. 05 Sep, 2007 1 commit
    • marko's avatar
      branches/zip: Simplify crash recovery in fast index creation. · 84ff5781
      marko authored
      trx_t: Remove dict_undo_list and dict_redo_list.
      
      innobase_create_temporary_tablename(): Replace TEMP_TABLE_PREFIX with
      a table name suffix "#1" or "#2".  In this way, the user can restore
      precious data, should anything go wrong.  It is possible to reach an
      inconsistent state, because the creation, deletion and renaming of
      single-table tablespaces are not transactional.
      
      ut_print_namel(), fil_make_ibd_name(), innobase_rename_table(): Remove
      the special treatment of TEMP_TABLE_PREFIX.
      
      Introduce TEMP_INDEX_PREFIX == 0xff for temporary indexes.  This byte
      cannot occur in index names since MySQL 4.1.  However, it might have
      been possible to use this byte in MySQL 4.0.
      
      recv_recovery_from_checkpoint_finish(): Call the new function
      row_merge_drop_temp_indexes(), to drop all indexes whose name starts
      with the byte 0xff.
      
      row_merge_rename_indexes(): Renamed from row_merge_rename_index().
      Remove the parameter "index".
      
      row_drop_table_for_mysql(): Unconditionally call trx_commit_for_mysql().
      
      row_drop_table_for_mysql_no_commit(): Correct the function commit,
      based on the corrected comment of row_drop_table_for_mysql().  Rely on
      table->to_be_dropped instead of TEMP_TABLE_PREFIX.
      
      ha_innobase::add_index(): Simplify the control flow.
      84ff5781
  19. 21 Aug, 2007 1 commit
  20. 13 Aug, 2007 1 commit
    • marko's avatar
      branches/zip: Add some const qualifiers to dict_index_t* and dict_table_t*. · e0009cd4
      marko authored
      innobase_create_key_def(), row_table_got_default_clust_index(),
      row_get_mysql_key_number_for_index(): Add a const qualifier.
      
      dict_table_get_first_index(), dict_table_get_next_index(): Define
      as a const-preserving macro.  Preserve the old function for UNIV_DEBUG,
      but add a const qualifier to the parameter and cast away the constness.
      e0009cd4
  21. 08 Aug, 2007 1 commit
  22. 02 Aug, 2007 1 commit
    • marko's avatar
      branches/zip: Ensure that the dictionary updates are atomic by keeping · 60c44c3a
      marko authored
      the data dictionary locked across the operations.
      
      dict_table_decrement_handle_count(), row_prebuilt_free(): Add the flag
      dict_locked, to prevent the acquisition of dict_sys->mutex.
      
      innobase_rename_table(): Rename commit_flag to lock_and_commit,
      and do not acquire dict_sys->mutex or flush the log unless the flag is set.
      Remove bogus comment about utility threads, because the threads will
      be waken up by the upper-level function ha_innobase::rename_table().
      
      ha_innobase::add_index(): After creating a primary key, hold dict_sys->mutex
      across all dictionary operations.
      60c44c3a
  23. 01 Aug, 2007 1 commit
  24. 20 Jun, 2007 1 commit
    • marko's avatar
      branches/zip: Enable calls to inlined InnoDB functions in ha_innodb.cc, · 8b40a79c
      marko authored
      now that all of InnoDB code is built from a single Makefile and it should
      not be possible to build the modules with mutually incompatible options.
      
      #define INSIDE_HA_INNOBASE_CC: Remove.
      
      srv_sizeof_trx_t_in_ha_innodb_cc: Remove.
      
      dict_table_get_low_noninlined(): Remove.  This function was unused.
      
      Remove all _noninline functions.  Remove the _noninline suffix from
      all function calls in ha_innodb.cc.
      8b40a79c
  25. 12 Jun, 2007 1 commit
    • marko's avatar
      branches/zip: Correctly print the names of temporary tables and indexes · ae0ae671
      marko authored
      during fast index creation.
      
      TEMP_TABLE_PREFIX: Move the definition from dict0dict.h to ut0ut.h.
      
      ut_print_namel(): Check if the name starts with TEMP_TABLE_PREFIX.
      
      innobase_rename_table(): Print all names with ut_print_name().
      
      row_prebuilt_free(): Replace assert() with ut_a().
      ae0ae671
  26. 08 Jun, 2007 1 commit
    • marko's avatar
      branches/zip: Reimplement merge sort in fast index creation. · 1a8a63d0
      marko authored
      The creation of the primary key does not work.  We will have to flag
      externally stored columns and copy the externally stored part from
      the old table.
      
      row_build_index_for_mysql(): Rename to row_merge_build_indexes().
      Move from row0mysql.c to row0merge.c.
      
      Remove private declarations from row0merge.h.  Make many functions static
      in row0merge.c.
      
      cmp_rec_rec_simple(): A new comparison function.
      
      dict_index_get_min_size(): New function.
      
      OS_FILE_FROM_FD(fd): A macro for converting from int to os_file_t.
      
      rec_convert_dtuple_to_rec_comp(): Make the interface lower-level.
      
      rec_get_converted_size_comp(): Return also extra_size.
      
      UT_SORT_FUNCTION_BODY(): Remove reference to an obsolete test program.
      
      row_rec_to_index_entry_low(): New function.
      
      row0merge.c: Implement merge sort based on file streams instead of
      fixed-size blocks.  Sort the small blocks as arrays of dfield_t*,
      because it is faster than invoking rec_get_offsets() for every
      comparison.
      1a8a63d0
  27. 07 Jun, 2007 1 commit
  28. 06 Jun, 2007 1 commit
  29. 16 Apr, 2007 1 commit
    • marko's avatar
      branches/zip: Clean up fast index creation. · 39dc9f71
      marko authored
      dict_index_is_unique(): New function.
      
      row_merge_rec_fits_to_block(), row_merge_store_rec_to_block():
      Add const qualifiers to rec, offsets.
      
      row_merge_select(): Rename to row_merge_cmp(), simplify the interface.
      
      row_merge_sort_linked_list(): Change the return type to ibool.
      Replace sec_offs1,sec_offs2 with offsets1,offsets2.  Replace offset_heap
      with heap.  Define a func_exit label.
      
      row_merge_block_merge(): Reduce the scope of rec_offsets.
      39dc9f71
  30. 04 Apr, 2007 1 commit
  31. 28 Feb, 2007 1 commit
  32. 19 Feb, 2007 1 commit
  33. 30 Jan, 2007 1 commit
    • marko's avatar
      branches/zip: Avoid memory fragmentation when adding column definitions · 463aaf28
      marko authored
      to tables.
      
      dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
      allocation.  Allow it and "name" to be NULL.  These parameters are NULL
      when creating dummy indexes.
      
      dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
      
      dict_table_get_col_name(): Allow table->col_names to be NULL.
      
      dict_table_add_system_columns(), dict_table_add_to_cache():
      Add the parameter "heap".
      463aaf28
  34. 02 Jan, 2007 1 commit
  35. 16 Nov, 2006 1 commit
  36. 25 Oct, 2006 1 commit
  37. 20 Oct, 2006 1 commit
  38. 19 Oct, 2006 2 commits
    • marko's avatar
      branches/zip: Remove some more casts. · 8919884f
      marko authored
      dict_index_get_nth_col_pos(), dict_index_get_sys_col_pos(),
      dict_index_get_n_fields(), fil_page_get_type():
      Add const qualifier to parameter.
      
      dict_index_get_nth_field(): Implement as a macro unless #ifdef UNIV_DEBUG.
      8919884f
    • marko's avatar
      branches/zip: Remove the casts introduced in r920 and r925. Replace the · fbe4fe60
      marko authored
      accessors returning pointers with macros that preserve const qualifiers.
      In UNIV_DEBUG builds, retain the accessors and cast away constness there.
      
      dfield_get_type(), dfield_get_data(), dtuple_get_nth_field(),
      dict_table_get_nth_col(), dict_table_get_sys_col(): Implement as macro
      unless #ifdef UNIV_DEBUG.
      
      rec_get_nth_field(): Replace with rec_get_nth_field_offs() that does not
      do pointer arithmetics.  Implement rec_get_nth_field() as a macro.
      fbe4fe60