Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL inserts issuing warnings 1

Status
Not open for further replies.

Itshim

Programmer
Apr 6, 2004
277
US
Can anyone tell me if MySQL >= v. 4.1.1 issues warnings for single row inserts? I know in previous versions it would only issue warnings during inserts if it was a multiple row insert, but the manual states:
MySQL Manual said:
In 4.1.1, the situation is much improved, with warnings generated for statements such as LOAD DATA INFILE and DML statements such as INSERT, UPDATE, CREATE TABLE, and ALTER TABLE.
but then goes on to give an example of a multiple row insert statement.

I would test this myself, but at the moment I do not have v.4.1.1 or higher running.

Thanks for your help,
Itshim
 
From MySQL v.4.1.7:
[tt]
mysql> insert t values ('longstring');
Query OK, 1 row affected, 1 warning (0.01 sec)

mysql> show warnings;
+---------+------+----------------------------------------+
| Level | Code | Message |
+---------+------+----------------------------------------+
| Warning | 1265 | Data truncated for column 's' at row 1 |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
[/tt]
 
TonyGroves, thank you very much that is exactly what I was looking for.

Itshim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top