Open
Description
Definition of item_id
is INT as seen here:
CREATE TABLE `shopping_cart` (
`item_id` INT NOT NULL AUTO_INCREMENT,
calling procedure shopping_cart_add_product()
with adequate results in
Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect integer value: 'f93b1c05-74d4-11e9-b143-3497f6a16369' for column `tshirtshop`.`shopping_cart`.`item_id` at row 1
Mistake is in INSERT-ing item_id
as UUID()
which is NOT an INT type.
line #1003:
VALUES (UUID(), inCartId, inProductId, inAttributes, 1, NOW());
"UUID() returns a value that conforms to UUID version 1 as described in RFC 4122. The value is a 128-bit number represented as a utf8 string of five hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:"
From: https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid
Observed on MariaDB 10.3.14
Metadata
Metadata
Assignees
Labels
No labels