Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[install/migration] MySQL Greek characters in migration script 18.0.0-19.0.0.sql causing errors #29715

Closed
Benvii opened this issue May 18, 2024 · 3 comments
Labels
Bug invalid or external Bug not valid or for another component

Comments

@Benvii
Copy link

Benvii commented May 18, 2024

Bug

I everyone running the migration from 18.0.* to 19.0.2 I've got the following error :

Request 62 sql='ALTER TABLE llx_c_invoice_subtype MODIFY COLUMN code varchar(5) NOT NULL;'
Request 63 sql='insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.1', 'Πιστωτικό Τιμολόγιο / Συσχετιζόμενο', 0);'
Erreur DB_ERROR_1366 (Req 63): insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.1', 'Πιστωτικό Τιμολόγιο / Συσχετιζόμενο', 0);
Incorrect string value: '\xCE\xA0\xCE\xB9\xCF\x83...' for column 'label' at row 1
Request 64 sql='insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.2', 'Πιστωτικό Τιμολόγιο / Μη Συσχετιζόμενο', 1);'
Erreur DB_ERROR_1366 (Req 64): insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.2', 'Πιστωτικό Τιμολόγιο / Μη Συσχετιζόμενο', 1);
Incorrect string value: '\xCE\xA0\xCE\xB9\xCF\x83...' for column 'label' at row 1
Request 65 sql='insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '11.4', 'Πιστωτικό Στοιχ. Λιανικής', 1);'
Erreur DB_ERROR_1366 (Req 65): insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '11.4', 'Πιστωτικό Στοιχ. Λιανικής', 1);
Incorrect string value: '\xCE\xA0\xCE\xB9\xCF\x83...' for column 'label' at row 1
Request 66 sql='ALTER TABLE llx_product ADD COLUMN stockable_product integer DEFAULT 1 NOT NULL;'

This table is in latin1_swedish_ci on my installation, upgrade seems to work fine even with this error. As it may impact other users I prefer to open this issue.

It was introduced here : 1e3e53f

Dolibarr Version

19.0.2

Environment PHP

7.4

Environment Database

Mysql (5.7)

Steps to reproduce the behavior and expected behavior

Run a migration from 18.0.* or 19.0.0 -> 19.0.* on MySQL database.

Attached files

error_migration

@Benvii Benvii added the Bug This is a bug (something does not work as expected) label May 18, 2024
@ksar-ksar
Copy link
Contributor

Hello,

All your database tables should be in uft8_general_ci

@ksar-ksar ksar-ksar added Bug invalid or external Bug not valid or for another component and removed Bug This is a bug (something does not work as expected) labels May 19, 2024
@Benvii
Copy link
Author

Benvii commented May 20, 2024

Thanks for your reply I've altered all tables to be in uft8_general_ci and migration passed successfully.

@arusa
Copy link

arusa commented May 26, 2024

JFI: for me the solution was:

ALTER TABLE llx_c_invoice_subtype COLLATE utf8_general_ci;
ALTER TABLE llx_c_invoice_subtype MODIFY label varchar(100) CHARACTER SET utf8 DEFAULT NULL;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug invalid or external Bug not valid or for another component
Projects
None yet
Development

No branches or pull requests

3 participants