Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

MySQL empty text/blob #69

Closed
hmagarotto opened this Issue · 7 comments

3 participants

@hmagarotto

Assertion violation in debug binary with empty text field:

    Poco::Data::Session ses(Poco::Data::MySQL::Connector::KEY,...);
    ses << "DROP TABLE IF EXISTS Dummy", Poco::Data::now;
    ses <<  "CREATE TABLE Dummy(data TEXT)", Poco::Data::now;
    ses << "INSERT INTO Dummy VALUES('')", Poco::Data::now;
    ses << "SELECT data FROM Dummy", Poco::Data::now;

Assertion violation: pChar in file ".../poco-1.4.6-all/Data/include/Poco/Data/BLOB.h", line 180

@hmagarotto
--- poco-1.4.6-all.original/Data/MySQL/src/Extractor.cpp    2013-01-18 17:53:20.461811217 -0200
+++ poco-1.4.6-all/Data/MySQL/src/Extractor.cpp 2013-01-18 17:51:59.145814212 -0200
@@ -158,6 +158,9 @@
   if ( ! _stmt.fetchColumn(pos, &bind) )
     return false;

+  if ( ! length )
+      return true;
+  
   std::vector<char> data(length);
   bind.buffer = &data[0];
   bind.buffer_length= length;
@aleks-f
Owner

Did you re-run the whole testsuite after this fix?

@aleks-f
Owner

It looks right for 1.4.6. This has changed quite a bit in 1.5; no need for a fix there.

@hmagarotto

Sorry for a late response.
I re-run the whole testsuite and everything seems to be ok.
I still don't test 1.5 version. Will be released a fix version for 1.4.6?
Thanks.

@aleks-f aleks-f was assigned
@obiltschnig obiltschnig was assigned
@aleks-f
Owner

Re-assigning this to Günter.

@aleks-f
Owner

@obiltschnig: any plans for including this in 1.4.x?

@obiltschnig
Owner

missed this for 1.4.6. Will be in next 1.4.x release (if there's one...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.