Commit 60fa113f authored by Olivier Bertrand's avatar Olivier Bertrand

Fix MDEV-13503 Modified: storage/connect/jdbconn.cpp

parent efc8a5b6
...@@ -110,12 +110,13 @@ int TranslateJDBCType(int stp, char *tn, int prec, int& len, char& v) ...@@ -110,12 +110,13 @@ int TranslateJDBCType(int stp, char *tn, int prec, int& len, char& v)
int type; int type;
switch (stp) { switch (stp) {
case -1: // LONGVARCHAR case -1: // LONGVARCHAR, TEXT
case -16: // LONGNVARCHAR (unicode) case -16: // LONGNVARCHAR, NTEXT (unicode)
if (GetTypeConv() != TPC_YES) if (GetTypeConv() != TPC_YES)
return TYPE_ERROR; return TYPE_ERROR;
else else
len = MY_MIN(abs(len), GetConvSize()); len = MY_MIN(abs(len), GetConvSize());
// Pass through
case 12: // VARCHAR case 12: // VARCHAR
case -9: // NVARCHAR (unicode) case -9: // NVARCHAR (unicode)
v = 'V'; v = 'V';
...@@ -803,9 +804,10 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val) ...@@ -803,9 +804,10 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
switch (ctyp) { switch (ctyp) {
case 12: // VARCHAR case 12: // VARCHAR
case -9: // NVARCHAR case -9: // NVARCHAR
case -1: // LONGVARCHAR case -1: // LONGVARCHAR, TEXT
case 1: // CHAR case 1: // CHAR
case -15: // NCHAR case -15: // NCHAR
case -16: // LONGNVARCHAR, NTEXT
case 3: // DECIMAL case 3: // DECIMAL
case -8: // ROWID case -8: // ROWID
if (jb && ctyp != 3) if (jb && ctyp != 3)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment