[MDEV-8854] New warning messages are unreadable Created: 2015-09-27 Updated: 2015-11-09 Resolved: 2015-11-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 5.5.45 |
| Fix Version/s: | 5.5.47 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
What close to what? What does the right bracket relate to?
How can it be too few if I have more than I should have?
Again, what close to what? Data dictionary to foreign keys? Referenced table to foreign keys? ... |
| Comments |
| Comment by Jan Lindström (Inactive) [ 2015-09-28 ] | |||||||
|
Hi, I see, if you have suggestions on how to make these more readable that would be more than welcomed. Messages like near xxxx, mean that parser has found something unexpected starting on that string, it could be or not be the exactly the correct place where something is wrong. | |||||||
| Comment by Elena Stepanova [ 2015-09-28 ] | |||||||
|
Regarding the "close to XXXX" part, why not make it look the same as the old "error in SQL syntax", which people are used to:
It's very similar, the important difference here is that the beginning of the part which could not be parsed is given in quote marks, so it's very clear that it actually quotes the original statement; "near" instead of "close to" is somewhat less important, it's just the matter of fast recognizing of familiar patterns in the message. I vote for "near". So, looking at the message
First, it says twice "foreign key constraint", there is no need for that. Either
or
would be more readable. Secondly, both quoted "in" and "close to" parts should be in quote marks. So, for the first example, if it were
it would have been much clearer, even though it looks very similar. The second message in the description is plain wrong, I suspect copy-paste. "close to" (or "near") should apparently point at the comma, not at the closing bracket, and "you have 2 when you should have 1" should be backwards. The third message is still weird.
I still don't like it that it claims that `tmp`.`t1` was referenced; and the "close to" part also points at the wrong place, it should be "close to 't1(a)'"; or, if you can't point at the exact place here, it should be "in 'foreign key(a) references t1(a))'", without the "close to" part. | |||||||
| Comment by Elena Stepanova [ 2015-09-29 ] | |||||||
|
Please note that | |||||||
| Comment by Jan Lindström (Inactive) [ 2015-11-09 ] | |||||||
|
commit 5d754fce95fa378027d1b575d049ab6b78823bb7 Improved warning messages by quote marks. |