1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fixed test case for expired password

Added test case for ODBC-138
This commit is contained in:
Georg Richter
2018-04-20 07:19:40 +02:00
parent 60e5deec52
commit 3f43953fcb
2 changed files with 41 additions and 7 deletions

View File

@@ -1340,21 +1340,15 @@ static int test_expired_pw(MYSQL *my)
my_test_connect(mysql, hostname, "foo", "foo", schema,
port, socketname, 0);
rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)");
diag("error: %d %s", mysql_errno(mysql), mysql_error(mysql));
FAIL_IF(mysql_errno(mysql) != ER_MUST_CHANGE_PASSWORD, "Error 1820 expected");
rc= mysql_query(mysql, "SET PASSWORD=PASSWORD('foobar')");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)");
check_mysql_rc(rc, mysql);
mysql_close(mysql);
sprintf(query, "DROP USER 'foo'@'%s'", this_host);
rc= mysql_query(my, query);
check_mysql_rc(rc, my);
mysql_close(mysql);
return OK;
}