Bug #24657 | debug assertation fails (string store) | ||
---|---|---|---|
Submitted: | 28 Nov 2006 15:12 | Modified: | 10 Jan 2008 9:49 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 4.1.22, 5.0.27/4.1BK/5.0BK/5.1BK | OS: | FreeBSD (freebsd/Suse Linux 10) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | assert, debug, qc |
[28 Nov 2006 15:12]
Martin Friebe
[28 Nov 2006 16:56]
MySQL Verification Team
Thank you for the bug report. Server version: 5.1.14-beta-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> --disable_warnings mysql> drop table if exists t1; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> --enable_warnings mysql> mysql> create table t1 (a varchar(19)); Query OK, 0 rows affected (0.01 sec) mysql> mysql> insert into t1 select rand(); Query OK, 1 row affected (0.02 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; Query OK, 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; ERROR 2013 (HY000): Lost connection to MySQL server during query ------------------------------------------------------------------ Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.32-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> --disable_warnings mysql> drop table if exists t1; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> --enable_warnings mysql> mysql> create table t1 (a varchar(19)); Query OK, 0 rows affected (0.00 sec) mysql> mysql> insert into t1 select rand(); Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql> ------------------------------------------------------------------ Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.1.23-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> --disable_warnings mysql> drop table if exists t1; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> --enable_warnings mysql> mysql> create table t1 (a varchar(19)); Query OK, 0 rows affected (0.01 sec) mysql> mysql> insert into t1 select rand(); Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; Query OK, 1 row affected (0.00 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql> insert into t1 select rand() from t1; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql>
[19 Dec 2007 10:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/40187 ChangeSet@1.2546, 2007-12-19 11:45:48+01:00, mhansson@linux-st28.site +3 -0 Bug#24657: debug assertation fails (string store) sprintf is used to insert DOUBLE values into VARCHAR columns, but it was assumed that sprintf would write only 1 byte for a positive number n < 1. In realtity it needs two, one for leading zero and one for decimal point. Fixed by making the number 2.
[10 Jan 2008 9:49]
Martin Hansson
This bug got fixed along with Bug#26788, so there's no need to push this patch.