On Fri, Sep 28, 2012 at 9:31 AM, Sergei Nikulov <[email protected]>wrote:

> 2012/9/28 Pawel Aleksander Fedorynski <[email protected]>
>
>>
>>
>> On Fri, Sep 28, 2012 at 2:11 AM, Mateusz Loskot <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> I have received Pull Request generated against SOCI mirror at GitHub:
>>> https://github.com/SOCI/soci/pull/7
>>>
>>> Thanks Sergei (for other patches too, great help)!
>>>
>>> Pawel, could you take a look at this and comment?
>>>
>>
>> Thank you Sergei for the fix.  I haven't tested on MySQL 5.5 yet.  It's
>> kind of surprising that they broke compatibility in such a way but ah well.
>>
>> I don't think it's a good idea to use a compile time macro, since the
>> client library can be compiled with a different version from the one
>> running on the server.  It would be better to test the server version
>> using mysql_get_server_info() (see test1() in test-mysql.cpp.)  Also, since
>> this fix is just a fix to the test, the change should be contained to
>> test-mysql.cpp without polluting soci-mysql.h.  Just query the server
>> version in are_transactions_supported() using mysql_get_server_info(), and
>> if it's > 5.5 return true immediately (since server versions above 5.5 will
>> presumably continue supporting transactions.)
>>
>>
> I'm not agree with your point, because we need to test if binary from 5.5
> will work with prior version.
>

Sorry, I don't understand your point.  If we use a compile-time macro, then
the tests built with v. 5.5 will only successfully work when connecting to
a server v. 5.5.  If we test the server version at runtime using
mysql_get_server_info(), and adjust the requests accordingly, then the
tests will work with all server versions.  Am I missing something?

But obey to any your decision :-)
>
> Second comment: are_transactions_supported() - it isn't only with breakage.
> What should we do with code in
>
> table_creator_one(session & sql)
> ?
>
> It also contains "type" instead of "engine".  Also should add runtime
> check?
>

Good point!  Yes, a runtime check.  We don't want to test each time a table
is created, but once at the beginning and then store the result in
test_context and pass it as a parameter to table_creator_one's constructor.

Thanks,

Aleksander


> BTW, "engine" was already introduced in 5.0 and deprecated since then.
> But in prior to 5.5 where mode "type" was removed, it was interchangeable
> with "engine".
>
>
>> Thanks,
>>
>> Aleksander
>>
>> Sorry for delegating, but I'm not very experienced with MySQL.
>>> If you think it's nice feature and safe to apply then I can do it,
>>> just give me green light please.
>>>
>>> Best regards,
>>> --
>>> Mateusz Loskot, http://mateusz.loskot.net
>>>
>>> --
> Best Regards,
> Sergey Nikulov
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Soci-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/soci-users
>
>
------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to