| Bug #5836 | inserting oversized string causes server to crash | ||
|---|---|---|---|
| Submitted: | 1 Oct 2004 0:33 | Modified: | 1 Oct 2004 13:56 |
| Reporter: | Peter Pebler | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 4.1.5 | OS: | Windows (Windows) |
| Assigned to: | CPU Architecture: | Any | |
[1 Oct 2004 3:31]
Peter Pebler
This also happens when doing the insert using the c API.
[1 Oct 2004 13:56]
MySQL Verification Team
I wasn't able to repeat:
E:\MySQL\MySQL Server 4.1>cd bin
E:\MySQL\MySQL Server 4.1\bin>mysql -uroot -p -P3307
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.5-gamma-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test;
Database changed
mysql> create table testtable (a varchar(2));
Query OK, 0 rows affected (0.18 sec)
mysql> insert into testtable values ("123");
Query OK, 1 row affected, 1 warning (0.07 sec)
mysql> show warnings;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1265 | Data truncated for column 'a' at row 1 |
+---------+------+----------------------------------------+
1 row in set (0.02 sec)
mysql>
[1 Oct 2004 21:21]
Peter Pebler
Uninstalling all mysql versions on the system, then installing 4.1.5 again fixed this problem.

Description: Inserting a string of more than N characters into a field of type char(N) or varchar(N) using the "mysql" command-line client causes the mysql server to crash. How to repeat: Execute the following statements: create table testtable (a char(2)); insert into testtable values ("123"); Or the following: create table testtable (a varchar(2)); insert into testtable values ("123");