| 1 |
--source include/have_ndb.inc |
| 2 |
|
| 3 |
# |
| 4 |
# Check that MySQL Cluster version strings and numbers are correct |
| 5 |
# |
| 6 |
|
| 7 |
# Extract MySQL Server version string |
| 8 |
let $mysql_version_string= |
| 9 |
`SELECT VERSION()`; |
| 10 |
#echo mysql_version_string: $mysql_version_string; |
| 11 |
|
| 12 |
# Check that MySQL Server version include "-cluster" to indicate |
| 13 |
# that this is Cluster edition |
| 14 |
--disable_query_log ONCE |
| 15 |
eval SELECT REGEXP_LIKE('$mysql_version_string', '-cluster') |
| 16 |
AS "MySQL version contains '-cluster'"; |
| 17 |
|
| 18 |
# Extract MySQL Server version number, three numbers separated with dots |
| 19 |
let $mysql_version_number= |
| 20 |
`SELECT REGEXP_SUBSTR('$mysql_version_string', '[0-9]*[.][0-9]*[.][0-9]*')`; |
| 21 |
#echo mysql_version_number: $mysql_version_number; |
| 22 |
|
| 23 |
# Extract NDB version string |
| 24 |
let $ndb_version_string= |
| 25 |
`SELECT @@ndb_version_string`; |
| 26 |
#echo ndb_version_string: $ndb_version_string; |
| 27 |
|
| 28 |
# Check that NDB version string starts with "ndb-" |
| 29 |
--disable_query_log ONCE |
| 30 |
eval SELECT REGEXP_LIKE('$ndb_version_string', '^ndb-') |
| 31 |
AS "NDB version starts with 'ndb-'"; |
| 32 |
|
| 33 |
# Extract NDB version number, three numbers separated with dots after "ndb-" |
| 34 |
let $ndb_version_number= |
| 35 |
`SELECT REGEXP_SUBSTR('$ndb_version_string', '[0-9]*[.][0-9]*[.][0-9]*')`; |
| 36 |
#echo ndb_version_number: $ndb_version_number; |
| 37 |
|
| 38 |
# Check that the NDB version number is the same as the MySQL version number |
| 39 |
--disable_query_log ONCE |
| 40 |
eval SELECT '$ndb_version_number' = '$mysql_version_number' as |
| 41 |
"NDB version number matches MySQL version number"; |
| 42 |
|
| 43 |
|