[MDEV-4241] Assertion failure: scale >= 0 && precision > 0 && scale <= precision in decimal_bin_size Created: 2013-03-05 Updated: 2013-03-07 Resolved: 2013-03-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.1, 5.5.29, 5.5.28a-galera, 5.3.12 |
| Fix Version/s: | 10.0.2, 5.5.31, 5.3.13 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Raif Atef | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 8 32-bit fully patched and updated. |
||
| Attachments: |
|
| Description |
| Comments |
| Comment by Raif Atef [ 2013-03-05 ] |
|
Strangely enough, the simplified test case only crashes for me on the debug build, and not on the official 5.5.29 release build. The 1st test query (crash_query_1.sql) stops crashing if I add a CAST(rating.RTG_NOTE as INT) inside the AVG function call. |
| Comment by Oleksandr Byelkin [ 2013-03-05 ] |
|
To make it working independent from windows 'GSR' should be changed to 'gsr' in both queries. |
| Comment by Elena Stepanova [ 2013-03-05 ] |
|
You can also use --lower_case_table_names=1 for the same purpose |
| Comment by Raif Atef [ 2013-03-05 ] |
|
Yes, I noticed that in the DDL schema I posted, "gsr" was in lower case, my apologies for any confusion. This was due to the export tool I used. In the actual schema, the table name is created in the create table statement with "GSR" uppercase and it works correctly. |
| Comment by Elena Stepanova [ 2013-03-05 ] |
|
>> Yes, I noticed that in the DDL schema I posted, "gsr" was in lower case, my apologies for any confusion Not your fault, that's how it works on Windows. The option --lower_case_table_names helps to make such things portable. And no, the casing has nothing to do with the crash, of course. |
| Comment by Oleksandr Byelkin [ 2013-03-05 ] |
|
Please don't take my comment to heart, it was mostly for me to avoid problem if I decide to repeat it after some time. The thing is trivial to find and fix and it is not the first time I've met it, just it will economize me 5-10 min if I'll decide to repeat it in several weeks. |
| Comment by Sergei Golubchik [ 2013-03-05 ] |
|
Sanja, please, replace this assert with three AND-ed conditions, by three separate asserts. Thanks! |
| Comment by Oleksandr Byelkin [ 2013-03-06 ] |
|
Reduced test suite: insert into t1 (f) values ('5'),('5'); SELECT |
| Comment by Oleksandr Byelkin [ 2013-03-06 ] |
|
In MySQL it is not reproducible because it has REAL type while in MariaDB it is DECIMAL |
| Comment by Oleksandr Byelkin [ 2013-03-06 ] |
|
The problem is that Firld_enum inherit decimals() from Field_str |
| Comment by Oleksandr Byelkin [ 2013-03-06 ] |
|
fix committed for review (original test suite was checked). |
| Comment by Oleksandr Byelkin [ 2013-03-06 ] |
|
Pushed. |