summaryrefslogtreecommitdiff
path: root/include/errmsg.h
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-05-16 18:27:21 +0400
committerunknown <konstantin@mysql.com>2005-05-16 18:27:21 +0400
commit4a429272e1584784e4ff9b97ba2931390f6efeb3 (patch)
treee6dfafb73cbb2de3614c02947064cf7fc10404ab /include/errmsg.h
parentd000460c9eee21792ba730b676ab74b57f86fcd5 (diff)
downloadmariadb-git-4a429272e1584784e4ff9b97ba2931390f6efeb3.tar.gz
A fix and a test case for Bug#9643 " CURSOR_TYPE_SCROLLABLE dos not work"
- check on the client the unsupported feature and return an error message if it's been requested. Additionally added API support for STMT_ATTR_PREFETCH_ROWS. Post-review fixes. include/errmsg.h: Add a new error code for "Not implemented" client-side error message. include/mysql.h: Add a statement attribute STMT_ATTR_PREFETCH_ROWS - unsigned long number of rows to fetch per one COM_FETCH command, used when there is a read-only cursor. Note, that we don't break compatibility by adding this new member because MYSQL_STMT is always allocated inside the client library by mysql_stmt_init. libmysql/errmsg.c: Text for the error message CR_NOT_IMPLEMENTED libmysql/libmysql.c: Implement support for STMT_ATTR_PREFETCH_ROWS Return an error message on attempt to set an attribute of a prepared statement which is not implemented yet. We probably should be doing it in the server: currently the server just ignores unknown attributes. tests/mysql_client_test.c: A test case for Bug#9643 "CURSOR_TYPE_SCROLLABLE dos not work" - check that an error message is returned for CURSOR_TYPE_SCROLLABLE. Additionally, check setting of STMT_ATTR_PREFETCH_ROWS.
Diffstat (limited to 'include/errmsg.h')
-rw-r--r--include/errmsg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/errmsg.h b/include/errmsg.h
index fd3da392df4..1dd5759c104 100644
--- a/include/errmsg.h
+++ b/include/errmsg.h
@@ -96,6 +96,7 @@ extern const char *client_errors[]; /* Error messages */
#define CR_NO_DATA 2051
#define CR_NO_STMT_METADATA 2052
#define CR_NO_RESULT_SET 2053
-#define CR_ERROR_LAST /*Copy last error nr:*/ 2053
+#define CR_NOT_IMPLEMENTED 2054
+#define CR_ERROR_LAST /*Copy last error nr:*/ 2054
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */