MariaDB [test]> get diagnostics condition 5 @msg = message_text;
|
Query OK, 0 rows affected, 1 warning (0.000 sec)
|
|
MariaDB [test]> show warnings;
|
+-------+------+--------------------------+
|
| Level | Code | Message |
|
+-------+------+--------------------------+
|
| Error | 1758 | Invalid condition number |
|
+-------+------+--------------------------+
|
1 row in set (0.000 sec)
|
|
MariaDB [test]> get diagnostics condition 1 @ind = error_index, @msg = message_text;
|
Query OK, 0 rows affected (0.000 sec)
|
|
MariaDB [test]> select @ind, @msg;
|
+------+--------------------------+
|
| @ind | @msg |
|
+------+--------------------------+
|
| 3 | Invalid condition number |
|
+------+--------------------------+
|
1 row in set (0.000 sec)
|