Commit graph

17 commits

Author SHA1 Message Date
marko
c835154f96 branches/zip: Allow CREATE INDEX to be interrupted. (Issue #354)
rb://183 approved by Heikki Tuuri
2009-11-12 13:49:08 +00:00
marko
5727d980b6 branches/zip: Add @file comments, and convert decorative
/*********************************
comments to Doxygen /** style like this:
/*****************************//**

This conversion was performed by the following command:

perl -i -e 'while(<ARGV>){if (m|^/\*{30}\**$|) {
s|\*{4}$|//**| if ++$com>1; $_ .= "\@file $ARGV\n" if $com==2}
print; if(eof){$.=0;undef $com}}' */*[ch] include/univ.i
2009-05-25 09:52:29 +00:00
vasil
4e4d9f1eef branches/zip:
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal

[Step 6/28]
2009-02-17 09:02:27 +00:00
marko
a9ae7311ec branches/zip: Implement the configuration parameter and settable global
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.
2008-03-10 11:05:32 +00:00
marko
4c7f244cd8 branches/zip: enum db_err: Use the same InnoDB error numbers as the #defines
in earlier versions of InnoDB.
2008-02-25 12:41:54 +00:00
marko
9a9a952c37 branches/zip: Return a meaningful error message when refusing to create
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.
2007-11-07 11:03:13 +00:00
marko
0d6bfafd6c branches/zip: Merge 1937:2015 from trunk. 2007-10-24 10:59:54 +00:00
marko
91ee8176f6 branches/zip: Remove the error code DB_CANNOT_DROP_FOREIGN_INDEX.
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.
2007-08-15 15:49:58 +00:00
marko
e2052eba27 branches/zip: When creating a PRIMARY KEY, flag all its columns NOT NULL.
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.
2007-08-10 15:52:09 +00:00
marko
33bf9d5024 branches/zip: Resolve an error number collision in db0err.h.
The code for DB_CANNOT_DROP_FOREIGN_INDEX should have been
renumbered in r1494 (Merge revisions 1402:1493 from trunk).
2007-08-08 13:13:01 +00:00
marko
88df83bb3b branches/zip: Merge revisions 1402:1493 from trunk.
Remove mysql.patch, because the configuration parameter interface has changed.
2007-05-14 09:07:15 +00:00
marko
fc65b08f53 branches/zip: Merge branches/fast-index-creation -r1413.
Fix some bugs.  The tests innodb and innodb-index fail, but that might
be due to an old MySQL source tree being used.
2007-04-04 11:05:33 +00:00
marko
7b36a0aaaa branches/zip: Correct the description of DB_TOO_BIG_RECORD. 2006-08-18 10:02:50 +00:00
marko
747c8fad44 branches/zip: Merge revisions 200:236 from trunk. 2006-02-23 19:25:29 +00:00
marko
dcfc19c47c branches/zip: Merge revisions 79:200 from trunk. 2006-02-17 14:19:39 +00:00
marko
12050c5c1c branches/zip: Prepare for in-place updates of B-tree node pointers,
BLOB pointers, trx_id, and roll_ptr.

btr_empty(), btr_create(), page_create(): Add parameter "index", as some
index information will be encoded on the compressed page.

Define REC_NODE_PTR_SIZE as 4.

Allow btr_page_reorganize() and btr_page_reorganize_low() to fail.

Define the error code DB_ZIP_OVERFLOW.

Make row_ins_index_entry_low() static.

page0zip: Encode the index, log reorganized records, and store uncompressed
fields separately from the compressed data stream.
2006-02-10 15:06:17 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00