Commit graph

189 commits

Author SHA1 Message Date
osku
ccd40036ad ha_innodb.cc: Remove unused define MAX_ULONG_BIT. 2006-12-07 12:45:26 +00:00
heikki
659effb5f6 Fix bug #24712: SHOW TABLE STATUS for file-per-table showing incorrect
time fields
2006-12-01 15:38:56 +00:00
marko
8f22bf12db Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds.  (Bug #24386)
2006-11-21 13:56:18 +00:00
marko
7868898e89 Merge a change from MySQL AB.
ChangeSet
  2006/11/10 17:22:43+02:00 aelkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi 
  Bug #24190  many exportable definitions of field_in_record_is_null
  
  mysql had several(2) exportable definitions of field_in_record_is_null function.
  
  Fixed with adding static.

storage/innobase/handler/ha_innodb.cc
  2006/11/10 17:22:36+02:00 aelkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi +1 -1
  made static
2006-11-16 15:05:23 +00:00
marko
9954212f5c Minor cleanup.
ha_innobase::rnd_pos(): Use correct format in DBUG_PRINT statements.

buf_page_release(): Remove the local variable buf_fix_count.
2006-11-10 10:09:41 +00:00
osku
b4b9a10700 Merge changes from MySQL to get the code compiling again:
Change return type of ha_innobase::info to int.

 plug.in: Add MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS.
2006-11-03 11:44:29 +00:00
marko
7241316fba ha_innobase::store_lock(): When downgrading table locks, do not
check thd->in_lock_tables but test if
thd->lex->sql_command == SQLCOM_LOCK_TABLES
instead.  Otherwise, stored functions will use table locks.  (Bug #18077)

This patch is from Heikki.
2006-10-16 12:19:36 +00:00
marko
e8bcfd5ede Merge changes from MySQL AB, and remove two compilation warnings.
ha_innodb.cc: innodb_mutex_show_status(): Add (ulong) casts to
ulonglong expressions being passed to fprintf %lu.  The warnings
were apparently introduced by MySQL AB developers.

mysql_declare_plugin(innobase): Add PLUGIN_LICENSE_GPL.

have_innodb.inc: Merge changes from MySQL AB.
2006-10-09 09:08:50 +00:00
marko
e1d04a690c storage/innobase/handler: Merge changes from MySQL AB:
ChangeSet
  2006/09/30 18:44:42-07:00 brian@zim.(none) 
  Merge zim.(none):/home/brian/mysql/merge-5.1
  into  zim.(none):/home/brian/mysql/arch-5.1

ChangeSet
  2006/09/30 12:49:46-07:00 brian@zim.(none) 
  This patch adds handlerton passing to functions. NDB and Innodb still require a global hanlderton in the main code due to the nature of the sql_cache call back function (should be solveable... another patch).
  Partitioning now has a flag to allow disabling of engines from being compatible with partitioning. Cleaned up heap naming convention on panic call. 

ChangeSet
  2006/09/29 17:19:02-07:00 brian@zim.(none) 
  This removes the passing of global hton to engine instance. 

ChangeSet
  2006/09/28 13:22:56+02:00 gbichot@dl145h.mysql.com 
  Merge gbichot@bk-internal:/home/bk/mysql-5.1-arch
  into  dl145h.mysql.com:/users/gbichot/mysql-5.1-arch

ChangeSet
  2006/09/28 13:19:43+02:00 gbichot@dl145h.mysql.com 
  In the handlerton, cursor creation function don't have an argument
  and so the engine calls current_thd to derive transaction information;
  instead we now pass THD to those functions, it looks more logical
  (it makes the implicit current_thd parameter more visible).
  Approved by Brian and Monty.

ChangeSet
  2006/09/26 22:51:53-07:00 brian@zim.(none) 
  Merge zim.(none):/home/brian/mysql/merge-5.1
  into  zim.(none):/home/brian/mysql/arch-5.1
2006-10-03 12:46:23 +00:00
marko
3916e2ead2 Merge code from MySQL AB:
Make innobase_hton a pointer.
2006-09-20 09:38:09 +00:00
marko
5c1a11892d ha_innobase::start_stmt(): Remove the check for
prebuilt->stored_select_lock_type being LOCK_X or LOCK_S.
This would cause false alarms with INSERT ... SELECT, which would use
LOCK_NONE in innodb_locks_unsafe_for_binlog mode.  (Bug #10746)
2006-09-20 08:52:00 +00:00
marko
79644bdb8e dict_col_t: Copy the fields of "dtype_t type" directly to this structure,
so that all integer fields can be packed into 64 bits.  (Bug #20877)

dtype_t: Change the type of all bit-fields to unsigned.

dict_table_get_nth_col(), dict_table_get_sys_col_noninline(),
dict_table_get_sys_col(), dict_field_get_col(): Return const
dict_col_t*, so that changes to dict_col_t can be detected more
easily.  Add const to many dict_col_t* declarations.

dict_index_get_nth_type(): Replace with dict_index_get_nth_col().

dict_col_get_type(): Replace with dict_col_copy_type().

dict_col_get_min_size(), dict_col_get_max_size(), dict_col_get_fixed_size(),
dict_col_get_sql_null_size(): New functions.

dtype_get_at_most_n_mbchars(): Replace the parameter dtype
with the parameters prtype, mbminlen, mbmaxlen.

dtype_get_pad_char(), cmp_data_data(), cmp_data_data_slow(),
cmp_whole_field(): Replace the dtype_t* parameter with the ulint
parameters mtype, prtype.

dtype_copy(): Add a const qualifier to type2 (the one being copied from).

dtype_set_mblen(): Replaced with dtype_get_mblen().

dtype_get_fixed_size_low(), dtype_get_min_size_low(),
dtype_get_fixed_max_low(): Replace dtype_get_fixed_size(),
dtype_get_min_size(), and dtype_get_max_size().  These are used by the
dict_col_get_{fixed,min,max}_size() functions.

cmp_types_are_equal(): Replace with cmp_cols_are_equal().

dict_table_get_col_name(): Add a const qualifier parameter to the
parameter "table".

dtype_binary, dtype_binary_val: Remove.

dtype_is_fixed_size(): Remove.
2006-09-18 11:51:38 +00:00
marko
799dfe0f85 Add dict_col_get_clust_pos_noninline(), which was forgotten from r820. 2006-09-18 08:50:31 +00:00
marko
486a36dd01 Turn ha_innobase::build_template() from a non-static member function
to a static plain function.
2006-09-14 13:10:46 +00:00
marko
3b49ab383b Remove dict_col_t::clust_pos.
dict_col_get_clust_pos(): Add parameter clust_index.  Replace the
look-up with a linear search of all columns in the clustered index.

row_upd_index_replace_new_col_vals(): Compute clust_index outside
the loops.  Compute clust_pos outside the inner loop.

row_upd_changes_ord_field_binary(), row_upd_changes_first_fields_binary():
Compute clust_index outside the loops.  Declare the auxiliary variables
inside the loop scope.
2006-09-14 11:51:34 +00:00
marko
c6c87f315d mysql_declare_plugin(innobase): Initialize the fields
reserved1 (apparently the system variables) and
reserved2 (apparently the configuration options).
2006-09-13 11:35:34 +00:00
marko
1c1026ec0d Reduce the size of the data dictionary cache. (Bug #20877)
dtype_t: Remove unused field "prec", which was supposed to be used for
the precision of decimal columns in stand-alone InnoDB.

dtype_get_prec(): Remove.

dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".

dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
into bit-fields.

dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.

dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.

Replace the default clust_pos value ULINT_UNDEFINED with
REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
the accessor function dict_col_get_clust_pos().

dict_field_t: Turn prefix_len and fixed_len into bit-fields.

dict_tree_t: Remove pad[64].

dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
cached, flags, stat_initialized, and autoinc_inited into bit-fields.
Remove does_not_fit_in_memory from non-debug builds.

dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.

dict_foreign_struct: Turn n_fields and type into bit-fields.

rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
Omit level unless #defined UNIV_SYNC_DEBUG.

Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
2006-09-12 14:06:46 +00:00
marko
85f5b73e32 Merge code cleanup from MySQL AB:
ChangeSet
  2006/09/07 08:23:58-07:00 brian@zim.(none) 
  Moves Innodb handler to the Innodb storage directory.

storage/innobase/handler/ha_innodb.cc
  2006/09/07 08:23:53-07:00 brian@zim.(none) +2 -3
  Adjusted include files, also disabled replication code which was not
  being used.

ChangeSet
  2006/09/07 12:34:12-07:00 brian@zim.(none) 
  Fix for a compile problem in Windows. 

storage/innobase/handler/ha_innodb.cc
  2006/09/07 12:34:10-07:00 brian@zim.(none) +0 -28
  Removed some dead code (Marko approved)
2006-09-11 08:58:43 +00:00
marko
96ea617978 Merge change from MySQL AB:
ChangeSet
  2006/08/23 15:12:42-07:00 brian@zim.(none) 
  This is a cleanup of warnings that windows is complaining about. 

sql/ha_innodb.cc
  2006/08/23 15:12:39-07:00 brian@zim.(none) +0 -1
  Removed unused variables
2006-09-05 19:25:38 +00:00
marko
4af9b6d365 Merge code from MySQL AB:
ChangeSet
  2006/08/22 16:24:12-07:00 brian@zim.(none) 
  This changest:
  Plugins now when compiled or not compiled work correctly with status variables. 
  Status variables from plugins now set their own names (removed bit where plugin name was pre-appended this broke Innodb and Cluster)
  A few Makefile cleanups. 

sql/ha_innodb.cc
  2006/08/22 16:24:08-07:00 brian@zim.(none) +16 -6
  Cleanup to make status variables directly in engine
2006-09-04 10:45:05 +00:00
marko
4941acd47a ha_innodb.cc: Adjust the comment related to r784. Apparently it was
changed after review on the MySQL side.
2006-09-04 10:40:43 +00:00
marko
1ce2c0f89f Merge a patch from MySQL AB:
ChangeSet@1.2288, 2006-08-29 15:35:05+02:00, guilhem@gbichot3.local +2 -0
  Fix for BUG#20866 "show table status on innodb raises assertion"
  and its duplicate BUG#19057 "Test 'rpl_row_func003' fails on SuSE SLES9 x86".
  It was an assertion failure, only in debug builds, not present
  in released versions (nothing to document).
  It happened when doing SHOW TABLE STATUS on an InnoDB table
  having an auto_increment column, right after creating the table.

  sql/ha_innodb.cc@1.288, 2006-08-29 15:35:02+02:00, guilhem@gbichot3.local +7 -1
    Before a val_() calls on a Field object, if that field was not marked
    for read, we need to mark it. This is explained here:
    ChangeSet 1.2119.601.1 2006/06/04 18:52:22 monty@mysql.com
    quoting the changeset's comment:
    
      - If a handler needs to call Field->val() or Field->store() on columns
        that are not used in the query, one should install a temporary
        all-columns-used map while doing so. For this, we provide the following
        functions:
      
        my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
        field->val();
        dbug_tmp_restore_column_map(table->read_set, old_map);
      
        and similar for the write map:
      
        my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
        field->val();
        dbug_tmp_restore_column_map(table->write_set, old_map);
      
        If this is not done, you will sooner or later hit a DBUG_ASSERT
        in the field store() / val() functions.
        (For not DBUG binaries, the dbug_tmp_restore_column_map() and
        dbug_tmp_restore_column_map() are inline dummy functions and should
        be optimized away be the compiler).
    
    Note that I verified that the bug didn't exist in non-debug builds.
2006-09-01 08:29:44 +00:00
marko
fb067e41bd Revert the hunk on ha_innobase::innobase_read_and_init_auto_inc()
that was accidentally committed in r782.
2006-09-01 08:19:47 +00:00
heikki
a3c6001751 Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table 2006-08-31 19:52:25 +00:00
marko
42a77e858b Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
2006-08-22 07:20:52 +00:00
marko
b0d9c363fc ha_innobase::delete_all_rows(): Correct an error introduced in r705:
Replace the local variable "trx" with "prebuilt->trx".

Also, replace the second invocation of the macro current_thd with
the local variable thd.
2006-08-11 08:44:10 +00:00
marko
b4270e7081 Merge a change from MySQL AB (originally implemented by Marko
in the 5.0 tree and now merged to the 5.1 tree):

# ChangeSet
#   2006/07/29 07:17:33+04:00 aivanov@mysql.com 
#   Make innodb_flush_log_at_trx_commit a settable global variable.
# 
# sql/ha_innodb.cc
#   2006/07/29 07:17:29+04:00 aivanov@mysql.com +1 -3
#   Remove innobase_flush_log_at_trx_commit
#   (set srv_flush_log_at_trx_commit directly).
# 
# sql/ha_innodb.h
#   2006/07/29 07:17:29+04:00 aivanov@mysql.com +1 -1
#   Remove innobase_flush_log_at_trx_commit.
#   Declare srv_flush_log_at_trx_commit.
# 
# storage/innobase/include/srv0srv.h
#   2006/07/29 07:17:30+04:00 aivanov@mysql.com +1 -1
#   Change the type of srv_flush_log_at_trx_commit.
# 
# storage/innobase/srv/srv0srv.c
#   2006/07/29 07:17:30+04:00 aivanov@mysql.com +1 -1
#   Change the type of srv_flush_log_at_trx_commit.
#
2006-08-11 08:05:40 +00:00
heikki
ac88d25b33 Remove redundant check_trx_exists() and ut_a() from r701,
as suggested by Marko
2006-08-08 11:38:34 +00:00
marko
b758497312 Correct all URLs pointing to the MySQL manual. (Bug #21467) 2006-08-08 10:54:57 +00:00
heikki
df475ab785 Add update_thd() to several places in ha_innodb.cc to make sure prebuilt->trx points to the right trx object; in other functions add assertions that prebuilt->trx is for this thd; when 5.1 stabilizes, we can change these assertions to ut_ad() debug version assertions 2006-08-07 15:39:40 +00:00
heikki
5d37f4bad7 Fix Bug #20493 : we must prepare prebuilt->trx to point to the trx of this thd before using it 2006-08-07 15:23:32 +00:00
heikki
f185d66669 Fix Bug#20213 and its duplicates: stress test crashes of InnoDB-5.1 2006-08-07 15:18:22 +00:00
marko
01ce2292ff ha_innobase::start_stmt(): patch from Heikki:
Do not call read_view_close_for_mysql().  (Bug #19834)
2006-07-28 10:17:55 +00:00
marko
3412bdf03e Merge changes from MySQL AB:
innodb_mysql.test, innodb_mysql.result:
  Bug #16798: Uninitialized row buffer reads in ref-or-null optimizer
  Bug #12882: min/max inconsistent on empty table
  Test of behaviour with CREATE ... SELECT
 Moved from group_min_max.test:
  Bug #12672: primary key implicitly included in every innodb index
  Bug #6142: a problem with empty innodb table 
  Bug #9798: group by with rollup

ChangeSet@2006/06/01 21:47:15+03:00 bell@sanja.is.com.ua 
#   interface for transaction log management added to handlerton
#   iterators creation interface added to handlerton
ha_innodb.cc: Add get_log_status = create_iterator = NULL

ChangeSet@2006/06/04 18:52:22+03:00 monty@mysql.com 
#   This changeset is largely a handler cleanup changeset (WL#3281),
#   but includes fixes and cleanups that was found necessary while
#   testing the handler changes
# sql/ha_innodb.h
#   2006/06/04 18:52:09+03:00 monty@mysql.com +6 -13
#   Update to 'newer' table handler interface
#   - table_flags are now ulonglong
#   - Added reset() method
#   - Removed not needed ha_retrieve_all_cols() and ha_retrieve_all_pk()
#     columns.
#   - Made build_template() a class function to be able to easier access
#     class variables
# sql/ha_innodb.cc
#   2006/06/04 18:52:09+03:00 monty@mysql.com +37 -44
#   Update to 'newer' table handler interface
#   - Update innobase_create_handler() to new interface
#   - Removed HA_NOT_EXACT_COUNT (not needed)
#   - Renamed HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
#     to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
#   - Prefixed base status variables with 'stats'
#   - Use table column bitmaps instead of ha_get_bit_in_read_set()
#   - Added ::reset(), with code from ::extra(HA_EXTRA_RESET)
#   - Removed HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIEVE_PRIMARY_KEY as
#     the table->read_set and table->write_set bitmaps now are accurate

ChangeSet@2006/06/02 22:21:32+02:00 guilhem@mysql.com 
#   First push for WL#3146 "less locking in auto_increment". It is a
#   0-real-change patch.
#   New prototype for get_auto_increment() (but new arguments not yet used),
#   to be able to reserve a finite interval of auto_increment values from
#   cooperating engines.
#   A hint on how many values to reserve is found in
#   handler::estimation_rows_to_insert,
#   filled by ha_start_bulk_insert(), new wrapper around start_bulk_insert().
#   NOTE: this patch changes nothing, for all engines.
#   But it makes the API ready for those
#   engines which will want to do reservation.
#   More csets will come to complete WL#3146.
ha_innodb.h, ha_innodb.cc: update to new prototype of get_auto_increment

ChangeSet@2006/05/28 14:51:01+02:00 serg@sergbook.mysql.com 
#   handlerton cleanup:
#   duplicate fields removed, st_mysql_storage_engine added to support
#   run-time handlerton initialization (no compiler warnings), handler API
#   is now tied to MySQL version, handlerton->plugin mapping added
#   (slot-based), dummy default_hton removed, plugin-type-specific
#   initialization generalized, built-in plugins are now initialized too,
#   --default-storage-engine no longer needs a list of storage engines
#   in handle_options().
#   
# sql/ha_innodb.h
#   2006/05/28 14:50:53+02:00 serg@sergbook.mysql.com +1 -1
#   handlerton cleanup: remove duplicate fields, add st_mysql_storage_engine,
#   initialize handlerton run-time to avoid compiler warnings
# 
# sql/ha_innodb.cc
#   2006/05/28 14:50:53+02:00 serg@sergbook.mysql.com +37 -52
#   handlerton cleanup: remove duplicate fields, add st_mysql_storage_engine,
#   initialize handlerton run-time to avoid compiler warnings

ChangeSet@2006/06/01 23:59:34+02:00 serg@serg.mylan 
#   second patch for make distcheck
ha_innodb.cc: enclose in #ifdef WITH_INNOBASE_STORAGE_ENGINE / #endif
2006-06-13 12:50:11 +00:00
osku
bb37525b77 From MySQL:
Fix bug #17264. For alter table on win32 for succesful operation completion
it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however in
InnoDB handler TL_WRITE is lifted to TL_WRITE_ALLOW_WRITE, which causes race
condition when several clients do alter table simultaneously.
2006-06-02 07:10:14 +00:00
marko
e4276e2bff Document better the "bool table_id" flags introduced in r590. 2006-05-31 07:35:02 +00:00
marko
ff38fefde8 innobase_print_identifier(): Remove TODO comment before calling
get_quote_char_for_identifier().  That function apparently assumes the
identifier to be encoded in UTF-8.
2006-05-24 10:58:43 +00:00
marko
85ccc78fe3 Adapt InnoDB to the new tablename to filename encoding in MySQL 5.1.
ut_print_name(), ut_print_namel(): Add parameter table_id for distinguishing
names of tables from other identifiers (names of indexes, columns and
constraints).

innobase_convert_from_table_id(), innobase_convert_from_id(),
innobase_convert_from_filename(), innobase_get_charset(): New functions.

dict_accept(), dict_scan_id(), dict_scan_col(), dict_scan_table_name(),
dict_skip_word(), dict_create_foreign_constraints_low():
Add parameter "cs", so that isspace() can be replaced with my_isspace(),
whose operation depends on the connection character set.

dict_scan_id(): Convert the identifier to UTF-8.

dict_str_starts_with_keyword(): New extern function, to replace dict_accept()
in row_search_for_mysql().

mysql_get_identifier_quote_char(): Replaced with innobase_print_identifier().

ha_innobase::create(): Remove the thd->convert_string() call.
Pass the statement to InnoDB in the connection character set
and let InnoDB convert the identifiers to UTF-8.
2006-05-24 10:27:17 +00:00
osku
896e890f39 Add innobase_convert_string wrapper function to ha_innodb.cc, and a new file
ha_prototypes.h.
2006-05-11 04:51:52 +00:00
osku
082d3b0c12 Increment statistic counter in ha_innobase::index_prev(). Fixes bug #19542. 2006-05-09 06:37:11 +00:00
marko
22f908db65 Merge changes by MySQL AB to ha_innodb.cc:
WL#2257 REFERENTIAL_CONSTRAINTS view
WL#3201 pluggable storage engines
2006-05-08 08:08:27 +00:00
osku
af84ccc340 From MySQL:
Added new function to handlerton.
2006-04-24 11:34:49 +00:00
osku
55c1115212 From MySQL:
Refactored some code to remove ifdef and removed dead code related to
un-useable sync code.
2006-04-24 11:33:51 +00:00
osku
19ea5ccd7f From MySQL:
After merge fixes.
2006-04-24 11:33:00 +00:00
osku
032df406cb Remove remnants of the obsolete concept of memoryfixing tables and indexes.
Remove unused dict_table_LRU_trim().

Remove unused 'trx' parameter from the functions dict_table_get_on_id_low,
dict_table_get and dict_table_get_and_increment_handle_count.
2006-04-24 09:39:13 +00:00
osku
8289f64a58 Move calling of thr_local_free() from trx_free_for_mysql() to
innobase_close_connection().
2006-03-31 04:58:02 +00:00
jan
fd93a09ed0 Port r388 from trunk: Remove assertion ut_error which crashes the mysqld
server if it prints a warning about the adaptive latch.
2006-03-29 11:23:10 +00:00
jan
dd35291070 Port r375 from branches/5.0: Fix bug #15650 additional error InnoDB:
Error: unlock row could not find a 0 mode lock on the record.
2006-03-28 06:34:12 +00:00
jan
1bd22ab327 Setting a isolation level of the transaction to read committed
weakens the locks for this session similarly like the option
innodb_locks_unsafe_for_binlog. This patch removes almost all
gap locking (used in next-key locking) and makes MySQL to release
the row locks on the rows which does not belong to result set.
Additionally, nonlocking selects on INSERT INTO SELECT,
UPDATE ... (SELECT ...), and CREATE ... SELECT ... use a
nonlocking consistent read. If a binlog is used, then binlog
format should be set to row based binloging to make the execution
of the complex SQL statements.
2006-03-27 05:33:30 +00:00
jan
df5ec8b2f3 Merge r357 from branches/5.0: Fix bug #18350 Use consistent read in
CREATE ... SELECT... if innodb_locks_unsafe_for_binlog is used. 
This patch is from Heikki.
2006-03-21 10:00:30 +00:00
marko
43a21f6ed4 Merge r328:340 from branches/5.0:
r340: Fix http://bugs.mysql.com/bug.php?id=18283 in ha_innodb.cc and
http://bugs.mysql.com/bug.php?id=18238 in InnoDB

r339: Remove disk space leak on update of BLOB columns (Bug #18252).

btr_cur_pessimistic_update(): Invoke rec_get_offsets() after
rec_set_field_extern_bits().

btr_store_big_rec_extern_fields(): Note that offsets will no longer be
valid after calling this function.

r338: Fix bug 18238 : check in pessimistic insert and update if the buffer
pool is exhausted by locks
2006-03-17 08:20:14 +00:00
jan
675d29fe96 Forward port r315 from branches/5.0:
Fix a bug #18077 InnoDB uses full explicit table locks in
stored FUNCTION.
2006-03-13 09:51:38 +00:00
marko
8f6fdc86a8 Do not use inlined functions in ha_innodb.cc.
Add dict_table_is_comp_noninline().  Replace calls to dict_table_is_comp()
in ha_innodb.cc with dict_table_is_comp_noninline().
2006-03-13 09:27:34 +00:00
marko
5317b07a9b Merge changes from MySQL that were identified when merging r269 to MySQL. 2006-03-10 14:26:08 +00:00
osku
52d2051e95 Change ut_print_buf() and mem_analyze_corruption() to take a void*, not a
byte*. Remove redundant casts from callers.
2006-03-06 09:45:04 +00:00
osku
1a8f28e6dd Remove "ibool comp" from dict_table_t and replace it with "ulint flags"
which can contain the new flag DICT_TF_COMPACT. Change dict_mem_table_create
to take a flags argument. Add dict_table_is_comp(). Adapt all users.

Change some places to explicitly assume that system tables do not use the
compact page format.
2006-02-27 09:11:57 +00:00
osku
ab8517f396 Fix invalid brace positioning and spaces before tabs. 2006-02-24 09:53:01 +00:00
osku
591e526f93 Remove tabs from within printed strings and two instances of trailing
whitespace.
2006-02-24 09:41:20 +00:00
osku
b5ebf0b4be Port r225 from branches/5.0:
Fix memory allocation bug (by changing MY_WME to MY_FAE) in
ha_innodb.cc:get_share.
2006-02-22 12:48:49 +00:00
osku
ac69f8c21b Style cleanups: Convert spaces to tabs, remove trailing whitespace, other
misc cleanups.
2006-02-21 12:37:54 +00:00
osku
460042ef0d Remove the concept of "field order", as we will not support descending order
indexes.
2006-02-20 12:38:10 +00:00
osku
44a14a1791 Fix all function declarations to have the correct number of '=' characters. 2006-02-20 12:12:22 +00:00
marko
fb345eefe5 Revert r148 until MySQL AB has finally merged the code to the 5.1 tree:
Port r146 from branches/5.0:

Make innodb_flush_log_at_trx_commit a settable global variable.
2006-02-13 11:57:38 +00:00
osku
08af835d23 Apply InnoDB-specific parts of the fix for bug #9680, wrong error from
cascading update.
2006-02-10 09:16:35 +00:00
marko
9b1c2825ff Import mysql-5.1-new changeset 1.1945.48.1 (Anthony Curtis):
Finalize storage engine plugins

ha_innodb.cc: remove unwanted handlerton entries; changes for show status
2006-01-27 10:17:02 +00:00
marko
82381c6bef Import mysql-5.1-new changeset 1.2012.1.8 (Sergei Golubchik):
WL#2935 - SHOW STATUS support in plugins

ha_innodb.cc, ha_innodb.h: s/struct show_var_st/SHOW_VAR/
2006-01-27 09:57:01 +00:00
marko
a4f11935e1 Import mysql-5.1-new changeset 1.2011.1.1 (Alexander Barkov):
WL#1324 table name to file name encoding

ha_innobase::create(): do not remove .frm extension

row_is_mysql_tmp_table_name(): replace '#' with '@0023'
2006-01-27 09:41:19 +00:00
marko
bf58448f97 Import those changes from mysql-5.1-new ChangeSet 1.1979 (Lars Thalmann)
that were not part of r154.  (Bug #3300)

innodb.test, innodb.result: Remove binlog related tests, because they
are not InnoDB specific; they merely require a transactional table.

ha_innobase::ha_innobase(): Add HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
to table_flags.

ha_innobase::rnd_init(): Disable semi-consistent read for random access.
2006-01-27 09:34:55 +00:00
marko
e62060724f Implement semi-consistent read to reduce lock conflicts at the cost
of breaking serializability.  (Bug #3300)

ha_innobase::unlock_row(): reset the "did semi consistent read" flag

ha_innobase::was_semi_consistent_read(),
ha_innobase::try_semi_consistent_read(): new methods

row_prebuilt_t, row_create_prebuilt(): add field row_read_type for
keeping track of semi-consistent reads

row_vers_build_for_semi_consistent_read(),
row_sel_build_committed_vers_for_mysql(): new functions

row_search_for_mysql(): implement semi-consistent reads
2006-01-26 10:45:27 +00:00
marko
6234dd648e Port r146 from branches/5.0:
Make innodb_flush_log_at_trx_commit a settable global variable.
2006-01-19 13:31:02 +00:00
marko
34f1d3e6d6 Port r145 from branches/5.0:
Make innodb_thread_concurrency 0 by default, and extend the useable
range from 0 to 1000 (0 disables the thread throttling).

Remove SRV_CONCURRENCY_THRESHOLD (20).  The magic value to
disable the thread throttling is 0 from now on.
2006-01-19 13:30:20 +00:00
osku
8c66ed2c3b Port r139 from branches/5.0:
From MySQL:

Fix bug #15108 (mysqld crashes when innodb_log_file_size is set > 4GB).
2006-01-18 10:52:53 +00:00
jan
04e8d675c5 Forward port r133 from branches/5.0:
Remember to use noninlined versions of the functions
on ha_innodb.cc !
2006-01-17 13:08:48 +00:00
jan
1cae280896 Forward port r127 from branches/5.0:
Fixed a bug #16229 MySQL/InnoDB uses full explicit table locks 
in trigger processing. Take a InnoDB table lock only if user has explicitly
requested a table lock. Added some additional comments to store_lock() and 
external_lock(). Added test cases for a bug. Fixed some code style errors.
2006-01-12 09:16:11 +00:00
jan
191ae582a2 Forward port r108 from from branches/5.0:
Fixed bug #15308: Problem of Order with Enum Column in 
Primary Key. Added a new test case for bug #14056.
2006-01-12 08:58:56 +00:00
jan
f94253678c Forward port r120 from branches/5.0:
Added diagnostic code trx_print() to 
innobase_query_caching_of_table_permitted() to find reason
why we are holding adaptive search latch.
2006-01-12 08:42:46 +00:00
marko
dd42a65a69 Port r118 from branches/5.0:
Remove some declarations of unused global variables and member variables
of class ha_innobase.
2006-01-05 07:54:34 +00:00
osku
5b2758ca7b From MySQL:
Fix for BUG#11704: "Found locks from different thread" warnings:
 The source of warnings was this scenario in OPTIMIZE:

     thr1: lock table with TL_WRITE_ONLY (InnoDB converts lock to
     TL_WRITE_ALLOW_WRITE)

     thr2: (UPDATE command) obtains a TL_WRITE_ALLOW_WRITE lock

     thr1: call mysql_lock_abort(). This function sets type of thr'1 lock
     to TL_WRITE_ONLY

     thr2: try to release thr2's lock. See two locks: TL_WRITE_ONLY,
     TL_WRITE_ALLOW_WRITE and produce a warning.
   
The fix: Make InnoDB not to convert TL_WRITE_ONLY locks to
TL_WRITE_ALLOW_WRITE in OPTIMIZE TABLE.
2005-12-15 10:53:54 +00:00
marko
eacc1b5d75 Port r98 from branches/5.0: INCOMPATIBLE CHANGE:
Do not pad VARBINARY or BINARY columns. (Bug #14189)

innodb.test, innodb.result: Add test cases for foreign key constraints
between VARBINARY and BINARY columns, and between VARCHAR BINARY and
CHAR BINARY columns.

innobase_init(): Assert that
DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number.

dtype_get_pad_char(): Do not pad VARBINARY or BINARY columns.

row_ins_cascade_calc_update_vec(): Refuse ON UPDATE CASCADE
when trying to change the length of a VARBINARY column
that refers to or is referenced by a BINARY column.  BINARY
columns are no longer padded on comparison, and thus they
cannot be padded on storage either.
2005-12-14 14:05:34 +00:00
jan
d58a6c7c6a trunk: Port a fix for bug #15308 Problem of Order with Enum Column in Primary
Key from branches/5.0.
2005-12-12 11:18:31 +00:00
osku
389c33b746 Port r87 from branches/5.0:
Work around Bug #12071: Do not call os_file_create_tmpfile() at runtime.
Instead, create all tempfiles at startup and guard access to them with
mutexes.
2005-12-08 14:27:09 +00:00
osku
f170421e74 Reintroduce geometry support that was temporarily removed in r4. 2005-12-01 14:20:36 +00:00
osku
94cdd5c068 From MySQL:
We new use TABLE_SHARE instead of TABLE when creating engine handlers.
2005-11-30 12:31:55 +00:00
osku
1ed017dd69 From MySQL:
innobase_savepoint():
  Replaced check which always failed due to similar check in caller
  with assertion.
2005-11-30 12:30:36 +00:00
osku
8f9c53cee4 From MySQL:
Fixed compiler error for Win32 build.
2005-11-30 12:29:46 +00:00
osku
241e97fba0 Support >4GB buffer pool and log files on 64-bit Windows. Fixes bug
#12701.

Synced from MySQL.
2005-11-29 11:10:15 +00:00
osku
1a77f1c52c Check index column sizes in a better way (bug #13315). 2005-11-04 10:57:22 +00:00
osku
e653f84f3f Add 5.0 -> 5.1 changes. 2005-10-27 07:51:34 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00