Oracle 5.0 Reference Manual page 1224

Table of Contents

Advertisement

Code: 1265
Message: Data truncated for column 'b' at row 1
*************************** 2. row ***************************
Level: Warning
Code: 1263
Message: Data truncated, NULL supplied to NOT NULL column 'a' at row 2
*************************** 3. row ***************************
Level: Warning
Code: 1264
Message: Data truncated, out of range for column 'a' at row 3
*************************** 4. row ***************************
Level: Warning
Code: 1265
Message: Data truncated for column 'b' at row 3
4 rows in set (0.00 sec)
The
max_error_count
note messages for which the server stores information, and thus the number of messages that
displays. By default,
WARNINGS
the server can store, change the value of
The value of
warning_count
messages generated exceeds
In the following example, the
by the value of
warning_count
been set to 1:
mysql>
SHOW VARIABLES LIKE 'max_error_count';
+-----------------+-------+
| Variable_name
| Value |
+-----------------+-------+
| max_error_count | 64
+-----------------+-------+
1 row in set (0.00 sec)
mysql>
SET max_error_count=1;
Query OK, 0 rows affected (0.00 sec)
mysql>
ALTER TABLE t1 MODIFY b CHAR;
Query OK, 3 rows affected, 3 warnings (0.00 sec)
Records: 3
Duplicates: 0
mysql>
SELECT @@warning_count;
+-----------------+
| @@warning_count |
+-----------------+
|
3 |
+-----------------+
1 row in set (0.01 sec)
mysql>
SHOW WARNINGS;
+---------+------+----------------------------------------+
| Level
| Code | Message
+---------+------+----------------------------------------+
| Warning | 1263 | Data truncated for column 'b' at row 1 |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)
To disable warnings, set
indicates how many warnings have occurred, but none of the messages are stored.
The following
DROP TABLE
mysql>
DROP TABLE IF EXISTS test.no_such_table;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql>
SHOW WARNINGS;
+-------+------+-------------------------------+
| Level | Code | Message
+-------+------+-------------------------------+
Syntax
SHOW
[468]
system variable controls the maximum number of error, warning, and
max_error_count
max_error_count
[507]
is not limited by
max_error_count
statement produces three warning messages (as shown
ALTER TABLE
[507]), but only one is stored because
|
Warnings: 3
[468]
max_error_count
statement results in a note:
1204
[468]
is 64. To change the number of messages
[468].
max_error_count
[468].
max_error_count
|
to 0. In this case,
warning_count
|
SHOW
[468]
if the number of
[468]
[507]
still
has

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents