Added function

/***********************************************************************
This function stores binlog offset and flushes logs */


void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset) 
requested by Guilhem to ha_innodb.cc and ha_innodb.h. 

Change made by Jan.Lindstrom@innodb.com
parent 8d520366
...@@ -1748,14 +1748,9 @@ innobase_mysql_cmp( ...@@ -1748,14 +1748,9 @@ innobase_mysql_cmp(
} }
} }
/* Starting from 4.1.3 we use strnncollsp() in comparisons of ret = my_strnncoll(charset,
non-latin1_swedish_ci strings. NOTE that the collation order a, a_length,
changes then: 'b\0\0...' is ordered BEFORE 'b ...'. Users b, b_length);
having indexes on such data need to rebuild their tables! */
ret = charset->coll->strnncollsp(charset,
a, a_length,
b, b_length);
if (ret < 0) { if (ret < 0) {
return(-1); return(-1);
} else if (ret > 0) { } else if (ret > 0) {
...@@ -4663,21 +4658,6 @@ ha_innobase::start_stmt( ...@@ -4663,21 +4658,6 @@ ha_innobase::start_stmt(
prepared for an update of a row */ prepared for an update of a row */
prebuilt->select_lock_type = LOCK_X; prebuilt->select_lock_type = LOCK_X;
} else {
if (thd->lex->sql_command == SQLCOM_SELECT
&& thd->lex->lock_option == TL_READ) {
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT) */
prebuilt->select_lock_type = LOCK_NONE;
} else {
/* Not a consistent read: use LOCK_X as the
select_lock_type value (TODO: how could we know
whether it should be LOCK_S, LOCK_X, or LOCK_NONE?) */
prebuilt->select_lock_type = LOCK_X;
}
} }
/* Set the MySQL flag to mark that there is an active transaction */ /* Set the MySQL flag to mark that there is an active transaction */
...@@ -5057,7 +5037,7 @@ ha_innobase::store_lock( ...@@ -5057,7 +5037,7 @@ ha_innobase::store_lock(
/*********************************************************************** /***********************************************************************
This function initializes the auto-inc counter if it has not been This function initializes the auto-inc counter if it has not been
initialized yet. This function does not change the value of the auto-inc initialized yet. This function does not change the value of the auto-inc
counter if it already has been initialized. In parameter ret returns counter if it already has been initialized. In paramete ret returns
the value of the auto-inc counter. */ the value of the auto-inc counter. */
int int
...@@ -5189,7 +5169,7 @@ This function stores binlog offset and flushes logs */ ...@@ -5189,7 +5169,7 @@ This function stores binlog offset and flushes logs */
void void
innobase_store_binlog_offset_and_flush_log( innobase_store_binlog_offset_and_flush_log(
/*=============================*/ /*=============================*/
char *binlog_name, /* in: binlog name */ char *binlog_name, /* in: binlog name */
longlong offset /* in: binlog offset */ longlong offset /* in: binlog offset */
) )
{ {
...@@ -5214,5 +5194,4 @@ innobase_store_binlog_offset_and_flush_log( ...@@ -5214,5 +5194,4 @@ innobase_store_binlog_offset_and_flush_log(
/* Syncronous flush of the log buffer to disk */ /* Syncronous flush of the log buffer to disk */
log_buffer_flush_to_disk(); log_buffer_flush_to_disk();
} }
#endif /* HAVE_INNOBASE_DB */ #endif /* HAVE_INNOBASE_DB */
...@@ -239,3 +239,5 @@ int innodb_show_status(THD* thd); ...@@ -239,3 +239,5 @@ int innodb_show_status(THD* thd);
my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name,
uint full_name_len); uint full_name_len);
void innobase_release_temporary_latches(void* innobase_tid); void innobase_release_temporary_latches(void* innobase_tid);
void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset);
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