SHOW WARNINGS
statement can be used to retrieve the warning produced by the latest query. The error message will be returned along with the query itself:
> SELECT * FROM test1 WHERE MATCH('@@title hello') \G
mysql1064 (42000): index test1: syntax error, unexpected TOK_FIELDLIMIT
ERROR '@title hello'
near
> SELECT * FROM test1 WHERE MATCH('@title -hello') \G
mysql1064 (42000): index test1: query is non-computable (single NOT operator)
ERROR
> SELECT * FROM test1 WHERE MATCH('"test doc"/3') \G
mysql*************************** 1\. row ***************************
id: 4
2500
weight: group_id: 2
1231721236
date_added: 1 row in set, 1 warning (0.00 sec)
> SHOW WARNINGS \G
mysql*************************** 1\. row ***************************
Level: warning
1000
Code: =2, thresh=3); replacing quorum operator
Message: quorum threshold too high (wordswith AND operator
1 row in set (0.00 sec)