1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-21581 Helper functions and methods for CHARSET_INFO

This commit is contained in:
Alexander Barkov
2020-01-26 20:27:13 +04:00
parent dd68ba74f3
commit f1e13fdc8d
118 changed files with 1416 additions and 1025 deletions

View File

@ -1,4 +1,5 @@
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
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
@ -104,7 +105,7 @@ static bool assign_fixed_string(MEM_ROOT *mem_root,
src_cs= src->charset();
src_len= src->length();
src_end= src_str + src_len;
numchars= src_cs->cset->numchars(src_cs, src_str, src_end);
numchars= src_cs->numchars(src_str, src_end);
if (numchars <= max_char)
{
@ -114,7 +115,7 @@ static bool assign_fixed_string(MEM_ROOT *mem_root,
else
{
numchars= max_char;
to_copy= dst_cs->cset->charpos(dst_cs, src_str, src_end, numchars);
to_copy= dst_cs->charpos(src_str, src_end, numchars);
truncated= true;
}