Hi,

I would like to avoid adding a new compatibility mode. Instead, I think it
would be better to match the MySQL behavior... I didn't know it was wrong,
until I read the first answer of this question:
http://stackoverflow.com/questions/20013154/h2-does-not-enforce-not-null-in-mysql-compatibility-mode

Patches are welcome!

Regards,
Thomas




On Fri, Jun 22, 2012 at 8:37 AM, edmund <[email protected]> wrote:

> missed the patch..
> Sorry noscript ;)
>
>
> On Friday, June 22, 2012 8:33:39 AM UTC+2, edmund wrote:
>>
>> Hi,
>> I checked the h2 source and used the attached patch to get a second mysql
>> profile "MySQLNullCheck" in which the insertZeroForNull flag is not set.
>> works for me but doesnt comply with the weird behavior of mysql.
>>
>> Hope this helps other trying to use h2/mysql for testing...
>>
>> Best,
>> Edmund
>>
>> On Thursday, June 21, 2012 5:35:12 PM UTC+2, edmund wrote:
>>>
>>> Hi,
>>>
>>> i stubled over a inconsistent behavior of mysql and h2/mysql:
>>>
>>> consider a table product with tiltle and desc both definded as not null.
>>>
>>> an insert like this will work in mysql and h2/mysql (as metioned in the
>>> compatiblity doc):
>>> > INSERT INTO `product` (`description`) VALUES ( 'asdf' );
>>>
>>> but this one should fail with some sql error just like in mysql:
>>> > INSERT INTO `product` (`title`,`description`) VALUES (NULL, 'asdf' );
>>>
>>> A Hint where I might change that in h2 would be nice :)
>>>
>>> Best,
>>> Edmund
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/h2-database/-/HlY6awFfkXUJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to