Changeset: c325f780aa82 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c325f780aa82
Modified Files:
        
Branch: Dec2011
Log Message:

Merge with Aug2011 branch.


diffs (43 lines):

diff --git a/clients/odbc/driver/SQLPrepare.c b/clients/odbc/driver/SQLPrepare.c
--- a/clients/odbc/driver/SQLPrepare.c
+++ b/clients/odbc/driver/SQLPrepare.c
@@ -99,9 +99,11 @@ SQLPrepare_(ODBCStmt *stmt,
        ret = mapi_query_handle(hdl, s);
        free(s);
        s = NULL;
-       if (ret != MOK || (s = mapi_result_error(hdl)) != NULL) {
+       if (ret != MOK) {
                /* XXX more fine-grained control required */
                /* Syntax error or access violation */
+               if ((s = mapi_result_error(hdl)) == NULL)
+                       s = mapi_error_str(stmt->Dbc->mid);
                addStmtError(stmt, "42000", s, 0);
                return SQL_ERROR;
        }
diff --git a/clients/odbc/driver/SQLSetStmtAttr.c 
b/clients/odbc/driver/SQLSetStmtAttr.c
--- a/clients/odbc/driver/SQLSetStmtAttr.c
+++ b/clients/odbc/driver/SQLSetStmtAttr.c
@@ -235,9 +235,22 @@ SQLSetStmtAttr_(ODBCStmt *stmt,
                stmt->Dbc->sql_attr_metadata_id = (SQLUINTEGER) (size_t) 
ValuePtr;
                break;
 
+       case SQL_ATTR_CONCURRENCY:
+               switch ((SQLULEN) (size_t) ValuePtr) {
+               case SQL_CONCUR_READ_ONLY:
+                       /* the only value we support */
+                       break;
+               case SQL_CONCUR_LOCK:
+               case SQL_CONCUR_ROWVER:
+               case SQL_CONCUR_VALUES:
+                       /* Optional feature not implemented */
+                       addStmtError(stmt, "HYC00", NULL, 0);
+                       return SQL_ERROR;
+               }
+               break;
+
                /* TODO: implement requested behavior */
        case SQL_ATTR_ASYNC_ENABLE:
-       case SQL_ATTR_CONCURRENCY:
        case SQL_ATTR_CURSOR_SENSITIVITY:
        case SQL_ATTR_ENABLE_AUTO_IPD:
        case SQL_ATTR_FETCH_BOOKMARK_PTR:
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to