Commit graph

595 commits

Author SHA1 Message Date
marko
038f4dcfc8 branches/zip: Disable two debug assertions that attempt to call
buf_block_align() on a non-file page frame that was created in
btr_cur_pessimistic_insert(), to see if a record fits on a compressed
page by itself.  These assertions caused an assertion failure in
buf_block_align() in innodb_bug36172.test.

page_zip_write_rec(), page_zip_write_header(): Remove the assertion
that calls buf_frame_get_page_zip().
2008-08-06 06:20:05 +00:00
vasil
34ec18394e branches/zip:
Fix typo in comment.
2008-08-01 13:58:11 +00:00
inaam
e0ce800fa7 branches/zip issue# 33
This fix makes two basic changes in blob handling:
(The bug was introduced in r2252)

1) The blob prefixes are no longer stored in the undo if
  a) We are modifying a delete marked record and
  b) The record was delete marked by an already committed trx.

2) When building old row version to check if one of these versions
can hold an implicit lock on the record we stop our probe if
  a) The version is delete marked and
  b) The delete marking is done by a trx which is different from
     the current active trx on the record.

Reviewed by: Heikki
2008-07-29 17:06:18 +00:00
inaam
afb44e21e2 branches/zip:
Fixed a mistake in r2539 where I changed UNIV_INLINE to UNIV_INTERN
for the wrong function in btr0sea.h
2008-07-15 19:28:29 +00:00
inaam
208ba019de branches/zip: Merge 2524:2537 from branches/5.1:
------------------------------------------------------------------------
  r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
  
  branches/5.1   issue# 4
  
  Fixed a timing hole where a thread dropping an index can free the
  in-memory index struct while another thread is still using
  that structure to remove entries from adaptive hash index belonging
  to one of the pages that belongs to the index being dropped.
  
  The fix is to have a reference counter in the index struct and to
  wait for this counter to drop to zero beforing freeing the struct.
  
  Reviewed by: Heikki
  
  ------------------------------------------------------------------------
2008-07-15 17:38:53 +00:00
sunny
dd4efa3993 branches/zip: Function doesn't exist, remove declaration. 2008-06-26 07:24:23 +00:00
inaam
6fe27b5d6c branches/zip: internal mantis issue#49
This is to fix an unintended side effect of file_format_check changes.
We were reading the trx system page (TRX_SYS_PAGE_NO) before starting
recovery and that resulted in redo logs not being applied to the page.
The fix is to force a reread by calling buf_pool_invalidate().
This, however, made necessary that any writes to page are deferred to
until after the redo log application.

Reviewed by: Sunny
2008-06-18 15:45:34 +00:00
vasil
b21c94dc01 branches/zip: Merge 2437:2485 from branches/5.1:
(r2478 was skipped for the obvious reason)

  ------------------------------------------------------------------------
  r2464 | vasil | 2008-05-19 17:59:42 +0300 (Mon, 19 May 2008) | 9 lines
  
  branches/5.1:
  
  Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
  
  by removing the Innodb_buffer_pool_pages_latched variable from
  SHOW STATUS output in non-UNIV_DEBUG compilation.
   
  Approved by:	Heikki
  
  ------------------------------------------------------------------------
  r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
  
  branches/5.1:
  
  Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
  link hack
  
  The crash was due to un-handled error 3 (path not found). In the case
  of file per table, change the call to os_file_handle_error_no_exit()
  from os_file_handle_error(). Also, checks for full path pattern during
  table create (Windows only), which is used in symbolic link and temp
  table creation.
  
  Approved by:	Heikki
  ------------------------------------------------------------------------
  r2478 | sunny | 2008-05-23 08:29:08 +0300 (Fri, 23 May 2008) | 3 lines
  
  branches/5.1: Fix for bug# 36793. This is a back port from branches/zip. This
  code has been tested on a big-endian machine too.
  
  ------------------------------------------------------------------------
  r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
  
  branches/5.1:
  
  Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
  
  by retrying gettimeofday() several times if it fails in ut_usectime().
  If it fails on all calls then return error to the caller to be handled
  at higher level.
  
  Update the variable innodb_row_lock_time_max in SHOW STATUS output only
  if ut_usectime() was successful.
  
  ------------------------------------------------------------------------
  r2482 | sunny | 2008-05-28 12:18:35 +0300 (Wed, 28 May 2008) | 5 lines
  
  branches/5.1: Fix for Bug#35602, "Failed to read auto-increment value from
  storage engine". The test for REPLACE was an error of ommission since it's
  classified as a simple INSERT. For REPLACE statements we don't acquire
  the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
  
  ------------------------------------------------------------------------
  r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
  
  branches/5.1:
  
  Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
  
  Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
  if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
  
  Discussed with:	Sunny (via IM)
  
  ------------------------------------------------------------------------
