Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix 32bit redefine of char_to_byte_length_safe (#337)
* fix 32bit redefine of char_to_byte_length_safe Error can be seen here: https://hastebin.com/azomatocoq.scala sql/item.h: defined uint32 char_to_byte_length_safe(size_t, uint32) sql/sql_type.h: defined uint32 char_to_byte_length_safe(uint32, uint32) As @knielsen observed, C++ overloading allows this on 64bit because size_t and uint32 differ. Since item.h does a #include "sql_type.h", there is no point in redifining this function in item.h * avoid -Wconversion warnings, fix spacing; thanks @svoj From IRC: <svoj> EricHerman: nice, thanks! I believe we also should use function body as in item.h. It was fixed by dr-m recently. <EricHerman> svoj, so you suggest the "return tmp > UINT_MAX32 ? UINT_MAX32 : static_cast<uint32>(tmp);" <EricHerman> I can use that, sure. <svoj> EricHerman: yes, please! And fix indentation on these lines (should be 2 spaces instead of 3). <svoj> EricHerman: the patch where this hunk comes from: git show 89d80c1 sql/item.h
- Loading branch information