[ 
https://issues.apache.org/jira/browse/QPID-8257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676614#comment-16676614
 ] 

Rob Godfrey edited comment on QPID-8257 at 11/6/18 11:13 AM:
-------------------------------------------------------------

[~overmeulen] The thing is that the column shouldn't need to be nullable, as 
Alex pointed out, an insert into the content table is only called if there is 
content (albeit that content may be of zero length).  So it's sort of wrong to 
have all that code in the store for nullable columns when the only reason is 
because Sybase can't store a 0 length content in an image.  As such, although 
it's a bit hacky, I think "image null" is a more appropriate solution. 

If I were wanting to make the solution less hacky, I'd probably add a "blob 
type needs to be nullable" boolean have that false for everything except Sybase 
and true for Sybase ... though at that point it is essentially an isSybase flag.


was (Author: rgodfrey):
[~overmeulen] The thing is that the column shouldn't need to be nullable, as 
Alex pointed out, an insert into the content table is only called if there is 
content (albeit that content may be of zero length).  So it's sort of wrong to 
have all that code in the store for nullable columns when the only reason is 
because Sybase can't store a 0 length content in an image.  As such, although 
it's a bit hacky, I think "image null" is a more appropriate solution. 

> Sybase message store not supporting empty messages
> --------------------------------------------------
>
>                 Key: QPID-8257
>                 URL: https://issues.apache.org/jira/browse/QPID-8257
>             Project: Qpid
>          Issue Type: Bug
>          Components: Broker-J
>    Affects Versions: qpid-java-broker-7.0.3
>            Reporter: Olivier VERMEULEN
>            Priority: Major
>
> Unlike other databases Sybase default nullability for a column is "NOT NULL".
> And since we don't specify anything when creating the QPID_MESSAGE_CONTENT 
> table, the "content" column defaults to "NOT NULL".
> So when we send an empty message, this constraint is broken and we receive a 
> SybSQLException...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to