2008-06-06 15:24:58 +00:00
inaam
18c421230e branches/zip:
Clean up the POSIX_ASYNC_IO code which is currently not used and is unlikely to be ever used.
2008-05-16 14:41:18 +00:00
calvin
fc02f76d78 branches/zip:
Implement the system tablespace tagging described on the wiki:
https://svn.innodb.com/innobase/InnoDB_version_and_feature_compatibility

A brief description of the changes:

* The file format tag will be saved in the trx system page, starting at
  (UNIV_PAGE_SIZE - 16) for 8 bytes.
* The configuration parameter innodb_file_format_check is introduced.
  This variable can be set to on/off and any of the supported file
  formats in the configuration file, but can only be set to any of
  the supported file formats during runtime. The default is on.
* During table create/open, check the current file format against
  the max in file_format_max. If the current file format is newer,
  update file_format_max and tag the system tablespace with the
  newer one in a normal mtr.
* During startup, write the tag to the error log and check it against
  DICT_TF_FORMAT_MAX. Refuse to start with error, if
  -- DICT_TF_FORMAT_MAX < the tag, and
  -- innodb_file_format_check is ON
  Print out a warning , if
  -- DICT_TF_FORMAT_MAX < the tag, but
  -- innodb_file_format_check is off
* The system tablespace tag is re-settable using:
  set innodb_file_format_check = <file_format>

Approved by:	Sunny
2008-05-06 15:00:25 +00:00
vasil
3bad6e2511 branches/zip:
Add InnoDB version in these places:
 
* In INFORMATION_SCHEMA.PLUGINS.PLUGIN_VERSION, only 1.2 out of 1.2.3
  because MySQL supports only one dot there
 
* At startup:
  "080501 12:28:06 InnoDB Plugin 1.0.1 started; log sequence number 46509"

* In a server variable innodb_version;
  mysql> select @@innodb_version;
  +------------------+
  | @@innodb_version |
  +------------------+
  | 1.0.1            |
  +------------------+

Approved by:	Sunny
2008-05-06 11:10:09 +00:00
vasil
03a3d076d6 branches/zip:
Fix Mantis issue#34 https://svn.innodb.com/mantis/view.php?id=34
"I_S plugins should refuse to load if the storage engine plugin is not loaded"
and MySQL Bug#36310 http://bugs.mysql.com/36310
"InnoDB plugin crash"

* Make srv_was_started public
* Set srv_was_started at the end of innobase_start_or_create_for_mysql()
  so it is not set to TRUE if innodb encounters some startup error
* Refuse to start any of the I_S plugins if srv_was_started is not TRUE

Approved by:	Heikki
2008-04-29 14:57:06 +00:00
marko
eb04f0f8ef branches/zip: Implement the INFORMATION_SCHEMA tables
INNODB_COMPRESSION_BUDDY and INNODB_COMPRESSION_BUDDY_RESET.

buf_buddy_stat_struct, buf_buddy_stat_t, buf_buddy_stat[]:
Statistics of the buddy system grouped by block size.

i_s_innodb_compression_buddy, i_s_innodb_compression_buddy_reset:
New INFORMATION_SCHEMA plugins.

i_s_compression_buddy_fields_info[]: Define the fields:
size, used, free, relocated, relocated_sec.

i_s_compression_buddy_fill_low(), i_s_compression_buddy_fill(),
i_s_compression_buddy_reset_fill(): Fill the fields.

i_s_compression_buddy_init(), i_s_compression_buddy_reset_init():
Initialize the tables.
2008-03-28 10:03:58 +00:00
marko
f29b8ee0c3 branches/zip: Rename the INFORMATION_SCHEMA tables
INNODB_ZIP and INNODB_ZIP_RESET to
INNODB_COMPRESSION and INNODB_COMPRESSION_RESET,
and remove the statistics of the buddy system.

This change was discussed with Ken.  It makes the tables shorter
and easier to understand.  The removed data will be represented in
the tables INNODB_COMPRESSION_BUDDY and INNODB_COMPRESSION_BUDDY_RESET
that will be added later.

i_s_innodb_zip, i_s_innodb_zip_reset, i_s_zip_fields_info[],
i_s_zip_fill_low(), i_s_zip_fill(), i_s_zip_reset_fill(),
i_s_zip_init(), i_s_zip_reset_init(): Replace "zip" with "compression".

