diff options
Diffstat (limited to 'qt/mysql/date-time/test.hxx')
-rw-r--r-- | qt/mysql/date-time/test.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qt/mysql/date-time/test.hxx b/qt/mysql/date-time/test.hxx index 7e58376..2570285 100644 --- a/qt/mysql/date-time/test.hxx +++ b/qt/mysql/date-time/test.hxx @@ -51,4 +51,21 @@ struct object QTime time; }; +// 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 |