diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-07-03 11:59:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-07-03 11:59:08 +0200 |
commit | d31e96535e3f41c36646f375680d7a4efc5772b2 (patch) | |
tree | 23fc92c12ae707cd255e4d885808e824a4c25520 /boost/mysql/date-time/test.hxx | |
parent | 6cd8b9f561b912f264ba4f723845935c40a3cb95 (diff) |
Test MySQL sub-second precision support
Diffstat (limited to 'boost/mysql/date-time/test.hxx')
-rw-r--r-- | boost/mysql/date-time/test.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/boost/mysql/date-time/test.hxx b/boost/mysql/date-time/test.hxx index 6244177..253ebb1 100644 --- a/boost/mysql/date-time/test.hxx +++ b/boost/mysql/date-time/test.hxx @@ -46,4 +46,21 @@ struct object std::vector<boost::posix_time::time_duration> durations; }; +// MySQL server version view. +// +#pragma db view query( \ + "SELECT " \ + "CAST(SUBSTRING_INDEX(@@version, '.', 1) AS UNSIGNED)," \ + "CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@@version, '.', 2), '.', -1) AS UNSIGNED)," \ + "CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(@@version, '-', 1), '.', -1) AS UNSIGNED)," \ + "@@protocol_version") +struct mysql_version +{ + unsigned int major; + unsigned int minor; + unsigned int release; + + unsigned int protocol; +}; + #endif // TEST_HXX |