i_s_compression_fields_info[]: Remove "used", "free",
"relocated", "relocated_usec".  In "compressed_usec" and "decompressed_usec",
replace microseconds with seconds ("usec" with "sec").

page_zip_decompress(): Correct a typo in the function comment.

PAGE_ZIP_SSIZE_BITS, PAGE_ZIP_NUM_SSIZE: New constants.

page_zip_stat_t, page_zip_stat: Statistics of the compression, grouped
by page size.

page_zip_simple_validate(): Assert that page_zip->ssize is reasonable.
2008-03-28 09:28:54 +00:00
marko
60ae240d23 branches/zip: Merge 2367:2384 from branches/5.1. 2008-03-26 17:14:00 +00:00
marko
15c670988f branches/zip: Pass the tablespace flags correctly when creating or opening
single-table tablespaces.  This bug was reported by Sunny as Mantis issue #26.

fil_space_create(), fil_create_new_single_table_tablespace(),
fil_open_single_table_tablespace(), fsp_header_init_fields():
Add ut_a(flags != DICT_TF_COMPACT).

dict_build_table_def_step(), row_import_tablespace_for_mysql(),
row_truncate_table_for_mysql(): Pass correct flags to
fil_create_new_single_table_tablespace() or fil_open_single_table_tablespace().
2008-03-18 10:10:51 +00:00
marko
77d8c98735 branches/zip: Rename ib_ulonglong to ib_uint64_t and ib_longlong to ib_int64_t. 2008-03-17 14:19:04 +00:00
marko
ebdb9daa9b branches/zip: Merge 2295:2367 from branches/5.1. 2008-03-17 14:09:44 +00:00
marko
633fc05300 branches/zip: Fix a bug in the retrieval of old versions of records containing
externally stored columns.

innodb-zip.test: Correct the test case.  Without the fixes, the test
would fail, because the BLOB would be prepended with a 768-byte prefix
of the data.

row_upd_index_replace_new_col_vals_index_pos(),
row_upd_index_replace_new_col_vals(): Use only one "heap"
parameter that must be non-NULL.  When fetching externally
stored columns, use upd_field_t::orig_len.

upd_get_field_by_field_no(): New accessor function, for retrieving
an field from an update vector by field_no.

row_upd_index_replace_new_col_val(): New function, for replacing the
value from an update vector.  This used to be duplicated code in
row_upd_index_replace_new_col_vals_index_pos() and
row_upd_index_replace_new_col_vals().
2008-03-13 12:49:34 +00:00
marko
cbc35003f7 branches/zip: Non-functional change: Add some missing const qualifiers.
btr_index_rec_validate_report(), btr_index_rec_validate(): Add const
qualifiers to page, rec, index.

row_vers_old_has_index_entry(), row_vers_build_for_consistent_read():
Add const qualifier to rec.

row_vers_build_for_semi_consistent_read(): Add const qualifier to rec
and old_vers.

row_sel_store_row_id_to_prebuilt(): Add const qualifiers to
index_rec, index, offsets.

row_sel_build_prev_vers_for_mysql(): Add const qualifier to rec.

row_sel_get_clust_rec_for_mysql(): Add const qualifier to rec and out_rec.

row_sel_try_search_shortcut_for_mysql(): Add const qualifier to out_rec.
2008-03-13 09:29:22 +00:00
marko
86361e032b 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
c853494ea2 branches/zip: Make innodb_file_per_table a settable global variable.
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.
2008-03-07 12:56:52 +00:00
marko
71d8314d4d branches/zip: fseg_print(): Enclose inside #ifdef UNIV_BTR_PRINT. 2008-03-06 12:29:16 +00:00
marko
f104c5fabe branches/zip: Implement ut_calc_align() and ut_calc_align_down() as
type-independent macros.
2008-03-05 13:17:13 +00:00
marko
30e94affc3 branches/zip: fsp_header_get_free_limit(), fsp_header_get_tablespace_size():
Remove the redundant parameter "space".
2008-03-05 12:40:29 +00:00
marko
583ce8e896 branches/zip: Fix two more bogus MSVC C4090 warnings on constness differences
(Warning C4090 is incorrectly issued when using Visual C++ .NET 2003,
bug 101661, http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101661)

dict_table_find_equivalent_index(): Cast away constness in the mem_free()
call.  MSVC seems to think that an array of pointers to const data is
const itself.

