mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fix good recognition of MYSQL table column types.
modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/odbccat.h storage/connect/odbconn.cpp storage/connect/tabmysql.cpp - Add tests on new MYSQL features added: storage/connect/mysql-test/connect/my.cnf storage/connect/mysql-test/connect/r/mysql_discovery.result storage/connect/mysql-test/connect/r/mysql_exec.result storage/connect/mysql-test/connect/r/mysql_new.result storage/connect/mysql-test/connect/t/myconn.inc storage/connect/mysql-test/connect/t/myconn_cleanup.inc storage/connect/mysql-test/connect/t/mysql_discovery.test storage/connect/mysql-test/connect/t/mysql_exec.test storage/connect/mysql-test/connect/t/mysql_new.test
This commit is contained in:
@@ -1263,7 +1263,7 @@ void MYSQLCOL::InitBind(PGLOBAL g)
|
||||
/***********************************************************************/
|
||||
void MYSQLCOL::ReadColumn(PGLOBAL g)
|
||||
{
|
||||
char *buf;
|
||||
char *p, *buf, tim[20];
|
||||
int rc;
|
||||
PTDBMY tdbp = (PTDBMY)To_Tdb;
|
||||
|
||||
@@ -1283,7 +1283,14 @@ void MYSQLCOL::ReadColumn(PGLOBAL g)
|
||||
if (trace)
|
||||
htrc("MySQL ReadColumn: name=%s buf=%s\n", Name, buf);
|
||||
|
||||
Value->SetValue_char(buf, min((unsigned)Long, strlen(buf)));
|
||||
// TODO: have a true way to differenciate temporal values
|
||||
if (strlen(buf) == 8)
|
||||
// This is a TIME value
|
||||
p = strcat(strcpy(tim, "1970-01-01 "), buf);
|
||||
else
|
||||
p = buf;
|
||||
|
||||
Value->SetValue_char(p, strlen(p));
|
||||
} else {
|
||||
if (Nullable)
|
||||
Value->SetNull(true);
|
||||
|
Reference in New Issue
Block a user