Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL empty text/blob #69

Closed
hmagarotto opened this issue Jan 18, 2013 · 7 comments
Closed

MySQL empty text/blob #69

hmagarotto opened this issue Jan 18, 2013 · 7 comments
Assignees
Labels
Milestone

Comments

@hmagarotto
Copy link
Contributor

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
Copy link
Contributor Author

--- 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
Copy link
Member

aleks-f commented Jan 20, 2013

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

@aleks-f
Copy link
Member

aleks-f commented Jan 20, 2013

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

@hmagarotto
Copy link
Contributor Author

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.

@ghost ghost assigned aleks-f Feb 2, 2013
@ghost ghost assigned obiltschnig Mar 24, 2013
@aleks-f
Copy link
Member

aleks-f commented Mar 24, 2013

Re-assigning this to Günter.

@aleks-f
Copy link
Member

aleks-f commented May 1, 2014

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

@obiltschnig
Copy link
Member

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants