Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'field_total_cost_1_value' at row 1: INSERT INTO {field_data_field_total_cost_1} (entity_type, entity_id, revision_id, bundle, delta, language, field_total_cost_1_value) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
[:db_insert_placeholder_0] => node
[:db_insert_placeholder_1] => 813
[:db_insert_placeholder_2] => 813
[:db_insert_placeholder_3] => game
[:db_insert_placeholder_4] => 0
[:db_insert_placeholder_5] => und
[:db_insert_placeholder_6] => 2176929497.9019
)
in field_sql_storage_field_storage_write() (line 495 of /var/www/docroot/modules/field/modules/field_sql_storage/field_sql_storage.module).
Strange sql results:
mysql> desc field_data_field_total_cost_generation_1;
+-------------------------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------------------------+------------------+------+-----+---------+-------+
| entity_type | varchar(128) | NO | PRI | | |
| bundle | varchar(128) | NO | MUL | | |
| deleted | tinyint(4) | NO | PRI | 0 | |
| entity_id | int(10) unsigned | NO | PRI | NULL | |
| revision_id | int(10) unsigned | YES | MUL | NULL | |
| language | varchar(32) | NO | PRI | | |
| delta | int(10) unsigned | NO | PRI | NULL | |
| field_total_cost_generation_1_value | float | YES | | NULL | |
+-------------------------------------+------------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
mysql> select * from field_data_field_total_cost_generation_1;
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_total_cost_generation_1_value |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| node | game | 0 | 807 | 807 | und | 0 | 1731850000 |
| node | game | 0 | 810 | 810 | und | 0 | 1731850000 |
| node | game | 0 | 813 | 813 | und | 0 | 2166930000 |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
3 rows in set (0.00 sec)
mysql> update field_data_field_total_cost_generation_1 set field_total_cost_generation_1_value = 2166929497.9078 where entity_id = 813;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql> select * from field_data_field_total_cost_generation_1;
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_total_cost_generation_1_value |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| node | game | 0 | 807 | 807 | und | 0 | 1731850000 |
| node | game | 0 | 810 | 810 | und | 0 | 1731850000 |
| node | game | 0 | 813 | 813 | und | 0 | 2166930000 |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
3 rows in set (0.00 sec)
mysql> update field_data_field_total_cost_generation_1 set field_total_cost_generation_1_value = 2066929497.9078 where entity_id = 813;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from field_data_field_total_cost_generation_1;
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_total_cost_generation_1_value |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| node | game | 0 | 807 | 807 | und | 0 | 1731850000 |
| node | game | 0 | 810 | 810 | und | 0 | 1731850000 |
| node | game | 0 | 813 | 813 | und | 0 | 2066930000 |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
3 rows in set (0.00 sec)
mysql> update field_data_field_total_cost_generation_1 set field_total_cost_generation_1_value = 20497.9078 where entity_id = 813;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from field_data_field_total_cost_generation_1;
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| entity_type | bundle | deleted | entity_id | revision_id | language | delta | field_total_cost_generation_1_value |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
| node | game | 0 | 807 | 807 | und | 0 | 1731850000 |
| node | game | 0 | 810 | 810 | und | 0 | 1731850000 |
| node | game | 0 | 813 | 813 | und | 0 | 20497.9 |
+-------------+--------+---------+-----------+-------------+----------+-------+-------------------------------------+
3 rows in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment