Description:
mysqld: /home/sbester/build/bzr/mysql-trunk/strings/decimal.c:1440: decimal_bin_size: Assertion `scale >= 0 && precision > 0 && scale <= precision' failed.
(gdb) bt
#0 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 in abort () at abort.c:92
#2 in __assert_fail at assert.c:81
#3 in decimal_bin_size at ./strings/decimal.c:1440
#4 in my_decimal_get_binary_size at ./sql/my_decimal.h:261
#5 in Field_new_decimal::Field_new_decimal at ./sql/field.cc:2516
#6 in Field_new_decimal::create_from_item at ./sql/field.cc:2560
#7 in create_tmp_field_from_item at ./sql/sql_select.cc:14944
#8 in create_tmp_field at ./sql/sql_select.cc:15156
#9 in create_tmp_table at ./sql/sql_select.cc:15502
#10 in JOIN::optimize at ./sql/sql_select.cc:2522
#11 in mysql_select at ./sql/sql_select.cc:3540
#12 in handle_select at ./sql/sql_select.cc:323
#13 in execute_sqlcom_select at ./sql/sql_parse.cc:4513
#14 in mysql_execute_command at ./sql/sql_parse.cc:2096
#15 in mysql_parse at ./sql/sql_parse.cc:5550
#16 in dispatch_command at ./sql/sql_parse.cc:1078
#17 in do_command at ./sql/sql_parse.cc:815
#18 in do_handle_one_connection at ./sql/sql_connect.cc:748
#19 in handle_one_connection at ./sql/sql_connect.cc:684
#20 in start_thread
#21 in clone
How to repeat:
drop table if exists `t1`;
create table `t1`(`a` decimal(1,1)unsigned)engine=myisam;
insert into `t1` values (0.2),(0.1);
select 1 from `t1` group by
@a:=(select round(`a`) from `t1` where @`a`=`a`);