[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Impossible commit
From: |
Richard Levitte |
Subject: |
Re: [Monotone-devel] Impossible commit |
Date: |
Mon, 25 Oct 2010 22:10:57 +0200 (CEST) |
The attached patch fixes this.
Cheers,
Richard
In message <address@hidden> on Mon, 25 Oct 2010 20:46:30 +0200, xavier grave
<address@hidden> said:
xavier.grave> Hi,
xavier.grave>
xavier.grave> During a commit I get the following messages :
xavier.grave> mtn commit
xavier.grave> enter passphrase for key ID address@hidden (5d9a950e...):
xavier.grave> mtn: beginning commit on branch 'org.os-lovelace.multi'
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave> mtn: fatal: std::terminate() - exception thrown while handling
another
xavier.grave> exception
xavier.grave> mtn: this is almost certainly a bug in monotone.
xavier.grave> mtn: please send this error message, the output of 'mtn version
xavier.grave> --full',
xavier.grave> mtn: and a description of what you were doing to
xavier.grave> address@hidden
xavier.grave> mtn: wrote debugging log to
/lovelace/org.os-lovelace.multi/_MTN/debug
xavier.grave> mtn: if reporting a bug, please include this file
xavier.grave>
xavier.grave> So here is the result of "mtn version --full"
xavier.grave>
xavier.grave> monotone 0.48 (base revision:
xavier.grave> 844268c137aaa783aa800a9c16ae61edda80ecea)
xavier.grave> Running on : Linux 2.6.32-5-amd64 #1 SMP Fri Oct 15 00:56:30 UTC
2010
xavier.grave> x86_64
xavier.grave> C++ compiler : GNU C++ version 4.4.4
xavier.grave> C++ standard library: GNU libstdc++ version 20100712
xavier.grave> Boost version : 1_42
xavier.grave> SQLite version : 3.7.3 (compiled against 3.7.0)
xavier.grave> Lua version : Lua 5.1
xavier.grave> PCRE version : 8.02 2010-03-19 (compiled against 8.2)
xavier.grave> Botan version : 1.8.9 (compiled against 1.8.8)
xavier.grave> Changes since base revision:
xavier.grave> format_version "1"
xavier.grave>
xavier.grave> new_manifest [86bede3ba4251594f3a0f7e0c31560f9f8ce3744]
xavier.grave>
xavier.grave> old_revision [844268c137aaa783aa800a9c16ae61edda80ecea]
xavier.grave>
xavier.grave> Generated from data cached in the distribution;
xavier.grave> further changes may have been made.
xavier.grave>
xavier.grave> Is there any possible "simple" workaround ?
xavier.grave> Thanks in advance, xavier
----------------------------------------------------------------------
Revision: 9def7716bcd068fc1929ed8336432bbed775d9ee
Parent: 97939c9677047b36beef031cce4c1896849a987c
Author: Timothy Brownawell <address@hidden>
Date: 2010-10-21 14.01.31
Branch: net.venge.monotone
Changelog:
sqlite3_column_blob() returns null for both empty blobs and real nulls.
Check the actual datatype first, and don't rely on a non-null return.
This only matters for recent SQLite, noted in bug 96.
Changes against parent 97939c9677047b36beef031cce4c1896849a987c
ändrade database.cc
============================================================
--- 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);
}