Re: [Maria-developers] [Commits] [PATCH] Use size_t in thd_alloc() and friends.
Hi, Marko! On Mar 11, Marko Mäkelä wrote:
THD::alloc() and related member functions use size_t parameters.
thd_alloc(), thd_calloc(), thd_strmake(), thd_memdup(): Define the interface with size_t instead of unsigned int, to avoid truncating integer conversions on 64-bit Windows, where size_t is longer than unsigned int. --- include/mysql/plugin_audit.h.pp | 20 ++++++++++---------- include/mysql/plugin_auth.h.pp | 20 ++++++++++---------- include/mysql/plugin_encryption.h.pp | 20 ++++++++++---------- include/mysql/plugin_ftparser.h.pp | 20 ++++++++++---------- include/mysql/plugin_password_validation.h.pp | 20 ++++++++++---------- include/mysql/service_thd_alloc.h | 21 +++++++++++---------- sql/sql_class.cc | 10 +++++----- sql/sql_class.h | 2 +- storage/innobase/handler/ha_innodb.cc | 18 ++++++++---------- 9 files changed, 75 insertions(+), 76 deletions(-)
Marko, when you change the ABI of services you absolutely must update coresponding service versions in include/service_versions.h. May be, it's best not to break the ABI for such a minor reason and only change THD methods, not service functions. Regards, Sergei Chief Architect MariaDB and security@mariadb.org
Hi Sergei, On Sat, Mar 11, 2017 at 9:09 PM, Sergei Golubchik <serg@mariadb.org> wrote:
Marko, when you change the ABI of services you absolutely must update coresponding service versions in include/service_versions.h.
May be, it's best not to break the ABI for such a minor reason and only change THD methods, not service functions.
Based on your feedback, I will not push this patch. Instead, I pushed a few other size_t patches to bb-10.2-marko for testing. With those patches, the warning count on 64-bit Windows (where size_t is 64 bits but long is 32 bits) will be a little lower than it is now. The warning count on 32-bit Windows is approaching a bearable number. Best regards, Marko -- DON’T MISS M|17 April 11 - 12, 2017 The Conrad Hotel New York City https://m17.mariadb.com/ Marko Mäkelä, Lead Developer InnoDB MariaDB Corporation
participants (2)
-
Marko Mäkelä
-
Sergei Golubchik