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,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008, 2019, MariaDB Corporation
|
||||
Copyright (c) 2008, 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
|
||||
@ -3506,7 +3506,7 @@ static bool get_string_parameter(char *to, const char *from, size_t length,
|
||||
if (from) // Empty paramaters allowed
|
||||
{
|
||||
size_t from_length= strlen(from);
|
||||
size_t from_numchars= cs->cset->numchars(cs, from, from + from_length);
|
||||
size_t from_numchars= cs->numchars(from, from + from_length);
|
||||
if (from_numchars > length / cs->mbmaxlen)
|
||||
{
|
||||
my_error(ER_WRONG_STRING_LENGTH, MYF(0), from, name,
|
||||
|
Reference in New Issue
Block a user