diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2015-02-11 21:39:41 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2015-02-11 21:39:41 +0100 |
commit | dcfe068d5936259d49ac4d6d665122486d2ceda3 (patch) | |
tree | f735ae80849a538cc7e9341d6faa5a5f258f1aa9 /storage/connect/tabutil.cpp | |
parent | 3c097fd68919c220eb6492650e4f1d01612f5b33 (diff) | |
download | mariadb-git-dcfe068d5936259d49ac4d6d665122486d2ceda3.tar.gz |
- Adding json udf's. Making the second version of json tables.
added:
storage/connect/jsonudf.cpp
modified:
storage/connect/CMakeLists.txt
storage/connect/json.cpp
storage/connect/json.h
storage/connect/tabjson.cpp
storage/connect/tabjson.h
- Fix utf8 issues with PROXY tables
modified:
storage/connect/ha_connect.cc
storage/connect/tabutil.cpp
storage/connect/tabutil.h
Diffstat (limited to 'storage/connect/tabutil.cpp')
-rw-r--r-- | storage/connect/tabutil.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index be806cb0f64..c1c112633fd 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -671,6 +671,22 @@ PRXCOL::PRXCOL(PRXCOL *col1, PTDB tdbp) : COLBLK(col1, tdbp) } // end of PRXCOL copy constructor /***********************************************************************/ +/* Convert an UTF-8 name to latin characters. */ +/***********************************************************************/ +char *PRXCOL::Decode(PGLOBAL g, const char *cnm) + { + char *buf= (char*)PlugSubAlloc(g, NULL, strlen(cnm) + 1); + uint dummy_errors; + uint32 len= copy_and_convert(buf, strlen(cnm) + 1, + &my_charset_latin1, + cnm, strlen(cnm), + &my_charset_utf8_general_ci, + &dummy_errors); + buf[len]= '\0'; + return buf; + } // end of Decode + +/***********************************************************************/ /* PRXCOL initialization routine. */ /* Look for the matching column in the object table. */ /***********************************************************************/ @@ -685,6 +701,9 @@ bool PRXCOL::Init(PGLOBAL g, PTDBASE tp) if (Colp) { MODE mode = To_Tdb->GetMode(); + // Needed for MYSQL subtables + ((XCOLBLK*)Colp)->Name = Decode(g, Colp->GetName()); + // May not have been done elsewhere Colp->InitValue(g); To_Val = Colp->GetValue(); |