UT_SORT_FUNCTION_BODY(): Cast away constness in the memcpy() call.
MSVC seems to think that an array of pointers to const data is const itself.
2008-03-05 09:54:48 +00:00
marko
09da651894 branches/zip: ut_is_2pow(), ut_2pow_round(), ut_2pow_remainder(): Define
as type-independent macros instead of functions.  Because ut_2pow_round()
and ut_2pow_remainder() no longer assert ut_is_2pow(m), add the assertions
to callers when needed.  Also add parentheses to assist the compiler in
common subexpression elimination.
2008-03-05 09:41:51 +00:00
marko
99b93f4da1 branches/zip: Fix most MSVC (Windows) compilation warnings.
lock_get_table(), locks_row_eq_lock(), buf_page_get_mutex(): Add return
after ut_error.  On Windows, ut_error is not declared as "noreturn".

Add explicit type casts when assigning ulint to byte to get rid of
"possible loss of precision" warnings.

struct i_s_table_cache_struct: Declare rows_used, rows_allocd as ulint
instead of ullint.  32 bits should be enough.

fill_innodb_trx_from_cache(), i_s_zip_fill_low(): Cast 64-bit unsigned
integers to longlong when calling Field::store(longlong, bool is_unsigned).
Otherwise, the compiler would implicitly convert them to double and
invoke Field::store(double) instead.

recv_truncate_group(), recv_copy_group(), recv_calc_lsn_on_data_add():
Cast ib_uint64_t expressions to ulint to get rid of "possible loss of
precision" warnings.  (There should not be any loss of precision in
these cases.)

log_close(), log_checkpoint_margin(): Declare some variables as ib_uint64_t
instead of ulint, so that there won't be any potential loss of precision.

mach_write_ull(): Cast the second argument of mach_write_to_4() to ulint.

OS_FILE_FROM_FD(): Cast the return value of _get_osfhandle() to HANDLE.

row_merge_dict_table_get_index(): Cast the parameter of mem_free() to (void*)
in order to get rid of the bogus MSVC warning C4090, which has been reported
as MSVC bug 101661:
<http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101661>

row_mysql_read_blob_ref(): To get rid of a bogus MSVC warning C4090,
drop a const qualifier.
2008-03-04 08:57:07 +00:00
marko
9d58e3ff99 branches/zip: Improve the LRU algorithm with a separate unzip_LRU list of
blocks that contains uncompressed and compressed frames.  This patch was
designed by Heikki and Inaam, implemented by Inaam, and refined and reviewed
by Marko and Sunny.

buf_buddy_n_frames, buf_buddy_min_n_frames, buf_buddy_max_n_frames: Remove.

buf_page_belongs_to_unzip_LRU(): New predicate:
bpage->zip.data && buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE.

buf_pool_t, buf_block_t: Add the linked list unzip_LRU.  A block in the
regular LRU list is in unzip_LRU iff buf_page_belongs_to_unzip_LRU() holds.

buf_LRU_free_block(): Add a third return value to refine the case
"cannot free the block".

buf_LRU_search_and_free_block(): Update the documentation to reflect the
implementation.

buf_LRU_stat_t, buf_LRU_stat_cur, buf_LRU_stat_sum, buf_LRU_stat_arr[]:
Statistics for the unzip_LRU algorithm.

buf_LRU_stat_update(): New function: Update the statistics.  Called once
per second by srv_error_monitor_thread().

buf_LRU_validate(): Validate the unzip_LRU list as well.

buf_LRU_evict_from_unzip_LRU(): New predicate: Use the unzip_LRU before
falling back to the regular LRU?

buf_LRU_free_from_unzip_LRU_list(), buf_LRU_free_from_common_LRU_list():
Subfunctions of buf_LRU_search_and_free_block().

buf_LRU_search_and_free_block(): Reimplement.  Try to evict an uncompressed
page from the unzip_LRU list before falling back to evicting an entire block
from the common LRU list.

buf_unzip_LRU_remove_block_if_needed(): New function.

