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
Check column value against the col max value before updating the table's
global autoinc counter value. This is part of simplifying the AUTOINC
sub-system. We extract the type info from MySQL data structures at runtime.
This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
the assertion where it crashed previously, since the type has now changed
to unsigned, it doesn't make sense to check for < 0. Added new tests, to
check for overflow, for the different INT types supported for both
signed and unsigned.
Fixes Bug# 34335
ChangeSet@1.2567, 2007-07-27 14:44:31+05:00, svoj@june.mysql.com +3 -0
Merge mysql.com:/home/svoj/devel/mysql/BUG29957/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG29957/mysql-5.1-engines
MERGE: 1.1810.2871.44
One test case in innodb.test fails because of auto-increment
changes in r1562:1653:
$diff innodb.result innodb.reject
504c504
< 3 test2 this will work
---
> 4 test2 this will work
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
ChangeSet@2007-05-10 12:59:39+03:00, monty@mysql.com
WL#3817: Simplify string / memory area types and make things more consistent
(first part)
The following type conversions was done:
- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t
Removed declaration of byte, gptr, my_string, my_size_t and size_s.
[...]
ha_innodb.cc:
Removed some old types
Updated hash-get-key function arguments
Added missing casts for alloc() and printf()
Removed some not needed casts
ha_innodb.h:
Removed some old types
and adapt some things.
Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>. Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
Remove storage/innobase/*/Makefile.am. The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.
plug.in: Declare InnoDB as a dynamic plugin.
ha_innodb.h: Remove the declarations of many global variables. The variables
are no longer directly referenced outside of storage/innobase.
trx_t: Add the field trx->duplicates.
trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
innobase_query_is_update(): Remove. Consult trx->duplicates instead.
MySQL calls external_lock at the beginning and end of a statement
when it is not calling start_stmt or commit or rollback. Thus,
statement boundaries can be (and are already) detected without
monitoring thd->query_id.
The function innobase_commit() seemingly lacks the call to
innobase_release_stat_resources(), which should be called at
the end of every SQL statement. The call was replaced by
equivalent statements by Vadim Tkachenko when he implemented
innodb_commit_concurrency in MySQL 5.0:
http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1
ChangeSet@1.2409.1.83 2007-03-06 10:36:15-07:00 tsmith@hindu.god
Bug #26598: Create variable to allow turning off of statistic gathering
on metadata commands
Add innodb_stats_on_metadata option, which enables gathering
index statistics when processing metadata commands such as
SHOW TABLE STATUS. Default behavior of the server does not
change (this option is enabled by default).
innobase_query_caching_of_table_permitted(): Make static.
ha_innobase::register_query_cache_table(): Move the function
definition from ha_innodb.h to ha_innodb.cc. Add comments.
void* innobase_prebuilt;
to this:
row_prebuilt_t* prebuilt;
by introducing the typedef in ha_innodb.h, and remove all the now needless
local variables and casts in ha_innodb.cc.
ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0
Many files:
Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
Adjusted year(s) in copyright header
Added GPL copyright text
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
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
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