diff options
Diffstat (limited to 'storage/xtradb/include/fts0priv.ic')
-rw-r--r-- | storage/xtradb/include/fts0priv.ic | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/storage/xtradb/include/fts0priv.ic b/storage/xtradb/include/fts0priv.ic index 268bb7e2227..8ef877f267e 100644 --- a/storage/xtradb/include/fts0priv.ic +++ b/storage/xtradb/include/fts0priv.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2011, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -32,9 +32,24 @@ int fts_write_object_id( /*================*/ ib_id_t id, /* in: a table/index id */ - char* str) /* in: buffer to write the id to */ + char* str, /* in: buffer to write the id to */ + bool hex_format __attribute__((unused))) + /* in: true for fixed hex format, + false for old ambiguous format */ { - // FIXME: Use ut_snprintf() +#ifdef _WIN32 + /* Use this to construct old(5.6.14 and 5.7.3) ambiguous + aux table names */ + DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name", + return(sprintf(str, "%016llu", id));); + + /* As above, but this is only for those tables failing to rename. */ + if (!hex_format) { + // FIXME: Use ut_snprintf(), so does following one. + return(sprintf(str, "%016llu", id)); + } +#endif /* _WIN32 */ + return(sprintf(str, UINT64PFx, id)); } @@ -48,6 +63,9 @@ fts_read_object_id( ib_id_t* id, /* out: an id */ const char* str) /* in: buffer to read from */ { + /* NOTE: this func doesn't care about whether current table + is set with HEX_NAME, the user of the id read here will check + if the id is HEX or DEC and do the right thing with it. */ return(sscanf(str, UINT64PFx, id) == 1); } |