1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- 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
This commit is contained in:
Olivier Bertrand
2015-02-11 21:39:41 +01:00
parent 3c097fd689
commit dcfe068d59
83 changed files with 553 additions and 4828 deletions

View File

@@ -670,6 +670,22 @@ PRXCOL::PRXCOL(PRXCOL *col1, PTDB tdbp) : COLBLK(col1, tdbp)
Colnum = col1->Colnum;
} // 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();