← Back to team overview

maria-developers team mailing list archive

Re: [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@xxxxxxxxxxx


Follow ups