From bc35428367014e819903166d0f07c3ea1f8abcbe Mon Sep 17 00:00:00 2001 From: Lawrin Novitsky Date: Wed, 22 Apr 2020 15:01:43 +0200 Subject: [PATCH] Travis build fix Changed one test what failed w/out "additional parameters". Fixed one test, that fails with old (5.5) server version, and is not supposed to be run against it. --- .travis/script.sh | 3 ++- README.md | 2 +- ma_platform_win32.c | 1 + test/bulk.c | 8 +++++--- test/param.c | 1 - test/prepare.c | 6 ++++++ 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis/script.sh b/.travis/script.sh index 4fe6370d..84667edb 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -52,7 +52,8 @@ fi ls -lrt ${SSLCERT} -DEBIAN_FRONTEND=noninteractive sudo apt-get install --allow-unauthenticated -y --force-yes -m unixodbc +DEBIAN_FRONTEND=noninteractive sudo apt-get update +DEBIAN_FRONTEND=noninteractive sudo apt-get install --allow-unauthenticated -y --force-yes -m unixodbc-dev odbcinst1debian2 libodbc1 #build odbc connector export TEST_DRIVER=maodbc_test diff --git a/README.md b/README.md index 8200065e..7b89caf6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Status [![License (LGPL version 2.1)](https://img.shields.io/badge/license-GNU%20LGPL%20version%202.1-green.svg?style=flat-square)](http://opensource.org/licenses/LGPL-2.1) -[![Linux Build](https://secure.travis-ci.org/MariaDB/mariadb-connector-odbc.png?branch=master)](https://travis-ci.org/MariaDB/mariadb-connector-odbc) +[![Linux Build](https://secure.travis-ci.org/MariaDB-Corporation/mariadb-connector-odbc.png?branch=master)](https://travis-ci.org/MariaDB/mariadb-connector-odbc) [![Windows status](https://ci.appveyor.com/api/projects/status/1fv21j33a6mpkxq5/branch/master?svg=true)](https://ci.appveyor.com/project/LawrinNovitsky/mariadb-connector-odbc) diff --git a/ma_platform_win32.c b/ma_platform_win32.c index 3d8cbe1d..50b9d446 100644 --- a/ma_platform_win32.c +++ b/ma_platform_win32.c @@ -301,6 +301,7 @@ const char* MADB_GetDefaultPluginsDir(MADB_Dbc *Dbc) static char OurLocation[_MAX_PATH]; const char *PluginsSubDirName= "\\"MADB_DEFAULT_PLUGINS_SUBDIR; + memset(OurLocation, 0, sizeof(OurLocation)); GetModuleFileName(hModule, OurLocation, _MAX_PATH); PathRemoveFileSpec(OurLocation); diff --git a/test/bulk.c b/test/bulk.c index 18bb4efc..ad3d1cd2 100644 --- a/test/bulk.c +++ b/test/bulk.c @@ -447,9 +447,11 @@ ODBC_TEST(t_odbc90) strcpy((char*)(sval[1]), "Record 21"); nval[0]= 100; - sprintf((char *)conn, "DRIVER=%s;SERVER=%s;UID=%s;PASSWORD=%s;DATABASE=%s;%s;%s;", - my_drivername, my_servername, my_uid, my_pwd, my_schema, add_connstr, ma_strport); - + sprintf((char *)conn, "DRIVER=%s;SERVER=%s;UID=%s;PASSWORD=%s;DATABASE=%s;%s;%s", + my_drivername, my_servername, my_uid, "XXXXXXXX", my_schema, ma_strport, add_connstr); + diag("Starting new connection: %s", conn); + sprintf((char*)conn, "DRIVER=%s;SERVER=%s;UID=%s;PASSWORD=%s;DATABASE=%s;%s;%s;", + my_drivername, my_servername, my_uid, my_pwd, my_schema, ma_strport, add_connstr); CHECK_ENV_RC(henv1, SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv1)); CHECK_ENV_RC(henv1, SQLSetEnvAttr(henv1, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC2, SQL_IS_INTEGER)); diff --git a/test/param.c b/test/param.c index 328e19e7..d09f0210 100644 --- a/test/param.c +++ b/test/param.c @@ -1695,7 +1695,6 @@ ODBC_TEST(odbc279) ts.hour= ts.minute= ts.second= 0; CHECK_STMT_RC(Stmt, SQLGetData(Stmt, 1, SQL_C_TIME, &ts, sizeof(SQL_TIME_STRUCT), NULL)); - is_num(ts.hour, 12); is_num(ts.minute, 34); is_num(ts.second, 56); diff --git a/test/prepare.c b/test/prepare.c index 7e834780..7d769f62 100644 --- a/test/prepare.c +++ b/test/prepare.c @@ -1228,6 +1228,12 @@ ODBC_TEST(t_odbc269) { unsigned int i; + /* Not sure when "BEGIN NOT ATOMIC" was introduced, but it's not supported in 5.5, and 10.0 is already not supported */ + if (ServerNotOlderThan(Connection, 10, 1, 0) == FALSE) + { + skip("The test requires min 10.5.0 version") + } + OK_SIMPLE_STMT(Stmt, "BEGIN NOT ATOMIC SET @SOME_ODBC267= 'someinfo'; SELECT 1, @SOME_ODBC267; SELECT 127, 'value',2020; END"); for (i= 0; i < 2; ++i)