[GRASS-SVN] r48167 -
grass/branches/releasebranch_6_4/db/drivers/sqlite
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 6 11:45:00 EDT 2011
Author: martinl
Date: 2011-09-06 08:45:00 -0700 (Tue, 06 Sep 2011)
New Revision: 48167
Modified:
grass/branches/releasebranch_6_4/db/drivers/sqlite/create_table.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/cursor.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/describe.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/execute.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/fetch.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/index.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/listtab.c
grass/branches/releasebranch_6_4/db/drivers/sqlite/select.c
Log:
dbmi-sqlite: SQLITE_IOERR_BLOCKED not defined in older sqlite versions
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/create_table.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/create_table.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/create_table.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -113,7 +113,11 @@
G_debug(3, " SQL: %s", db_get_string(&sql));
ret = sqlite3_prepare(sqlite, db_get_string(&sql), -1, &statement, &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/cursor.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/cursor.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/cursor.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -31,7 +31,11 @@
return DB_FAILED;
ret = sqlite3_finalize(c->statement);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/describe.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/describe.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/describe.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -50,7 +50,11 @@
db_append_string(&sql, " where oid < 0");
ret = sqlite3_prepare(sqlite, db_get_string(&sql), -1, &statement, &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
@@ -103,7 +107,11 @@
/* Try to get first row */
ret = sqlite3_step(statement);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/execute.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/execute.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/execute.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -42,7 +42,11 @@
G_debug(3, "execute: %s", s);
ret = sqlite3_prepare(sqlite, s, -1, &stmt, &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
@@ -96,7 +100,11 @@
G_debug(3, "execute: BEGIN");
ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, NULL);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
if (ret != SQLITE_OK) {
@@ -125,7 +133,11 @@
G_debug(3, "execute: COMMIT");
ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, NULL);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
if (ret != SQLITE_OK) {
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/fetch.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/fetch.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/fetch.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -64,7 +64,11 @@
c->row = -1;
ret = sqlite3_step(c->statement);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
if (ret != SQLITE_ROW) {
@@ -269,7 +273,11 @@
}
ret = sqlite3_reset(c->statement);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/index.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/index.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/index.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -66,7 +66,11 @@
G_debug(3, " SQL: %s", db_get_string(&sql));
ret = sqlite3_prepare(sqlite, db_get_string(&sql), -1, &statement, &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/listtab.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/listtab.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/listtab.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -45,7 +45,11 @@
"select name from sqlite_master where type = 'table' or type = 'view'",
-1, &statement, &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
Modified: grass/branches/releasebranch_6_4/db/drivers/sqlite/select.c
===================================================================
--- grass/branches/releasebranch_6_4/db/drivers/sqlite/select.c 2011-09-06 10:14:07 UTC (rev 48166)
+++ grass/branches/releasebranch_6_4/db/drivers/sqlite/select.c 2011-09-06 15:45:00 UTC (rev 48167)
@@ -54,7 +54,11 @@
G_debug(3, "Escaped SQL: %s", str);
ret = sqlite3_prepare(sqlite, str, -1, &(c->statement), &rest);
+#if (SQLITE_VERSION_NUMBER > 3003008)
while (ret == SQLITE_BUSY || ret == SQLITE_IOERR_BLOCKED) {
+#else
+ while (ret == SQLITE_BUSY) {
+#endif
ret = sqlite3_busy_handler(sqlite, sqlite_busy_callback, NULL);
}
More information about the grass-commit
mailing list