mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
branches/innodb+: Merge revisions 2835:2862 from branches/zip:
------------------------------------------------------------------------ r2838 | vasil | 2008-10-21 12:49:27 +0300 (Tue, 21 Oct 2008) | 61 lines branches/zip: Merge 2744:2837 from branches/5.1 (skipping r2782 and r2826): ------------------------------------------------------------------------ r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc branches/5.1: In ha_innobase::info(): Replace sql_print_warning() which prints to mysqld error log with push_warning_printf() which sends the error message to the client. Suggested by: Marko, Sunny, Michael Objected by: Inaam ------------------------------------------------------------------------ r2837 | vasil | 2008-10-21 12:07:44 +0300 (Tue, 21 Oct 2008) | 32 lines Changed paths: M /branches/5.1/mysql-test/innodb-semi-consistent.result M /branches/5.1/mysql-test/innodb-semi-consistent.test M /branches/5.1/mysql-test/innodb.result M /branches/5.1/mysql-test/innodb.test branches/5.1: Merge a change from MySQL (this fixes the failing innodb and innodb-semi-consistent tests): revno: 2757 committer: Georgi Kodinov <kgeorge@mysql.com> branch nick: B39812-5.1-5.1.29-rc timestamp: Fri 2008-10-03 15:24:19 +0300 message: Bug #39812: Make statement replication default for 5.1 (to match 5.0) Make STMT replication default for 5.1. Add a default of MIXED into the config files Fix the tests that needed MIXED replication mode. modified: mysql-test/include/mix1.inc mysql-test/r/innodb-semi-consistent.result mysql-test/r/innodb.result mysql-test/r/innodb_mysql.result mysql-test/r/tx_isolation_func.result mysql-test/t/innodb-semi-consistent.test mysql-test/t/innodb.test mysql-test/t/tx_isolation_func.test sql/mysqld.cc support-files/my-huge.cnf.sh support-files/my-innodb-heavy-4G.cnf.sh support-files/my-large.cnf.sh support-files/my-medium.cnf.sh support-files/my-small.cnf.sh ------------------------------------------------------------------------ ------------------------------------------------------------------------ r2847 | marko | 2008-10-22 10:07:37 +0300 (Wed, 22 Oct 2008) | 6 lines branches/zip: page_zip_rec_needs_ext(): Fix a bug that was introduced in the fix of Mantis issue #73. With key_block_size=16, we will also have to check the available space on the uncompressed page. Otherwise, the clustered index record can be almost 16 kilobytes in size, and the undo log record will not fit. ------------------------------------------------------------------------ r2850 | marko | 2008-10-22 13:52:12 +0300 (Wed, 22 Oct 2008) | 2 lines branches/zip: ibuf_insert_to_index_page(): Discard the local variable block. page_cur is always positioned on block, the function parameter. ------------------------------------------------------------------------ r2853 | sunny | 2008-10-23 01:52:09 +0300 (Thu, 23 Oct 2008) | 2 lines branches/zip: Add missing UNIV_INTERN. ------------------------------------------------------------------------ r2855 | sunny | 2008-10-23 09:29:46 +0300 (Thu, 23 Oct 2008) | 36 lines branches/zip: Merge revisions 2837:2852 from branches/5.1: ------------------------------------------------------------------------ r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc M /branches/5.1/include/row0mysql.h M /branches/5.1/row/row0mysql.c branches/5.1: Return the actual error code encountered when allocating a new autoinc value. The change in behavior (bug) was introduced in 5.1.22 when we introduced the new AUTOINC locking model. rb://31 Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors ------------------------------------------------------------------------ r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc M /branches/5.1/handler/ha_innodb.h branches/5.1: Backport r2724 from branches/zip 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 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r2856 | sunny | 2008-10-23 10:07:05 +0300 (Thu, 23 Oct 2008) | 1 line Reverting test file changes from r2855 ------------------------------------------------------------------------ r2857 | sunny | 2008-10-23 10:24:33 +0300 (Thu, 23 Oct 2008) | 30 lines branches/zip: Merge revisions 2852:2854 from branches/5.1: ------------------------------------------------------------------------ r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines Changed paths: M /branches/5.1/dict/dict0dict.c M /branches/5.1/dict/dict0mem.c M /branches/5.1/handler/ha_innodb.cc M /branches/5.1/handler/ha_innodb.h M /branches/5.1/include/dict0dict.h M /branches/5.1/include/dict0mem.h M /branches/5.1/row/row0mysql.c branches/5.1: Backport changes from branches/zip r2725 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 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r2858 | vasil | 2008-10-23 11:33:43 +0300 (Thu, 23 Oct 2008) | 4 lines branches/zip: Update the ChangeLog ------------------------------------------------------------------------ r2861 | marko | 2008-10-23 12:27:15 +0300 (Thu, 23 Oct 2008) | 24 lines branches/zip: Clean up the file format stamping. trx_sys_file_format_max_upgrade(): Rename from trx_sys_file_format_max_update(). Improve the documentation. Add a const qualifier to the parameter "name". Replace the parameter "flags" with "format_id", because this function should deal with file format identifiers, not with table flags. trx_sys_file_format_max_write(), trx_sys_file_format_max_set(): Add a const qualifier to the parameter "name". ha_innodb.cc: Correct the spelling in some comments: "side effect". Remove redundant prototypes for some static callback functions. innodb_file_format_name_update(), innodb_file_format_check_update(): Correct the function signature. Use appropriate pointer type conversions. MYSQL_SYSVAR_STR(file_format), MYSQL_SYSVAR_STR(file_format_check): Remove the type conversions from the callback function pointers. When the function signatures match, no type conversion is needed. The type conversions would only prevent compilation warnings for any mismatch. Approved by Sunny in rb://25. ------------------------------------------------------------------------ r2862 | marko | 2008-10-23 12:37:42 +0300 (Thu, 23 Oct 2008) | 8 lines branches/zip: Non-functional changes: ibuf_get_volume_buffered(): Declare with static linkage. This function is private to ibuf0ibuf.c. btr_cur_pessimistic_delete(): Use the cached result of btr_cur_get_index(cursor). ------------------------------------------------------------------------
This commit is contained in:
parent
c782aeff5e
commit
70f1128619
17 changed files with 181 additions and 179 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
|||
2008-10-22 The InnoDB Team
|
||||
|
||||
* dict/dict0dict.c, dict/dict0mem.c, handler/ha_innodb.cc,
|
||||
handler/ha_innodb.h, include/dict0dict.h, include/dict0mem.h,
|
||||
row/row0mysql.c:
|
||||
Fix Bug#39830 Table autoinc value not updated on first insert
|
||||
Fix Bug#35498 Cannot get table test/table1 auto-inccounter value in
|
||||
::info
|
||||
Fix Bug#36411 "Failed to read auto-increment value from storage
|
||||
engine" in 5.1.24 auto-inc
|
||||
|
||||
2008-10-22 The InnoDB Team
|
||||
|
||||
* handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c:
|
||||
Fix Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout
|
||||
errors
|
||||
|
||||
2008-10-09 The InnoDB Team
|
||||
|
||||
* buf/buf0lru.c:
|
||||
Fix Bug#39939 DROP TABLE/DISCARD TABLESPACE takes long time in
|
||||
buf_LRU_invalidate_tablespace()
|
||||
|
||||
2008-10-08 The InnoDB Team
|
||||
|
||||
* dict/dict0crea.c, trx/trx0roll.c, include/row0mysql.h,
|
||||
|
|
|
@ -3004,7 +3004,7 @@ btr_cur_pessimistic_delete(
|
|||
}
|
||||
|
||||
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
|
||||
&& UNIV_UNLIKELY(dict_index_get_page(btr_cur_get_index(cursor))
|
||||
&& UNIV_UNLIKELY(dict_index_get_page(index)
|
||||
!= buf_block_get_page_no(block))) {
|
||||
|
||||
/* If there is only one record, drop the whole page in
|
||||
|
|
|
@ -317,7 +317,7 @@ dict_table_autoinc_read(
|
|||
|
||||
/************************************************************************
|
||||
Updates the autoinc counter if the value supplied is greater than the
|
||||
current value. If not inited, does nothing. */
|
||||
current value. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
dict_table_autoinc_update_if_greater(
|
||||
|
@ -329,6 +329,7 @@ dict_table_autoinc_update_if_greater(
|
|||
ut_ad(mutex_own(&table->autoinc_mutex));
|
||||
|
||||
if (value > table->autoinc) {
|
||||
|
||||
table->autoinc = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,12 @@ dict_mem_table_create(
|
|||
|
||||
mutex_create(&table->autoinc_mutex, SYNC_DICT_AUTOINC_MUTEX);
|
||||
|
||||
table->autoinc = 0;
|
||||
|
||||
/* The number of transactions that are either waiting on the
|
||||
AUTOINC lock or have been granted the lock. */
|
||||
table->n_waiting_or_granted_auto_inc_locks = 0;
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
table->magic_n = DICT_TABLE_MAGIC_N;
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
|
|
@ -210,7 +210,7 @@ innobase_file_format_name_lookup(
|
|||
const char* format_name); /* in: pointer to file format
|
||||
name */
|
||||
/****************************************************************
|
||||
Validate the file format check config parameters, as a side affect it
|
||||
Validate the file format check config parameters, as a side effect it
|
||||
sets the srv_check_file_format_at_startup variable. */
|
||||
static
|
||||
bool
|
||||
|
@ -220,7 +220,7 @@ innobase_file_format_check_on_off(
|
|||
"on" or "off" */
|
||||
const char* format_check); /* in: parameter value */
|
||||
/****************************************************************
|
||||
Validate the file format check config parameters, as a side affect it
|
||||
Validate the file format check config parameters, as a side effect it
|
||||
sets the srv_check_file_format_at_startup variable. */
|
||||
static
|
||||
bool
|
||||
|
@ -229,71 +229,6 @@ innobase_file_format_check_validate(
|
|||
/* out: true if valid
|
||||
config value */
|
||||
const char* format_check); /* in: parameter value */
|
||||
/*****************************************************************
|
||||
Check if it is a valid file format. This function is registered as
|
||||
a callback with MySQL. */
|
||||
static
|
||||
int
|
||||
innodb_file_format_name_validate(
|
||||
/*=============================*/
|
||||
/* out: 0 for valid file
|
||||
format */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to system
|
||||
variable */
|
||||
void* save, /* out: immediate result
|
||||
for update function */
|
||||
struct st_mysql_value* value); /* in: incoming string */
|
||||
/********************************************************************
|
||||
Update the system variable innodb_file_format using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
bool
|
||||
innodb_file_format_name_update(
|
||||
/*===========================*/
|
||||
/* out: should never
|
||||
fail since it is
|
||||
already validated */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to
|
||||
system variable */
|
||||
void* var_ptr,/* out: where the
|
||||
formal string goes */
|
||||
void* save); /* in: immediate result
|
||||
from check function */
|
||||
/*****************************************************************
|
||||
Check if it is a valid file format. This function is registered as
|
||||
a callback with MySQL. */
|
||||
static
|
||||
int
|
||||
innodb_file_format_check_validate(
|
||||
/*==============================*/
|
||||
/* out: 0 for valid file
|
||||
format */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to system
|
||||
variable */
|
||||
void* save, /* out: immediate result
|
||||
for update function */
|
||||
struct st_mysql_value* value); /* in: incoming string */
|
||||
/********************************************************************
|
||||
Update the system variable innodb_file_format_check using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
bool
|
||||
innodb_file_format_check_update(
|
||||
/*============================*/
|
||||
/* out: should never
|
||||
fail since it is
|
||||
already validated */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to
|
||||
system variable */
|
||||
void* var_ptr,/* out: where the
|
||||
formal string goes */
|
||||
void* save); /* in: immediate result
|
||||
from check function */
|
||||
|
||||
/********************************************************************
|
||||
Return alter table flags supported in an InnoDB database. */
|
||||
static
|
||||
|
@ -1136,7 +1071,9 @@ innobase_next_autoinc(
|
|||
/* Should never be 0. */
|
||||
ut_a(increment > 0);
|
||||
|
||||
if (offset <= 1) {
|
||||
if (max_value <= current) {
|
||||
next_value = max_value;
|
||||
} else if (offset <= 1) {
|
||||
/* Offset 0 and 1 are the same, because there must be at
|
||||
least one node in the system. */
|
||||
if (max_value - current <= increment) {
|
||||
|
@ -1161,6 +1098,8 @@ innobase_next_autoinc(
|
|||
} else {
|
||||
next_value *= increment;
|
||||
|
||||
ut_a(max_value >= next_value);
|
||||
|
||||
/* Check for overflow. */
|
||||
if (max_value - next_value <= offset) {
|
||||
next_value = max_value;
|
||||
|
@ -1984,13 +1923,13 @@ innobase_init(
|
|||
/* Process innobase_file_format_check variable */
|
||||
ut_a(innobase_file_format_check != NULL);
|
||||
|
||||
/* As a side affect it will set srv_check_file_format_at_startup
|
||||
/* As a side effect it will set srv_check_file_format_at_startup
|
||||
on valid input. First we check for "on"/"off". */
|
||||
if (!innobase_file_format_check_on_off(innobase_file_format_check)) {
|
||||
|
||||
/* Did the user specify a format name that we support ?
|
||||
As a side affect it will update the variable
|
||||
srv_check_file_format_at_startup*/
|
||||
As a side effect it will update the variable
|
||||
srv_check_file_format_at_startup */
|
||||
if (!innobase_file_format_check_validate(
|
||||
innobase_file_format_check)) {
|
||||
|
||||
|
@ -2800,7 +2739,7 @@ normalize_table_name(
|
|||
/************************************************************************
|
||||
Set the autoinc column max value. This should only be called once from
|
||||
ha_innobase::open(). Therefore there's no need for a covering lock. */
|
||||
|
||||
UNIV_INTERN
|
||||
ulint
|
||||
ha_innobase::innobase_initialize_autoinc()
|
||||
/*======================================*/
|
||||
|
@ -2832,7 +2771,7 @@ ha_innobase::innobase_initialize_autoinc()
|
|||
"index (%s).\n", error, col_name, index->name);
|
||||
}
|
||||
|
||||
return(ulong(error));
|
||||
return(error);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -3028,8 +2967,9 @@ retry:
|
|||
/* We update the highest file format in the system table
|
||||
space, if this table has higher file format setting. */
|
||||
|
||||
trx_sys_file_format_max_update(
|
||||
prebuilt->table->flags, &innobase_file_format_check);
|
||||
trx_sys_file_format_max_upgrade(
|
||||
(const char**) &innobase_file_format_check,
|
||||
dict_table_get_format(prebuilt->table));
|
||||
}
|
||||
|
||||
info(HA_STATUS_NO_LOCK | HA_STATUS_VARIABLE | HA_STATUS_CONST);
|
||||
|
@ -4138,8 +4078,20 @@ no_commit:
|
|||
/* This is the case where the table has an auto-increment column */
|
||||
if (table->next_number_field && record == table->record[0]) {
|
||||
|
||||
/* Reset the error code before calling
|
||||
innobase_get_auto_increment(). */
|
||||
prebuilt->autoinc_error = DB_SUCCESS;
|
||||
|
||||
if ((error = update_auto_increment())) {
|
||||
|
||||
/* We don't want to mask autoinc overflow errors. */
|
||||
if (prebuilt->autoinc_error != DB_SUCCESS) {
|
||||
error = prebuilt->autoinc_error;
|
||||
|
||||
goto report_error;
|
||||
}
|
||||
|
||||
/* MySQL errors are passed straight back. */
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
|
@ -4241,6 +4193,7 @@ set_max_autoinc:
|
|||
|
||||
innodb_srv_conc_exit_innodb(prebuilt->trx);
|
||||
|
||||
report_error:
|
||||
error = convert_error_code_to_mysql(error, prebuilt->table->flags,
|
||||
user_thd);
|
||||
|
||||
|
@ -6149,10 +6102,14 @@ ha_innobase::create(
|
|||
|
||||
DBUG_ASSERT(innobase_table != 0);
|
||||
|
||||
/* We update the highest file format in the system table
|
||||
space, if this table has a higher file format setting. */
|
||||
if (innobase_table) {
|
||||
/* We update the highest file format in the system table
|
||||
space, if this table has higher file format setting. */
|
||||
|
||||
trx_sys_file_format_max_update(flags, &innobase_file_format_check);
|
||||
trx_sys_file_format_max_upgrade(
|
||||
(const char**) &innobase_file_format_check,
|
||||
dict_table_get_format(innobase_table));
|
||||
}
|
||||
|
||||
/* Note: We can't call update_thd() as prebuilt will not be
|
||||
setup at this stage and so we use thd. */
|
||||
|
@ -6915,12 +6872,21 @@ ha_innobase::info(
|
|||
ib_table->space) * 1024;
|
||||
} else {
|
||||
|
||||
sql_print_warning(
|
||||
"Trying to get the free space for "
|
||||
"table %s but its tablespace has "
|
||||
"been discarded or the .ibd file "
|
||||
"is missing. Setting the free space "
|
||||
"to zero.", ib_table->name);
|
||||
THD* thd;
|
||||
|
||||
thd = ha_thd();
|
||||
|
||||
push_warning_printf(
|
||||
thd,
|
||||
MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_CANT_GET_STAT,
|
||||
"InnoDB: Trying to get the free "
|
||||
"space for table %s but its "
|
||||
"tablespace has been discarded or "
|
||||
"the .ibd file is missing. Setting "
|
||||
"the free space to zero.",
|
||||
ib_table->name);
|
||||
|
||||
stats.delete_length = 0;
|
||||
}
|
||||
|
||||
|
@ -8362,49 +8328,22 @@ ha_innobase::innobase_get_autoinc(
|
|||
/* out: DB_SUCCESS or error code */
|
||||
ulonglong* value) /* out: autoinc value */
|
||||
{
|
||||
ulint error;
|
||||
|
||||
*value = 0;
|
||||
|
||||
error = innobase_lock_autoinc();
|
||||
prebuilt->autoinc_error = innobase_lock_autoinc();
|
||||
|
||||
if (error == DB_SUCCESS) {
|
||||
if (prebuilt->autoinc_error == DB_SUCCESS) {
|
||||
|
||||
/* Determine the first value of the interval */
|
||||
*value = dict_table_autoinc_read(prebuilt->table);
|
||||
|
||||
/* It should have been initialized during open. */
|
||||
ut_a(*value != 0);
|
||||
|
||||
/* We need to send the messages to the client because
|
||||
handler::get_auto_increment() doesn't allow a way
|
||||
to return the specific error for why it failed. */
|
||||
} else if (error == DB_DEADLOCK) {
|
||||
THD* thd = ha_thd();
|
||||
|
||||
push_warning(
|
||||
thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
ER_LOCK_DEADLOCK,
|
||||
"InnoDB: Deadlock in "
|
||||
"innobase_get_autoinc()");
|
||||
} else if (error == DB_LOCK_WAIT_TIMEOUT) {
|
||||
THD* thd = ha_thd();
|
||||
|
||||
push_warning(
|
||||
thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
ER_LOCK_WAIT_TIMEOUT,
|
||||
"InnoDB: Lock wait timeout in "
|
||||
"innobase_get_autoinc()");
|
||||
} else {
|
||||
sql_print_error(
|
||||
"InnoDB: Error: %lu in "
|
||||
"innobase_get_autoinc()",
|
||||
error);
|
||||
}
|
||||
|
||||
return(error);
|
||||
|
||||
return(prebuilt->autoinc_error);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
This function reads the global auto-inc counter. It doesn't use the
|
||||
AUTOINC lock even if the lock mode is set to TRADITIONAL. */
|
||||
|
@ -9079,7 +9018,7 @@ innobase_file_format_name_lookup(
|
|||
|
||||
/****************************************************************
|
||||
Validate the file format check value, is it one of "on" or "off",
|
||||
as a side affect it sets the srv_check_file_format_at_startup variable. */
|
||||
as a side effect it sets the srv_check_file_format_at_startup variable. */
|
||||
static
|
||||
bool
|
||||
innobase_file_format_check_on_off(
|
||||
|
@ -9107,7 +9046,7 @@ innobase_file_format_check_on_off(
|
|||
}
|
||||
|
||||
/****************************************************************
|
||||
Validate the file format check config parameters, as a side affect it
|
||||
Validate the file format check config parameters, as a side effect it
|
||||
sets the srv_check_file_format_at_startup variable. */
|
||||
static
|
||||
bool
|
||||
|
@ -9118,7 +9057,7 @@ innobase_file_format_check_validate(
|
|||
{
|
||||
uint format_id;
|
||||
bool ret = true;
|
||||
|
||||
|
||||
format_id = innobase_file_format_name_lookup(format_check);
|
||||
|
||||
if (format_id < DICT_TF_FORMAT_MAX + 1) {
|
||||
|
@ -9175,32 +9114,25 @@ innodb_file_format_name_validate(
|
|||
Update the system variable innodb_file_format using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
bool
|
||||
void
|
||||
innodb_file_format_name_update(
|
||||
/*===========================*/
|
||||
/* out: should never
|
||||
fail since it is
|
||||
already validated */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to
|
||||
system variable */
|
||||
void* var_ptr, /* out: where the
|
||||
formal string goes */
|
||||
void* save) /* in: immediate result
|
||||
const void* save) /* in: immediate result
|
||||
from check function */
|
||||
{
|
||||
ut_a(var_ptr != NULL);
|
||||
ut_a(save != NULL);
|
||||
ut_a((*(uint*) save) <= DICT_TF_FORMAT_MAX);
|
||||
ut_a((*(const uint*) save) <= DICT_TF_FORMAT_MAX);
|
||||
|
||||
srv_file_format = *(uint*) save;
|
||||
srv_file_format = *(const uint*) save;
|
||||
|
||||
/* Given the type of var_ptr we have little choice but to cast
|
||||
away the constness from the returned name. */
|
||||
(*(char**) var_ptr) =
|
||||
(char*) trx_sys_file_format_id_to_name(srv_file_format);
|
||||
|
||||
return(true);
|
||||
*(const char**) var_ptr
|
||||
= trx_sys_file_format_id_to_name(srv_file_format);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -9269,18 +9201,15 @@ innodb_file_format_check_validate(
|
|||
Update the system variable innodb_file_format_check using the "saved"
|
||||
value. This function is registered as a callback with MySQL. */
|
||||
static
|
||||
bool
|
||||
void
|
||||
innodb_file_format_check_update(
|
||||
/*============================*/
|
||||
/* out: should never
|
||||
fail since it is
|
||||
already validated */
|
||||
THD* thd, /* in: thread handle */
|
||||
struct st_mysql_sys_var* var, /* in: pointer to
|
||||
system variable */
|
||||
void* var_ptr, /* out: where the
|
||||
formal string goes */
|
||||
void* save) /* in: immediate result
|
||||
const void* save) /* in: immediate result
|
||||
from check function */
|
||||
{
|
||||
uint format_id;
|
||||
|
@ -9288,17 +9217,15 @@ innodb_file_format_check_update(
|
|||
ut_a(save != NULL);
|
||||
ut_a(var_ptr != NULL);
|
||||
|
||||
format_id = *(uint*) save;
|
||||
format_id = *(const uint*) save;
|
||||
|
||||
/* Update the max format id in the system tablespace. */
|
||||
if (trx_sys_file_format_max_set(format_id, (char**) var_ptr)) {
|
||||
if (trx_sys_file_format_max_set(format_id, (const char**) var_ptr)) {
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" [Info] InnoDB: the file format in the system "
|
||||
"tablespace is now set to %s.\n", *(char**) var_ptr);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
|
||||
|
@ -9355,14 +9282,14 @@ static MYSQL_SYSVAR_BOOL(file_per_table, srv_file_per_table,
|
|||
static MYSQL_SYSVAR_STR(file_format, innobase_file_format_name,
|
||||
PLUGIN_VAR_RQCMDARG,
|
||||
"File format to use for new tables in .ibd files.",
|
||||
(mysql_var_check_func) &innodb_file_format_name_validate,
|
||||
(mysql_var_update_func) &innodb_file_format_name_update, "Antelope");
|
||||
innodb_file_format_name_validate,
|
||||
innodb_file_format_name_update, "Antelope");
|
||||
|
||||
static MYSQL_SYSVAR_STR(file_format_check, innobase_file_format_check,
|
||||
PLUGIN_VAR_OPCMDARG,
|
||||
"The highest file format in the tablespace.",
|
||||
(mysql_var_check_func) &innodb_file_format_check_validate,
|
||||
(mysql_var_update_func) &innodb_file_format_check_update,
|
||||
innodb_file_format_check_validate,
|
||||
innodb_file_format_check_update,
|
||||
"on");
|
||||
|
||||
static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit,
|
||||
|
|
|
@ -81,7 +81,7 @@ class ha_innobase: public handler
|
|||
ulint innobase_update_autoinc(ulonglong auto_inc);
|
||||
ulint innobase_initialize_autoinc();
|
||||
dict_index_t* innobase_get_index(uint keynr);
|
||||
ulonglong innobase_get_int_col_max_value(const Field* field);
|
||||
ulonglong innobase_get_int_col_max_value(const Field* field);
|
||||
|
||||
/* Init values for the class: */
|
||||
public:
|
||||
|
|
|
@ -2526,7 +2526,7 @@ ibuf_contract_after_insert(
|
|||
/*************************************************************************
|
||||
Gets an upper limit for the combined size of entries buffered in the insert
|
||||
buffer for a given page. */
|
||||
UNIV_INTERN
|
||||
static
|
||||
ulint
|
||||
ibuf_get_volume_buffered(
|
||||
/*=====================*/
|
||||
|
@ -3370,11 +3370,9 @@ dump:
|
|||
PAGE_CUR_LE, &page_cur);
|
||||
|
||||
if (low_match == dtuple_get_n_fields(entry)) {
|
||||
buf_block_t* block;
|
||||
page_zip_des_t* page_zip;
|
||||
|
||||
rec = page_cur_get_rec(&page_cur);
|
||||
block = page_cur_get_block(&page_cur);
|
||||
page_zip = buf_block_get_page_zip(block);
|
||||
|
||||
btr_cur_set_deleted_flag_for_ibuf(rec, page_zip, FALSE, mtr);
|
||||
|
|
|
@ -189,8 +189,8 @@ dict_table_autoinc_read(
|
|||
/* out: value for a new row, or 0 */
|
||||
const dict_table_t* table); /* in: table */
|
||||
/************************************************************************
|
||||
Updates the autoinc counter if the value supplied is equal or bigger than the
|
||||
current value. If not inited, does nothing. */
|
||||
Updates the autoinc counter if the value supplied is greater than the
|
||||
current value. */
|
||||
UNIV_INTERN
|
||||
void
|
||||
dict_table_autoinc_update_if_greater(
|
||||
|
|
|
@ -168,9 +168,11 @@ page_zip_rec_needs_ext(
|
|||
the dense page directory for every record. But there
|
||||
is no record header. There should be enough room for
|
||||
one record on an empty leaf page. Subtract 1 byte for
|
||||
the encoded heap number. */
|
||||
the encoded heap number. Check also the available space
|
||||
on the uncompressed page. */
|
||||
return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2)
|
||||
>= (page_zip_empty_size(n_fields, zip_size) - 1));
|
||||
>= (page_zip_empty_size(n_fields, zip_size) - 1)
|
||||
|| rec_size >= page_get_free_space_of_empty(TRUE) / 2);
|
||||
}
|
||||
|
||||
return(rec_size >= page_get_free_space_of_empty(comp) / 2);
|
||||
|
|
|
@ -707,6 +707,11 @@ struct row_prebuilt_struct {
|
|||
ulonglong autoinc_offset; /* The offset passed to
|
||||
get_auto_increment() by MySQL. Required
|
||||
to calculate the next value */
|
||||
ulint autoinc_error; /* The actual error code encountered
|
||||
while trying to init or read the
|
||||
autoinc value from the table. We
|
||||
store it here so that we can return
|
||||
it to MySQL */
|
||||
/*----------------------*/
|
||||
UT_LIST_NODE_T(row_prebuilt_t) prebuilts;
|
||||
/* list node of table->prebuilts */
|
||||
|
|
|
@ -326,7 +326,7 @@ const char*
|
|||
trx_sys_file_format_id_to_name(
|
||||
/*===========================*/
|
||||
/* out: pointer to the name */
|
||||
const uint id); /* in: id of the file format */
|
||||
const ulint id); /* in: id of the file format */
|
||||
/*********************************************************************
|
||||
Set the file format id unconditionally except if it's already the
|
||||
same value. */
|
||||
|
@ -336,7 +336,7 @@ trx_sys_file_format_max_set(
|
|||
/*========================*/
|
||||
/* out: TRUE if value updated */
|
||||
ulint format_id, /* in: file format id */
|
||||
char** name); /* out: max file format name or
|
||||
const char** name); /* out: max file format name or
|
||||
NULL if not needed. */
|
||||
/*********************************************************************
|
||||
Get the name representation of the file format from its id. */
|
||||
|
@ -354,14 +354,16 @@ trx_sys_file_format_max_check(
|
|||
/* out: DB_SUCCESS or error code */
|
||||
ulint max_format_id); /* in: the max format id to check */
|
||||
/************************************************************************
|
||||
Update the file format tag in the tablespace to the max value. */
|
||||
Update the file format tag in the system tablespace only if the given
|
||||
format id is greater than the known max id. */
|
||||
UNIV_INTERN
|
||||
ibool
|
||||
trx_sys_file_format_max_update(
|
||||
/*===========================*/
|
||||
/* out: TRUE if value updated */
|
||||
uint flags, /* in: flags of the table */
|
||||
char** name); /* out: max format name */
|
||||
trx_sys_file_format_max_upgrade(
|
||||
/*============================*/
|
||||
/* out: TRUE if format_id was
|
||||
bigger than the known max id */
|
||||
const char** name, /* out: max file format name */
|
||||
ulint format_id); /* in: file format identifier */
|
||||
/* The automatically created system rollback segment has this id */
|
||||
#define TRX_SYS_SYSTEM_RSEG_ID 0
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
drop table if exists t1;
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
|
||||
|
@ -6,6 +7,7 @@ set autocommit=0;
|
|||
select * from t1 where a=3 lock in share mode;
|
||||
a
|
||||
3
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
set autocommit=0;
|
||||
update t1 set a=10 where a=5;
|
||||
|
|
|
@ -10,6 +10,7 @@ drop table if exists t1;
|
|||
connect (a,localhost,root,,);
|
||||
connect (b,localhost,root,,);
|
||||
connection a;
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
||||
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
|
||||
|
@ -17,6 +18,7 @@ set autocommit=0;
|
|||
# this should lock the entire table
|
||||
select * from t1 where a=3 lock in share mode;
|
||||
connection b;
|
||||
set binlog_format=mixed;
|
||||
set session transaction isolation level read committed;
|
||||
set autocommit=0;
|
||||
-- error ER_LOCK_WAIT_TIMEOUT
|
||||
|
|
|
@ -1024,6 +1024,7 @@ id code name
|
|||
4 2 Erik
|
||||
5 3 Sasha
|
||||
COMMIT;
|
||||
SET binlog_format='MIXED';
|
||||
BEGIN;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
|
||||
|
@ -2963,9 +2964,11 @@ drop table t1,t2;
|
|||
create table t1(a int not null, b int, primary key(a)) engine=innodb;
|
||||
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
|
||||
commit;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t1 set b = 5 where b = 1;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
select * from t1 where a = 7 and b = 3 for update;
|
||||
|
@ -3004,6 +3007,7 @@ d e
|
|||
3 1
|
||||
8 6
|
||||
12 1
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t1 select * from t2;
|
||||
|
@ -3034,30 +3038,39 @@ a b
|
|||
3 1
|
||||
8 6
|
||||
12 1
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
insert into t1 select * from t2;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
update t3 set b = (select b from t2 where a = d);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t5 (select * from t2 lock in share mode);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t6 set e = (select b from t2 where a = d lock in share mode);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t8 (select * from t2 for update);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t9 set e = (select b from t2 where a = d for update);
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
|
||||
|
@ -3205,6 +3218,7 @@ id
|
|||
-10
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
|
@ -3215,6 +3229,7 @@ CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 LIKE t1;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
@ -3222,10 +3237,12 @@ COMMIT;
|
|||
SELECT * FROM t1 WHERE a=1;
|
||||
a
|
||||
1
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
SELECT * FROM t2;
|
||||
a
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
|
|
@ -701,6 +701,7 @@ insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
|
|||
select id, code, name from t1 order by id;
|
||||
COMMIT;
|
||||
|
||||
SET binlog_format='MIXED';
|
||||
BEGIN;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
|
||||
|
@ -2001,10 +2002,12 @@ connection a;
|
|||
create table t1(a int not null, b int, primary key(a)) engine=innodb;
|
||||
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
|
||||
commit;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
update t1 set b = 5 where b = 1;
|
||||
connection b;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
#
|
||||
|
@ -2072,6 +2075,7 @@ commit;
|
|||
set autocommit = 0;
|
||||
select * from t2 for update;
|
||||
connection b;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
insert into t1 select * from t2;
|
||||
|
@ -2128,46 +2132,55 @@ commit;
|
|||
set autocommit = 0;
|
||||
select * from t2 for update;
|
||||
connection b;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
--send
|
||||
insert into t1 select * from t2;
|
||||
connection c;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
--send
|
||||
update t3 set b = (select b from t2 where a = d);
|
||||
connection d;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
--send
|
||||
create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
|
||||
connection e;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
insert into t5 (select * from t2 lock in share mode);
|
||||
connection f;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
update t6 set e = (select b from t2 where a = d lock in share mode);
|
||||
connection g;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
|
||||
connection h;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
insert into t8 (select * from t2 for update);
|
||||
connection i;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
update t9 set e = (select b from t2 where a = d for update);
|
||||
connection j;
|
||||
SET binlog_format='MIXED';
|
||||
set autocommit = 0;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
--send
|
||||
|
@ -2382,6 +2395,7 @@ DROP TABLE t1;
|
|||
CONNECT (c1,localhost,root,,);
|
||||
CONNECT (c2,localhost,root,,);
|
||||
CONNECTION c1;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
|
@ -2389,6 +2403,7 @@ CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 LIKE t1;
|
||||
SELECT * FROM t2;
|
||||
CONNECTION c2;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
@ -2400,10 +2415,12 @@ DISCONNECT c2;
|
|||
CONNECT (c1,localhost,root,,);
|
||||
CONNECT (c2,localhost,root,,);
|
||||
CONNECTION c1;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
SELECT * FROM t2;
|
||||
CONNECTION c2;
|
||||
SET binlog_format='MIXED';
|
||||
SET TX_ISOLATION='read-committed';
|
||||
SET AUTOCOMMIT=0;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
|
|
@ -625,6 +625,7 @@ row_create_prebuilt(
|
|||
|
||||
prebuilt->clust_ref = ref;
|
||||
|
||||
prebuilt->autoinc_error = 0;
|
||||
prebuilt->autoinc_offset = 0;
|
||||
|
||||
/* Default to 1, we will set the actual value later in
|
||||
|
|
|
@ -24,7 +24,7 @@ Created 3/26/1996 Heikki Tuuri
|
|||
|
||||
/* The file format tag structure with id and name. */
|
||||
struct file_format_struct {
|
||||
uint id; /* id of the file format */
|
||||
ulint id; /* id of the file format */
|
||||
const char* name; /* text representation of the
|
||||
file format */
|
||||
mutex_t mutex; /* covers changes to the above
|
||||
|
@ -95,8 +95,8 @@ static const char* file_format_name_map[] = {
|
|||
};
|
||||
|
||||
/* The number of elements in the file format name array. */
|
||||
static const ulint FILE_FORMAT_NAME_N =
|
||||
sizeof(file_format_name_map) / sizeof(file_format_name_map[0]);
|
||||
static const ulint FILE_FORMAT_NAME_N
|
||||
= sizeof(file_format_name_map) / sizeof(file_format_name_map[0]);
|
||||
|
||||
/* This is used to track the maximum file format id known to InnoDB. It's
|
||||
updated via SET GLOBAL innodb_file_format_check = 'x' or when we open
|
||||
|
@ -1057,7 +1057,7 @@ trx_sys_file_format_max_write(
|
|||
/*==========================*/
|
||||
/* out: always TRUE */
|
||||
ulint format_id, /* in: file format id */
|
||||
char** name) /* out: max file format name, can
|
||||
const char** name) /* out: max file format name, can
|
||||
be NULL */
|
||||
{
|
||||
mtr_t mtr;
|
||||
|
@ -1077,7 +1077,7 @@ trx_sys_file_format_max_write(
|
|||
tag_value_low = format_id + TRX_SYS_FILE_FORMAT_TAG_MAGIC_N_LOW;
|
||||
|
||||
if (name) {
|
||||
*name = (char*) file_format_max.name;
|
||||
*name = file_format_max.name;
|
||||
}
|
||||
|
||||
mlog_write_dulint(
|
||||
|
@ -1137,7 +1137,7 @@ const char*
|
|||
trx_sys_file_format_id_to_name(
|
||||
/*===========================*/
|
||||
/* out: pointer to the name */
|
||||
const uint id) /* in: id of the file format */
|
||||
const ulint id) /* in: id of the file format */
|
||||
{
|
||||
ut_a(id < FILE_FORMAT_NAME_N);
|
||||
|
||||
|
@ -1207,7 +1207,7 @@ trx_sys_file_format_max_set(
|
|||
/*========================*/
|
||||
/* out: TRUE if value updated */
|
||||
ulint format_id, /* in: file format id */
|
||||
char** name) /* out: max file format name or
|
||||
const char** name) /* out: max file format name or
|
||||
NULL if not needed. */
|
||||
{
|
||||
ibool ret = FALSE;
|
||||
|
@ -1248,20 +1248,19 @@ trx_sys_file_format_tag_init(void)
|
|||
}
|
||||
|
||||
/************************************************************************
|
||||
Update the file format tag in the tablespace only if the given format id
|
||||
is greater than the known max id. */
|
||||
Update the file format tag in the system tablespace only if the given
|
||||
format id is greater than the known max id. */
|
||||
UNIV_INTERN
|
||||
ibool
|
||||
trx_sys_file_format_max_update(
|
||||
/*===========================*/
|
||||
uint flags, /* in: flags of the table.*/
|
||||
char** name) /* out: max file format name */
|
||||
trx_sys_file_format_max_upgrade(
|
||||
/*============================*/
|
||||
/* out: TRUE if format_id was
|
||||
bigger than the known max id */
|
||||
const char** name, /* out: max file format name */
|
||||
ulint format_id) /* in: file format identifier */
|
||||
{
|
||||
ulint format_id;
|
||||
ibool ret = FALSE;
|
||||
|
||||
format_id = (flags & DICT_TF_FORMAT_MASK) >> DICT_TF_FORMAT_SHIFT;
|
||||
|
||||
ut_a(name);
|
||||
ut_a(file_format_max.name != NULL);
|
||||
ut_a(format_id <= DICT_TF_FORMAT_MAX);
|
||||
|
|
Loading…
Reference in a new issue