[monotone] Add missing patch file.

Thomas Moschny thm at fedoraproject.org
Wed Oct 27 15:51:35 UTC 2010


commit f67cf279fe5d841b8f514394d379fce13949dbcc
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Wed Oct 27 17:51:25 2010 +0200

    Add missing patch file.

 monotone-sqlite-3.7.3.patch |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/monotone-sqlite-3.7.3.patch b/monotone-sqlite-3.7.3.patch
new file mode 100644
index 0000000..36ad909
--- /dev/null
+++ b/monotone-sqlite-3.7.3.patch
@@ -0,0 +1,33 @@
+#
+#
+# patch "database.cc"
+#  from [0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64]
+#    to [8bfff559a0894259fe3668294bd3906ae837129b]
+#
+============================================================
+--- database.cc	0afa3ff4bd9c9ee3bc62b10bcf6295a9f5388d64
++++ database.cc	8bfff559a0894259fe3668294bd3906ae837129b
+@@ -1531,12 +1531,19 @@ database_impl::fetch(results & res,
+       vector<string> row;
+       for (int col = 0; col < ncol; col++)
+         {
++          // We never store NULLs, so we should never see one.
++          int const datatype = sqlite3_column_type(i->second.stmt(), col);
++          E(datatype != SQLITE_NULL, origin::database,
++            F("null result in query: %s") % query.sql_cmd);
+           const char * value = (const char*)sqlite3_column_blob(i->second.stmt(), col);
+           int bytes = sqlite3_column_bytes(i->second.stmt(), col);
+-          E(value, origin::database,
+-            F("null result in query: %s") % query.sql_cmd);
+-          row.push_back(string(value, value + bytes));
+-          //L(FL("row %d col %d value='%s'") % nrow % col % value);
++          if (value) {
++            row.push_back(string(value, value + bytes));
++          } else {
++            // sqlite3_column_blob() returns null for zero-length
++            I(bytes == 0);
++            row.push_back(string());
++          }
+         }
+       res.push_back(row);
+     }


More information about the scm-commits mailing list