diff options
author | unknown <konstantin@mysql.com> | 2005-03-24 15:17:39 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-03-24 15:17:39 +0300 |
commit | ca68bca8f4c874cb065e2862c68fb68c5b838d55 (patch) | |
tree | 8cdc1a9cfde69b502cc99297442ad453cd8d7046 /libmysql/libmysql.c | |
parent | 26b5735572a44eaaca52db7754ca2137853e30b6 (diff) | |
parent | 3b236b1dfd1fdc34548e296dc63e75735becd61d (diff) | |
download | mariadb-git-ca68bca8f4c874cb065e2862c68fb68c5b838d55.tar.gz |
Manual merge
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 1176fc5e23a..f09b09314d0 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2862,6 +2862,17 @@ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) mysql->status= MYSQL_STATUS_READY; stmt->read_row_func= stmt_read_row_from_cursor; } + else if (stmt->flags & CURSOR_TYPE_READ_ONLY) + { + /* + This is a single-row result set, a result set with no rows, EXPLAIN, + SHOW VARIABLES, or some other command which either a) bypasses the + cursors framework in the server and writes rows directly to the + network or b) is more efficient if all (few) result set rows are + precached on client and server's resources are freed. + */ + DBUG_RETURN(mysql_stmt_store_result(stmt)); + } else { stmt->mysql->unbuffered_fetch_owner= &stmt->unbuffered_fetch_cancelled; |