summaryrefslogtreecommitdiff
path: root/sql/table_cache.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-29 16:44:53 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-29 17:27:21 +0000
commit24d9664ad0c594ba76c0a134a5e07799f097b57a (patch)
treea7755297b8cbe12ae3a5842cf91694abdd253f2a /sql/table_cache.h
parent8e8a7f85a96c4a8cb86e0da6db38c3ff5f6c909c (diff)
downloadmariadb-git-24d9664ad0c594ba76c0a134a5e07799f097b57a.tar.gz
In table cache code, fix casts from longlong to long for
'version' variables. The warnings occur on Windows build, yet they are also are valid on 32bit Unix. Fix is to consistently use 64bit integer on all platforms.
Diffstat (limited to 'sql/table_cache.h')
-rw-r--r--sql/table_cache.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/table_cache.h b/sql/table_cache.h
index cac69296cc2..2e5bb3428dc 100644
--- a/sql/table_cache.h
+++ b/sql/table_cache.h
@@ -26,12 +26,14 @@ struct Share_free_tables
char pad[CPU_LEVEL1_DCACHE_LINESIZE];
};
+typedef int64 tdc_version_t;
+#define TDC_VERSION_MAX INT_MAX64
struct TDC_element
{
uchar m_key[NAME_LEN + 1 + NAME_LEN + 1];
uint m_key_length;
- ulong version;
+ tdc_version_t version;
bool flushed;
TABLE_SHARE *share;
@@ -84,12 +86,14 @@ extern void tdc_release_share(TABLE_SHARE *share);
extern bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,
bool kill_delayed_threads);
+
+
extern int tdc_wait_for_old_version(THD *thd, const char *db,
const char *table_name,
ulong wait_timeout, uint deadlock_weight,
- ulong refresh_version= ULONG_MAX);
-extern ulong tdc_refresh_version(void);
-extern ulong tdc_increment_refresh_version(void);
+ tdc_version_t refresh_version= TDC_VERSION_MAX);
+extern tdc_version_t tdc_refresh_version(void);
+extern tdc_version_t tdc_increment_refresh_version(void);
extern int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument,
bool no_dups= false);