An error occurred fetching the project authors.
  1. 10 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Implement the configuration parameter and settable global · 86361e03
      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.
      86361e03
  2. 07 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Make innodb_file_per_table a settable global variable. · c853494e
      marko authored
      There is one consideration: fil_init() chooses the tablespace hash size
      based on the initial value of srv_file_per_table.  However, this is nothing
      new: InnoDB could be started with innodb_file_per_table=0 even though
      *.ibd files exist.
      
      srv_file_per_table: Declare as my_bool instead of ibool, because
      MYSQL_SYSVAR_BOOL() expects a pointer to my_bool.  Document the
      variable also in srv0srv.h.
      
      innobase_start_or_create_for_mysql(): Note why it is OK to temporarily
      clear srv_file_per_table.
      
      innobase_file_per_table: Remove.
      c853494e
  3. 29 Feb, 2008 1 commit
    • calvin's avatar
      branches/zip: row_raw_format_str_convert(): Rename to · 149298b7
      calvin authored
      innobase_raw_format(), move the definition from row0row.c to 
      ha_innodb.cc. After this change, row0row.c no longer references 
      system_charset_info (Mantis issue #17). Patch prepared by Vasil, 
      tested by Calvin, and reviewed by Marko.
      149298b7
  4. 27 Feb, 2008 1 commit
    • vasil's avatar
      branches/zip: · 26402257
      vasil authored
      Use innobase_strcasecmp() insteaed of strcasecmp() in i_s.cc and get rid
      of strings.h (that file is not present on Windows).
      
      Move the prototype of innobase_strcasecmp() from ha_innodb.cc and
      dict0dict.c to ha_prototypes.h.
      
      Approved by:	Heikki
      26402257
  5. 18 Feb, 2008 1 commit
  6. 06 Feb, 2008 1 commit
    • marko's avatar
      branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global · 2c2b06ad
      marko authored
      symbols.  Use it for all definitions of non-static variables and functions.
      
      lexyy.c, make_flex.sh: Declare yylex as UNIV_INTERN, not static.  It is
      referenced from pars0grm.c.
      
      Actually, according to
      	nm .libs/ha_innodb.so|grep -w '[ABCE-TVXYZ]'
      the following symbols are still global:
      
      * The vtable for class ha_innodb
      * pars0grm.c: The function yyparse() and the variables yychar, yylval, yynerrs
      
      The required changes to the Bison-generated file pars0grm.c will be addressed
      in a separate commit, which will add a script similar to make_flex.sh.
      
      The class ha_innodb is renamed from class ha_innobase by a #define.  Thus,
      there will be no clash with the builtin InnoDB.  However, there will be some
      overhead for invoking virtual methods of class ha_innodb.  Ideas for making
      the vtable hidden are welcome.  -fvisibility=hidden is not available in GCC 3.
      2c2b06ad
  7. 28 Jan, 2008 1 commit
  8. 23 Jan, 2008 1 commit
    • marko's avatar
      branches/zip: When storing a longer prefix of an externally stored column · 6523ce6f
      marko authored
      to the undo log, also store the original length of the column, so that the
      changes will be correctly undone in transaction rollback or when fetching
      previous versions of the row.
      
      innodb-zip.test: New file, for tests of the compression.
      
      upd_field_t: Add orig_len, the original length of new_val.
      
      btr_push_update_extern_fields(): Restore the original prefix of the column.
      Add the parameter heap where memory will be allocated if necessary.
      
      trx_undo_rec_get_col_val(): Add the output parameter orig_len.
      
      trx_undo_page_report_modify_ext(): New function: Write an externally
      stored column to the undo log.  This is only called from
      trx_undo_page_report_modify(), and this is the only caller of
      trx_undo_page_fetch_ext().
      
      trx_undo_update_rec_get_update(): Read the original length of the column
      prefix to upd_field->orig_len.
      6523ce6f
  9. 15 Jan, 2008 1 commit
    • inaam's avatar
      branches/zip: Merge r2213:2236 from branches/5.1. · 286c4998
      inaam authored
      Forward port of r2236
      Introduce retry/sleep logic as a workaround for a transient bug
      where ::open fails for partitioned tables randomly if we are using
      one file per table.  (Bug #33349)
      
      
      Reviewed by: Heikki
      286c4998
  10. 07 Jan, 2008 1 commit
  11. 17 Dec, 2007 1 commit
  12. 16 Dec, 2007 1 commit
    • vasil's avatar
      branches/zip: · 0845bd2d
      vasil authored
       
      Non-functional change:
       
      Move the prototypes of
      innobase_mysql_prepare_print_arbitrary_thd() and
      innobase_mysql_end_print_arbitrary_thd() from lock0lock.c to
      ha_prototypes.h
      
      Suggested by:	Marko
      Approved by:	Marko
      0845bd2d
  13. 30 Nov, 2007 1 commit
  14. 21 Nov, 2007 2 commits
    • vasil's avatar
      branches/zip: · 193d01e3
      vasil authored
      Add C test for innobase_convert_name() in addition to the mysql-test one.
      193d01e3
    • marko's avatar
      branches/zip: INFORMATION_SCHEMA.INNODB_LOCKS: Quote lock_table, lock_index. · afccd4af
      marko authored
      innodb_information_schema.test. Add tests that display most columns from
      INFORMATION_SCHEMA.INNODB_LOCKS.  Test that quoting of table names works
      and respects SQL_MODE='ANSI_QUOTES'.
      
      innobase_print_identifier(): Remove.
      
      innobase_convert_identifier(): New function,
      based on innobase_print_identifier().
      
      innobase_convert_name(): New function, similar to ut_print_namel(), but
      using a memory buffer.
      
      ut_print_namel(): Use innobase_convert_name().
      
      fill_innodb_locks_from_cache(): Convert lock_table and lock_index by
      calling innobase_convert_name().
      afccd4af
  15. 16 Nov, 2007 1 commit
  16. 07 Nov, 2007 1 commit
    • marko's avatar
      branches/zip: Return a meaningful error message when refusing to create · fe48c366
      marko authored
      a compressed table in the system tablespace.
      
      db0err.h: Introduce the error code DB_TABLE_ZIP_NO_IBD.  Replace the
      #define directives with an enum, to ease future code merges.  These
      error codes are never written out to files or displayed to the user.
      Thus they need not remain constant.
      
      dict_build_table_def_step(): Return DB_TABLE_ZIP_NO_IBD instead of DB_ERROR.
      
      create_table_def(): Report ER_ILLEGAL_HA_CREATE_OPTION "KEY_BLOCK_SIZE"
      when the table creation fails with DB_TABLE_ZIP_NO_IBD.
      fe48c366
  17. 01 Nov, 2007 3 commits
    • marko's avatar
      branches/zip: Allow the symbols in the dynamic InnoDB plugin to be · 17fc32fb
      marko authored
      redefined so that the dynamic plugin can replace the builtin InnoDB
      in MySQL 5.1.
      
      ha_innodb.cc, handler0alter.cc: #include "univ.i" before any other InnoDB
      header files or before defining any symbols
      
      innodb_redefine.h: New file, to contain a mapping of symbols.  The idea
      is that this file will be replaced in the build process; because this
      is a large file that can be generated automatically, it does not make sense
      to keep it under version control.
      
      univ.i: #include "innodb_redefine.h" and #define ha_innobase ha_innodb
      
      Makefile.am (ha_innodb_la_CXXFLAGS): Remove -Dha_innobase=ha_innodb
      
      NOTE: there are still some issues in the source code.  One known issue is
      the #undef mutex_free in sync0sync.h, which will cause the plugin to call the
      function mutex_free in the builtin InnoDB.  The preprocessor symbols defined
      in innodb_redefine.h must not be undefined or redefined anywhere in the code.
      17fc32fb
    • marko's avatar
      branches/zip: Remove the parameter innodb_dynamic, and always call the · 3037cca0
      marko authored
      plugin "InnoDB", not "InnoDBzip".
      
      We can disable the builtin InnoDB by mysqld --skip-innodb.  If the
      builtin InnoDB is not disabled, installing the InnoDB plugin by the same
      name will not work.
      
      innodb_plugin_init(): Ignore differences in the PLUGIN_VAR_READONLY flag.
      3037cca0
    • marko's avatar
      branches/zip: Remove warnings for BUILD/compile-... --warning-mode=pedantic. · 2dbf0fda
      marko authored
      ha_innobase::write_row(): The printf format %p expects const void*.
      
      STRUCT_FLD: Do not use the GCC extension when __STRICT_ANSI__ is defined.
      
      row_merge_read_clustered_index(): Compound initializers must not contain
      variables.  Assign to struct fields instead.
      2dbf0fda
  18. 24 Oct, 2007 1 commit
  19. 23 Oct, 2007 1 commit
  20. 15 Oct, 2007 1 commit
    • marko's avatar
      branches/zip: Allow a dynamically loaded InnoDB storage engine plugin · 7c68ba2e
      marko authored
      to replace a built-in instance of InnoDB in mysqld.  This is work in
      progress, with several limitations:
      
      * Other plugins defined in the builtin InnoDB are not disabled.
        However, InnoDB in MySQL 5.1 only defines the storage engine plugin,
        no INFORMATION_SCHEMA plugins.
      
      * The global C symbols in ha_innodb.so except innodb_hton_ptr and
        builtin_innobase_plugin will have to be redefined, e.g., by objcopy.
      
      * The storage engine cannot be called "InnoDB" to avoid a conflict with
        the builtin name.  Here we call it InnoDBzip.
      
      innobase_hton_name[]: Rename to "InnoDBzip" when building a dynamic plugin.
      
      innodb_plugin_init(): New function for the dynamic plugin, to copy
      and redirect configuration parameters from the builtin InnoDB.
      
      innodb_dynamic: New configuration parameter.  This has to be added
      to the builtin InnoDB in MySQL 5.1.  Also, innodb_hton_ptr must be made
      global there.
      
      innobase_init(): Interpret the parameter innodb_dynamic.
      
      Makefile.am: Redefine class ha_innobase to ha_innodb by a preprocessor
      define.  Apparently, C++ classes cannot be easily renamed by objcopy.
      7c68ba2e
  21. 04 Oct, 2007 1 commit
  22. 03 Oct, 2007 2 commits
  23. 28 Sep, 2007 1 commit
    • marko's avatar
      branches/zip: Fix some link errors. · 3b99f0d1
      marko authored
      ha_innobase::update_thd(void): New function, to call the inline function
      ha_innobase::update_thd(THD*).
      
      check_trx_exists(): Make static.  handler0alter.cc does not need to call
      this function.
      3b99f0d1
  24. 27 Sep, 2007 1 commit
  25. 26 Sep, 2007 1 commit
    • marko's avatar
      branches/zip: Clean up some non-inlined functions. · 6b3579a8
      marko authored
      dtuple_create_for_mysql(), dtuple_free_for_mysql(): Remove.
      
      ha_innobase::records_in_range(): Use mem_heap_create(), mem_heap_free(),
      and dtuple_create() instead of the removed functions above.  Since r1587,
      InnoDB C++ functions can invoke inlined C functions.
      6b3579a8
  26. 20 Sep, 2007 2 commits
  27. 13 Sep, 2007 1 commit
  28. 11 Sep, 2007 2 commits
    • marko's avatar
      branches/zip: ha_innobase::add_index(): Fix a race condition that · 5cff2592
      marko authored
      existed before the fast-index-creation code was merged, in r1414.
      
      Do not call row_prebuilt_table_obsolete(innodb_table) until after
      the table has been renamed to a temporary name.  Otherwise, the
      following could happen when creating a clustered index on table T:
      
      (a1) copy T to T#1
      (a2) mark T obsolete
      (b1) add the name of T to the background drop list
      (a3) rename T to T#2 and T#1 to T
      (b2) drop the table on the background
      
      These steps are executed by two threads, a and b.
      
      If b1 is executed after a3, all is fine: the name T#2 will be added
      to the background drop list.  If b1 is executed before a3, the name
      T will be added, and T#2 will survive.
      5cff2592
    • inaam's avatar
      branches/zip: Undo changes commited in r1832. · 22d5997d
      inaam authored
      These should have gone to branches/fts.
      
      Spotted by: Marko and Ken
      22d5997d
  29. 10 Sep, 2007 2 commits
  30. 07 Sep, 2007 1 commit
    • marko's avatar
      branches/zip: Decode table names when displaying error messages in · 6b4c37d6
      marko authored
      fast index creation.
      
      innobase_convert_tablename(): New function, to remove the filename
      encoding of a database and table name.
      
      ha_innobase::add_index(): Invoke innobase_convert_tablename() before
      calling my_error().
      
      innodb-index.result: Update the error messages.
      6b4c37d6
  31. 06 Sep, 2007 2 commits
  32. 05 Sep, 2007 1 commit