| 1 |
########### suite/sysschema/t/version_functions.test ############# |
| 2 |
# # |
| 3 |
# Testing of the sys.version_major(), sys.version_minor(), # |
| 4 |
# and sys.version_patch() functions # |
| 5 |
# # |
| 6 |
# Creation: # |
| 7 |
# 2015-08-14 jkrogh Implement this test # |
| 8 |
# # |
| 9 |
################################################################## |
| 10 |
|
| 11 |
|
| 12 |
# Sanity check - the functions should not return any warnings or errors |
| 13 |
--disable_result_log |
| 14 |
SELECT sys.version_major(); |
| 15 |
SELECT sys.version_minor(); |
| 16 |
SELECT sys.version_patch(); |
| 17 |
--enable_result_log |
| 18 |
|
| 19 |
# Check that concatenating the three version parts gives the beginning of the output of VERSION() |
| 20 |
# This is not truly an independent test, but there isn't really anywhere else to get the actual version, |
| 21 |
# so it at least verifies that the three parts go back together in the right way. |
| 22 |
let $MY_VERSION=`SELECT CONCAT(sys.version_major(), '.', sys.version_minor(), '.', sys.version_patch())`; |
| 23 |
--disable_query_log ONCE |
| 24 |
eval SET @my_version = '$MY_VERSION'; |
| 25 |
|
| 26 |
SELECT @my_version = SUBSTRING(VERSION(), 1, CHAR_LENGTH(@my_version)); |