Skip to content

Commit

Permalink
Travis build fix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lawrinn committed Apr 22, 2020
1 parent c83f334 commit bc35428
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
1 change: 1 addition & 0 deletions ma_platform_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 5 additions & 3 deletions test/bulk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion test/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions test/prepare.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bc35428

Please sign in to comment.