Hi Percy, On 08-02-2013 12:07:30 -0600, Percy Wegmann wrote:
The solution is to add something like the following after the out.newLine() on line 86:
error = in.waitForPrompt();
if (error != null) {
throw new Exception(error);
}
I'm surprised this works for you. It shouldn't as a matter of fact. Since we don't flush, the server /can/ tell us it read something it is certain of it was a complete statement, but isn't happy with, but we didn't say we finished our command yet, so it could /also/ say it only once we finish sending all we got. Therefore we can't wait for a prompt, there shouldn't be one to come here, as we didn't flush (= indefinite hang). In any case, waiting for a prompt there is a wrong thing to do, even if it accidentially seems to work. A bug in the server (due to streams being taken over) causes this behaviour, but you should never rely on it. That said, feel free to use the hack, but I'm not going to add it to the example. -- Fabian Groffen fabian@monetdb.org column-store pioneer http://www.monetdb.org/Home