diff options
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 |