The mi_version_comparison() function
The mi_version_comparison() function compares the version of two instances of HCL OneDB™.
Syntax
mi_integer mi_version_comparison(s1, s2)
mi_char1 *s1;
mi_char *s2;
- s1
- The starting string address of the version number to compare.
- s2
- The ending string address of the version number to compare.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_version_comparison() function compares the version for the major, minor, and interim version numbers of two database servers. For example, for HCL OneDB 11.50.UC6, the major version is 11, the minor version is 50, and the interim number is 6. If the interim number is omitted in one of the strings, then both strings will only be compared for only the major and minor release numbers.
Important: You must always use the mi_version_comparison() function
instead of using a string comparison.
Return values
- MI_ERROR (-1)
- indicates an error in the strings that are passed.
- 2
- The value of s1 is greater than the value of s2.
- 0
- The values of s1 and s2 are equal.
- -2
- The value of s1 is less than the value of s2.