Commit 0969942d authored by serg@serg.mylan's avatar serg@serg.mylan

64-bit safe address->string conversion

parent 1ca547f5
...@@ -1698,7 +1698,9 @@ innobase_rollback_to_savepoint( ...@@ -1698,7 +1698,9 @@ innobase_rollback_to_savepoint(
innobase_release_stat_resources(trx); innobase_release_stat_resources(trx);
/* TODO: use provided savepoint data area to store savepoint data */ /* TODO: use provided savepoint data area to store savepoint data */
char name[16]; sprintf(name, "s_%08lx", (ulong) savepoint); char name[64];
longlong2str((ulonglong)savepoint,buff,36);
error = trx_rollback_to_savepoint_for_mysql(trx, name, error = trx_rollback_to_savepoint_for_mysql(trx, name,
&mysql_binlog_cache_pos); &mysql_binlog_cache_pos);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL)); DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
...@@ -1724,7 +1726,9 @@ innobase_release_savepoint( ...@@ -1724,7 +1726,9 @@ innobase_release_savepoint(
trx = check_trx_exists(thd); trx = check_trx_exists(thd);
/* TODO: use provided savepoint data area to store savepoint data */ /* TODO: use provided savepoint data area to store savepoint data */
char name[16]; sprintf(name, "s_%08lx", (ulong) savepoint); char name[64];
longlong2str((ulonglong)savepoint,buff,36);
error = trx_release_savepoint_for_mysql(trx, name); error = trx_release_savepoint_for_mysql(trx, name);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL)); DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
...@@ -1763,7 +1767,9 @@ innobase_savepoint( ...@@ -1763,7 +1767,9 @@ innobase_savepoint(
DBUG_ASSERT(trx->active_trans); DBUG_ASSERT(trx->active_trans);
/* TODO: use provided savepoint data area to store savepoint data */ /* TODO: use provided savepoint data area to store savepoint data */
char name[16]; sprintf(name, "s_%08lx", (ulong) savepoint); char name[64];
longlong2str((ulonglong)savepoint,buff,36);
error = trx_savepoint_for_mysql(trx, name, (ib_longlong)0); error = trx_savepoint_for_mysql(trx, name, (ib_longlong)0);
DBUG_RETURN(convert_error_code_to_mysql(error, NULL)); DBUG_RETURN(convert_error_code_to_mysql(error, NULL));
......
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