mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-21581 Helper functions and methods for CHARSET_INFO
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2020, MariaDB Corporation.
|
||||
|
||||
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
|
||||
@ -855,8 +856,7 @@ static char *debug_sync_token(char **token_p, uint *token_length_p,
|
||||
DBUG_ASSERT(ptr);
|
||||
|
||||
/* Skip leading space */
|
||||
ptr+= system_charset_info->cset->scan(system_charset_info,
|
||||
ptr, ptrend, MY_SEQ_SPACES);
|
||||
ptr+= system_charset_info->scan(ptr, ptrend, MY_SEQ_SPACES);
|
||||
if (!*ptr)
|
||||
{
|
||||
ptr= NULL;
|
||||
@ -867,8 +867,7 @@ static char *debug_sync_token(char **token_p, uint *token_length_p,
|
||||
*token_p= ptr;
|
||||
|
||||
/* Find token end. */
|
||||
ptr+= system_charset_info->cset->scan(system_charset_info,
|
||||
ptr, ptrend, MY_SEQ_NONSPACES);
|
||||
ptr+= system_charset_info->scan(ptr, ptrend, MY_SEQ_NONSPACES);
|
||||
|
||||
/* Get token length. */
|
||||
*token_length_p= (uint)(ptr - *token_p);
|
||||
@ -878,7 +877,7 @@ static char *debug_sync_token(char **token_p, uint *token_length_p,
|
||||
{
|
||||
DBUG_ASSERT(ptr < ptrend);
|
||||
/* Get terminator character length. */
|
||||
uint mbspacelen= my_charlen_fix(system_charset_info, ptr, ptrend);
|
||||
uint mbspacelen= system_charset_info->charlen_fix(ptr, ptrend);
|
||||
|
||||
/* Terminate token. */
|
||||
*ptr= '\0';
|
||||
@ -887,8 +886,7 @@ static char *debug_sync_token(char **token_p, uint *token_length_p,
|
||||
ptr+= mbspacelen;
|
||||
|
||||
/* Skip trailing space */
|
||||
ptr+= system_charset_info->cset->scan(system_charset_info,
|
||||
ptr, ptrend, MY_SEQ_SPACES);
|
||||
ptr+= system_charset_info->scan(ptr, ptrend, MY_SEQ_SPACES);
|
||||
}
|
||||
|
||||
end:
|
||||
|
Reference in New Issue
Block a user