Commit 10c53c39 authored by Marko Makela's avatar Marko Makela

dict_create_index_step(): Invoke dict_index_add_to_cache()

in strict mode only if innodb_strict_mode is set. (Bug #50495)

trx_is_strict(): New function, for checking innodb_strict_mode.
parent 8b2f33f8
2010-04-20 The InnoDB Team
* dict/dict0crea.c, handler/ha_innodb.cc, include/trx0trx.h:
Fix Bug#50495 'Row size too large' for plugin, but works for
built-in InnoDB
Only check the record size at index creation time when
innodb_strict_mode is set.
2010-04-20 The InnoDB Team 2010-04-20 The InnoDB Team
* btr/btr0btr.c, include/univ.i: * btr/btr0btr.c, include/univ.i:
......
...@@ -1106,7 +1106,7 @@ dict_create_index_step( ...@@ -1106,7 +1106,7 @@ dict_create_index_step(
dulint index_id = node->index->id; dulint index_id = node->index->id;
err = dict_index_add_to_cache(node->table, node->index, err = dict_index_add_to_cache(node->table, node->index,
FIL_NULL, TRUE); FIL_NULL, trx_is_strict(trx));
node->index = dict_index_get_if_in_cache_low(index_id); node->index = dict_index_get_if_in_cache_low(index_id);
ut_a(!node->index == (err != DB_SUCCESS)); ut_a(!node->index == (err != DB_SUCCESS));
......
...@@ -1816,6 +1816,19 @@ trx_is_interrupted( ...@@ -1816,6 +1816,19 @@ trx_is_interrupted(
return(trx && trx->mysql_thd && thd_killed((THD*) trx->mysql_thd)); return(trx && trx->mysql_thd && thd_killed((THD*) trx->mysql_thd));
} }
/**********************************************************************//**
Determines if the currently running transaction is in strict mode.
@return TRUE if strict */
extern "C" UNIV_INTERN
ibool
trx_is_strict(
/*==========*/
trx_t* trx) /*!< in: transaction */
{
return(trx && trx->mysql_thd
&& THDVAR((THD*) trx->mysql_thd, strict_mode));
}
/**************************************************************//** /**************************************************************//**
Resets some fields of a prebuilt struct. The template is used in fast Resets some fields of a prebuilt struct. The template is used in fast
retrieval of just those column values MySQL needs in its processing. */ retrieval of just those column values MySQL needs in its processing. */
......
...@@ -391,6 +391,14 @@ ibool ...@@ -391,6 +391,14 @@ ibool
trx_is_interrupted( trx_is_interrupted(
/*===============*/ /*===============*/
trx_t* trx); /*!< in: transaction */ trx_t* trx); /*!< in: transaction */
/**********************************************************************//**
Determines if the currently running transaction is in strict mode.
@return TRUE if strict */
UNIV_INTERN
ibool
trx_is_strict(
/*==========*/
trx_t* trx); /*!< in: transaction */
#else /* !UNIV_HOTBACKUP */ #else /* !UNIV_HOTBACKUP */
#define trx_is_interrupted(trx) FALSE #define trx_is_interrupted(trx) FALSE
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment