mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
This commit is contained in:
@@ -284,11 +284,10 @@ QUERY_PROFILE::~QUERY_PROFILE()
|
||||
/**
|
||||
@todo Provide a way to include the full text, as in SHOW PROCESSLIST.
|
||||
*/
|
||||
void QUERY_PROFILE::set_query_source(char *query_source_arg,
|
||||
uint query_length_arg)
|
||||
void QUERY_PROFILE::set_query_source(char *query_source_arg, size_t query_length_arg)
|
||||
{
|
||||
/* Truncate to avoid DoS attacks. */
|
||||
uint length= MY_MIN(MAX_QUERY_LENGTH, query_length_arg);
|
||||
size_t length= MY_MIN(MAX_QUERY_LENGTH, query_length_arg);
|
||||
|
||||
DBUG_ASSERT(query_source == NULL); /* we don't leak memory */
|
||||
if (query_source_arg != NULL)
|
||||
|
Reference in New Issue
Block a user