diff options
author | Marc Alff <marc.alff@oracle.com> | 2013-02-28 13:19:15 +0100 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2013-02-28 13:19:15 +0100 |
commit | 99f83c66841749a3e7507cc38a86c05823f5f2c7 (patch) | |
tree | 2b9ca5e7aea1dbfc524050a3b8a9916aac1d062c /storage/perfschema/pfs_global.h | |
parent | 94b1b6533d56541787683f79ccf9b23995c3a7b3 (diff) | |
download | mariadb-git-99f83c66841749a3e7507cc38a86c05823f5f2c7.tar.gz |
Bug#16414644 ASSERTION FAILED: SIZE == PFS_ALLOCATED_MEMORY
Before this fix, the command
SHOW ENGINE PERFORMANCE_SCHEMA STATUS
could report wrong amount of memory allocated,
when the amount of memory used exceeds 4GB.
The problem is that size computations are not done using size_t,
so that overflows do occur, truncating the results.
This fix compute memory sizes properly with size_t.
Tested manually.
No test script provided, as the script would need to allocate too much
memory for the test.
Diffstat (limited to 'storage/perfschema/pfs_global.h')
-rw-r--r-- | storage/perfschema/pfs_global.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h index c0c0490a380..5a3cc342b7d 100644 --- a/storage/perfschema/pfs_global.h +++ b/storage/perfschema/pfs_global.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 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 @@ -22,7 +22,7 @@ */ extern bool pfs_initialized; -extern ulonglong pfs_allocated_memory; +extern size_t pfs_allocated_memory; void *pfs_malloc(size_t size, myf flags); #define PFS_MALLOC_ARRAY(n, T, f) \ |