[MDEV-9516] type error when setting session variable Created: 2016-02-03 Updated: 2016-03-28 Resolved: 2016-03-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements |
| Affects Version/s: | 10.1.9, 10.1 |
| Fix Version/s: | 10.1.13 |
| Type: | Bug | Priority: | Major |
| Reporter: | Moritz Vondano | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | regression | ||
| Environment: |
XAMPP bundle on Windows 8.1 |
||
| Sprint: | 10.1.13 |
| Description |
|
The following query fails:
Error: There should be no type conversion issue as those queries work:
please see this SO question for detail: |
| Comments |
| Comment by Elena Stepanova [ 2016-02-06 ] | |||||
|
Thanks for the report. The problem was introduced by this commit:
| |||||
| Comment by Alexander Barkov [ 2016-03-16 ] | |||||
|
Note, the same problem is repeatable in 10.0 with other hybrid type functions:
So the patch for | |||||
| Comment by Alexander Barkov [ 2016-03-16 ] | |||||
|
Possible fixes:
b. Another option is just to accept all DECIMAL(N, 0), even if N is big enough, and produce a warning on overflow. c. Another option is to accept all DECIMAL(N,M), even if M>0, and produce a warning on fraction truncation. | |||||
| Comment by Alexander Barkov [ 2016-03-16 ] | |||||
|
During a discussion, Serg and Bar decided to accept DECIMAL(N,0), no matter if N is big enough, and produce an error if the value does not fit. | |||||
| Comment by Sergei Golubchik [ 2016-03-21 ] | |||||
|
ok to push |