Skip to content

Commit

Permalink
Adding MariaDB 5.5 server to Travis tests.
Browse files Browse the repository at this point in the history
Skipping one tests with 5.5 servers(and MySQL <5.7), since it doesn't make sense there.
  • Loading branch information
lawrinn committed Dec 5, 2017
1 parent 27daadc commit d9c0ff4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
#- DB=mysql:5.5
#- DB=mysql:5.6
#- DB=mysql:5.7
#- DB=mariadb:5.5
- DB=mariadb:5.5
- DB=mariadb:10.0
- DB=mariadb:10.1
- DB=mariadb:10.2
Expand Down
4 changes: 4 additions & 0 deletions test/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ ODBC_TEST(t_odbc94)
SQLINTEGER error;
SQLSMALLINT len;

if (ServerNotOlderThan(Connection, 5, 7, 0) == FALSE)
{
skip("The test doesn't make sense in pre-10.0 servers, as the target query won't cause in 5.5(or pre-MySQL-5.7 the error it tests");
}
sprintf((char *)conn, "DRIVER=%s;SERVER=%s;UID=%s;PASSWORD=%s;DATABASE=%s%s;",
my_drivername, my_servername, my_uid, my_pwd, my_schema, ma_strport);

Expand Down
2 changes: 1 addition & 1 deletion test/result2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ ODBC_TEST(t_odbc77)
EXPECT_STMT(Stmt, SQLFetch(Stmt), SQL_NO_DATA);
CHECK_STMT_RC(Stmt, SQLFreeStmt(Stmt, SQL_CLOSE));

if (ServerNewerThan(Connection, 10, 2, 5))
if (ServerNotOlderThan(Connection, 10, 2, 5))
{
OK_SIMPLE_STMT(Stmt, "ANALYZE SELECT 1");
CHECK_STMT_RC(Stmt, SQLFetch(Stmt));
Expand Down
2 changes: 1 addition & 1 deletion test/tap.h
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ char* hide_pwd(char *connstr)
}


BOOL ServerNewerThan(SQLHDBC Conn, unsigned int major, unsigned int minor, unsigned int patch)
BOOL ServerNotOlderThan(SQLHDBC Conn, unsigned int major, unsigned int minor, unsigned int patch)
{
unsigned int ServerMajor= 0, ServerMinor= 0, ServerPatch= 0;
SQLCHAR ServerVersion[32];
Expand Down

0 comments on commit d9c0ff4

Please sign in to comment.