buf_unzip_LRU_add_block(): New function: Add a block to the unzip_LRU list.
2008-03-03 12:48:38 +00:00
calvin
149298b7ac branches/zip: row_raw_format_str_convert(): Rename to
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.
2008-02-29 23:37:15 +00:00
calvin
6be1195663 branches/zip: Exclude mman.h on Windows since it is not supported on
Windows. Reviewed by Marko.
2008-02-29 23:18:46 +00:00
marko
3fd65809a7 branches/zip: buf_buddy_alloc(), buf_buddy_alloc_low(): Correct a mistake
in the function comment.  There is no value BUF_BUDDY_USE_LRU.  The mistake
was made in r1290.
2008-02-29 12:30:41 +00:00
marko
f7595d4278 branches/zip: buf_relocate(): Document and assert that bpage must be
in one of the states BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE.
Note that the caller will have to relocate bpage->list.
2008-02-29 08:20:17 +00:00
marko
f03b5fad7b branches/zip: Replace __attribute with __attribute. 2008-02-29 08:13:55 +00:00
marko
42db7f1780 branches/zip: os_file_set_nocache(): Clean up the function comment.
Add the function prototype to os0file.h.
2008-02-28 10:28:56 +00:00
vasil
26402257da branches/zip:
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
2008-02-27 16:53:56 +00:00
marko
5377a7dd94 branches/zip: Add duration statistics to INFORMATION_SCHEMA.INNODB_ZIP.
buf_buddy_relocated_duration[],
page_zip_compress_duration[]
page_zip_decompress_duration[]: Record the total duration of the operations.

buf_buddy_relocate(), page_zip_compress(), page_zip_decompress():
Add ut_time_us() instrumentation.

i_s_zip_fields_info[], i_s_zip_fill_low(): Move the columns containing
cumulated statistics last.  Add relocated_usec, compressed_usec, and
decompressed_usec.
2008-02-27 14:34:44 +00:00
marko
567abed2ca branches/zip: ibuf_update_free_bits_zip(): When after==0, call
buf_page_make_young(), like ibuf_update_free_bits_if_full() does.
This difference was pointed out by Sunny.
2008-02-25 14:01:15 +00:00
marko
c9d6c5acec 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
cdba733fb5 branches/zip: Merge 2263:2295 from branches/5.1. 2008-02-18 20:09:03 +00:00
marko
ab10478ca4 branches/zip: Remove the unused function os_thread_join(). 2008-02-18 19:14:09 +00:00
marko
788650088b branches/zip: Add a UNIV_INTERN qualifier to every global function declaration
in *.h files, so that the function signatures in the *.h and *.c files fully
match each other.

ut_dulint_sort(): Add a UNIV_INTERN qualifier also to the function definition.
2008-02-18 18:38:33 +00:00
marko
409fcc594f branches/zip: Minor fixes.
lock_rec_restore_from_page_infimum(): Correct the comment of the parameter rec.

lock_sec_rec_read_check_and_lock(): Add the debug assertion
ut_ad(mode == LOCK_X || mode == LOCK_S).
2008-02-18 15:45:17 +00:00
vasil
ec691ea874 branches/zip:
Do not include univ.i in mysql_addons.h, it was included for the sole
purpose of innodb_redefine.h to work and now innodb_redefine.h has been
removed. See r2251 and r2288.
2008-02-08 13:19:56 +00:00
marko
b991da9846 branches/zip: Remove innodb_redefine.h and all references to it. The
file has been redundant since r2278.

include/innodb_redefine.h: Remove.

include/sync0sync.h: Remove the definition of mutex_free that was added
because of innodb_redefine.h.

include/univ.i: Remove references to innodb_redefine.h.  Explain why
the C++ classes need to be renamed.

scripts/build-plugin.sh: Build InnoDB only once.  The file
innodb_redefine.h is no longer needed.
2008-02-08 12:23:17 +00:00
marko
2c2b06ad75 branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global
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.
2008-02-06 14:17:36 +00:00
marko
1b3c2f5c62 branches/zip: Remove unused definitions from include/trx0xa.h. 2008-02-06 08:19:56 +00:00
marko
64c95da886 branches/zip: Fast index creation: Release locks on system tables before
creating indexes.  Lock the user table inside the user transaction.

enum trx_dict_op: Remove TRX_OP_INDEX_MAY_WAIT.

ha_innobase::add_index(): Lock the user tables within prebuilt->trx.
Commit the data dictionary transaction before creating indexes.

ha_innobase::final_drop_index(): Lock the user table within prebuilt->trx.
2008-01-25 14:26:07 +00:00
marko
7d34b71cb9 branches/zip: Introduce the accessor function dict_index_is_ibuf()
for determining if an index is the insert buffer B-tree.
2008-01-25 08:13:12 +00:00
marko
473d7c16a9 branches/zip: Introduce the page type code FIL_PAGE_TYPE_ZBLOB2 for
continuation pages containing compressed BLOBs.  The first compressed
BLOB page will be of type FIL_PAGE_TYPE_ZBLOB.
2008-01-24 08:12:02 +00:00