mariadb/mysql-test/t/non_blocking_api.test
unknown 17940b652d MWL#192: non-blocking client API, after-review fixes.
Main change is that non-blocking operation is now an option that must be
explicitly enabled with mysql_option(mysql, MYSQL_OPT_NONBLOCK, ...)
before any non-blocing operation can be used.

Also the CLIENT_REMEMBER_OPTIONS flag is now always enabled and thus
effectively ignored (it was not really useful anyway, and this simplifies
things when non-blocking mysql_real_connect() fails).
2012-01-06 12:43:18 +01:00

22 lines
528 B
Text

# Test mixing the use of blocking and non-blocking API in a single connection.
--disable_warnings
drop table if exists t1;
--enable_warnings
--enable_non_blocking_api
connect (con_nonblock,localhost,root,,test);
--disable_non_blocking_api
connect (con_normal,localhost,root,,test);
connection con_nonblock;
CREATE TABLE t1 (a INT PRIMARY KEY);
--enable_non_blocking_api
INSERT INTO t1 VALUES (1);
--disable_non_blocking_api
SELECT * FROM t1;
--enable_non_blocking_api
SELECT * FROM t1;
connection con_normal;
DROP TABLE t1;