diff options
author | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-08-03 15:25:23 +0500 |
---|---|---|
committer | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-08-03 15:25:23 +0500 |
commit | 4eebfd09c2b045258615bf07990deb6f0f73f729 (patch) | |
tree | 01c0ee2f5244a4d68fc6cdfb6555fa1af4589a8c /strings/conf_to_src.c | |
parent | a8b2d9c951376cc230c789ac674cf038c315ed5b (diff) | |
download | mariadb-git-4eebfd09c2b045258615bf07990deb6f0f73f729.tar.gz |
Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
Diffstat (limited to 'strings/conf_to_src.c')
-rw-r--r-- | strings/conf_to_src.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c index e2ac9846c85..dc2a300a2ec 100644 --- a/strings/conf_to_src.c +++ b/strings/conf_to_src.c @@ -179,14 +179,16 @@ is_case_sensitive(CHARSET_INFO *cs) cs->sort_order['a'] < cs->sort_order['B']) ? 1 : 0; } + void dispcset(FILE *f,CHARSET_INFO *cs) { fprintf(f,"{\n"); fprintf(f," %d,%d,%d,\n",cs->number,0,0); - fprintf(f," MY_CS_COMPILED%s%s%s,\n", - cs->state & MY_CS_BINSORT ? "|MY_CS_BINSORT" : "", - cs->state & MY_CS_PRIMARY ? "|MY_CS_PRIMARY" : "", - is_case_sensitive(cs) ? "|MY_CS_CSSORT" : ""); + fprintf(f," MY_CS_COMPILED%s%s%s%s,\n", + cs->state & MY_CS_BINSORT ? "|MY_CS_BINSORT" : "", + cs->state & MY_CS_PRIMARY ? "|MY_CS_PRIMARY" : "", + is_case_sensitive(cs) ? "|MY_CS_CSSORT" : "", + my_charset_is_8bit_pure_ascii(cs) ? "|MY_CS_PUREASCII" : ""); if (cs->name) { @@ -243,6 +245,28 @@ void dispcset(FILE *f,CHARSET_INFO *cs) } +static void +fprint_copyright(FILE *file) +{ + fprintf(file, +"/* Copyright (C) 2000-2007 MySQL AB\n" +"\n" +" This program is free software; you can redistribute it and/or modify\n" +" it under the terms of the GNU General Public License as published by\n" +" the Free Software Foundation; version 2 of the License.\n" +"\n" +" This program is distributed in the hope that it will be useful,\n" +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +" GNU General Public License for more details.\n" +"\n" +" You should have received a copy of the GNU General Public License\n" +" along with this program; if not, write to the Free Software\n" +" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */\n" +"\n"); +} + + int main(int argc, char **argv __attribute__((unused))) { @@ -283,6 +307,7 @@ main(int argc, char **argv __attribute__((unused))) "directory:\n"); fprintf(f, " ./conf_to_src ../sql/share/charsets/ > FILE\n"); fprintf(f, "*/\n\n"); + fprint_copyright(f); fprintf(f,"#include <my_global.h>\n"); fprintf(f,"#include <m_ctype.h>\n\n"); |