Hi Guillaume,
Please don’t forgot to add the devel list in your mails.
For your question: I’m not entirely sure. I think you can configure it using the MySQL server configuration.
Regards,
Nicky
On 6 Jul 2018, at 13:59, Guillaume MILAN guillaumilan@gmail.com wrote:
Hi Nicky Is it possible to change the mysql default collation? To be able to create the domjudge data base with the correct collation?
Regards, Guillaume
Le 6 juil. 2018 13:09, "Nicky Gerritsen" <nickygerritsen@me.com mailto:nickygerritsen@me.com> a écrit : Hi Guillaume,
This might happen with specific MySQL collations. If I remember correctly either utf8 or utf8mb4 has this issue and the other doesn’t.
Regards,
Nicky
On 6 Jul 2018, at 13:04, Guillaume MILAN <guillaumilan@gmail.com mailto:guillaumilan@gmail.com> wrote:
Hello while I launch the dj_setup_database executable, I receive the following error.
ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes
Do you know what can create this error?
Regards Guillaume
DOMjudge-devel mailing list DOMjudge-devel@domjudge.org mailto:DOMjudge-devel@domjudge.org https://www.domjudge.org/mailman/listinfo/domjudge-devel https://www.domjudge.org/mailman/listinfo/domjudge-devel
Hello, Thanks for pointing the point, I agree by finding people strugling too with this problem and having also utf8mb4 encoding. But now I set the database variable as follow and I still have the same issue.
+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec)
+----------------------+-----------------+ | Variable_name | Value | +----------------------+-----------------+ | collation_connection | utf8_general_ci | | collation_database | utf8_general_ci | | collation_server | utf8_general_ci | +----------------------+-----------------+
ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes
Do I need to do something else?
Regards Guillaume
On 6 July 2018 at 14:22, Nicky Gerritsen nickygerritsen@me.com wrote:
Hi Guillaume,
Please don’t forgot to add the devel list in your mails.
For your question: I’m not entirely sure. I think you can configure it using the MySQL server configuration.
Regards,
Nicky
On 6 Jul 2018, at 13:59, Guillaume MILAN guillaumilan@gmail.com wrote:
Hi Nicky Is it possible to change the mysql default collation? To be able to create the domjudge data base with the correct collation?
Regards, Guillaume
Le 6 juil. 2018 13:09, "Nicky Gerritsen" nickygerritsen@me.com a écrit :
Hi Guillaume,
This might happen with specific MySQL collations. If I remember correctly either utf8 or utf8mb4 has this issue and the other doesn’t.
Regards,
Nicky
On 6 Jul 2018, at 13:04, Guillaume MILAN guillaumilan@gmail.com wrote:
Hello while I launch the dj_setup_database executable, I receive the following error.
*ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes*
Do you know what can create this error?
Regards Guillaume
DOMjudge-devel mailing list DOMjudge-devel@domjudge.org https://www.domjudge.org/mailman/listinfo/domjudge-devel
The problem is likely that you have an index on a varchar(255). In utf8 each character takes up 3 bytes, so the index would be approximately 3*255 bytes long. That is too long, so you need to specify that the index is on less bytes. See some examples in our SQL structure file.
Jaap
On July 6, 2018 3:27:21 PM GMT+02:00, Guillaume MILAN guillaumilan@gmail.com wrote:
Hello, Thanks for pointing the point, I agree by finding people strugling too with this problem and having also utf8mb4 encoding. But now I set the database variable as follow and I still have the same issue.
+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec)
+----------------------+-----------------+ | Variable_name | Value | +----------------------+-----------------+ | collation_connection | utf8_general_ci | | collation_database | utf8_general_ci | | collation_server | utf8_general_ci | +----------------------+-----------------+
ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes
Do I need to do something else?
Regards Guillaume
On 6 July 2018 at 14:22, Nicky Gerritsen nickygerritsen@me.com wrote:
Hi Guillaume,
Please don’t forgot to add the devel list in your mails.
For your question: I’m not entirely sure. I think you can configure
it
using the MySQL server configuration.
Regards,
Nicky
On 6 Jul 2018, at 13:59, Guillaume MILAN guillaumilan@gmail.com
wrote:
Hi Nicky Is it possible to change the mysql default collation? To be able to
create
the domjudge data base with the correct collation?
Regards, Guillaume
Le 6 juil. 2018 13:09, "Nicky Gerritsen" nickygerritsen@me.com a
écrit :
Hi Guillaume,
This might happen with specific MySQL collations. If I remember
correctly
either utf8 or utf8mb4 has this issue and the other doesn’t.
Regards,
Nicky
On 6 Jul 2018, at 13:04, Guillaume MILAN guillaumilan@gmail.com
wrote:
Hello while I launch the dj_setup_database executable, I receive the following error.
*ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes*
Do you know what can create this error?
Regards Guillaume
DOMjudge-devel mailing list DOMjudge-devel@domjudge.org https://www.domjudge.org/mailman/listinfo/domjudge-devel
Hello, Thanks for the help. I fixed the problem by modifying the file mysql_db_structure.sql
https://github.com/DOMjudge/domjudge/blob/master/sql/mysql_db_structure.sql At the table creation line 453 I modified the externalid CHARACTER SET to ascii and the COLLATION to ascii_general_ci.
I don't know if it's only on my machine or if you should modify it on the git.
Regards Guillaume
On 6 July 2018 at 18:25, Jaap Eldering jaap@jaapeldering.nl wrote:
The problem is likely that you have an index on a varchar(255). In utf8 each character takes up 3 bytes, so the index would be approximately 3*255 bytes long. That is too long, so you need to specify that the index is on less bytes. See some examples in our SQL structure file.
Jaap
On July 6, 2018 3:27:21 PM GMT+02:00, Guillaume MILAN < guillaumilan@gmail.com> wrote:
Hello, Thanks for pointing the point, I agree by finding people strugling too with this problem and having also utf8mb4 encoding. But now I set the database variable as follow and I still have the same issue.
+--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec)
+----------------------+-----------------+ | Variable_name | Value | +----------------------+-----------------+ | collation_connection | utf8_general_ci | | collation_database | utf8_general_ci | | collation_server | utf8_general_ci | +----------------------+-----------------+
ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes
Do I need to do something else?
Regards Guillaume
On 6 July 2018 at 14:22, Nicky Gerritsen nickygerritsen@me.com wrote:
Hi Guillaume,
Please don’t forgot to add the devel list in your mails.
For your question: I’m not entirely sure. I think you can configure it using the MySQL server configuration.
Regards,
Nicky
On 6 Jul 2018, at 13:59, Guillaume MILAN guillaumilan@gmail.com wrote:
Hi Nicky Is it possible to change the mysql default collation? To be able to create the domjudge data base with the correct collation?
Regards, Guillaume
Le 6 juil. 2018 13:09, "Nicky Gerritsen" nickygerritsen@me.com a écrit :
Hi Guillaume,
This might happen with specific MySQL collations. If I remember correctly either utf8 or utf8mb4 has this issue and the other doesn’t.
Regards,
Nicky
On 6 Jul 2018, at 13:04, Guillaume MILAN guillaumilan@gmail.com wrote:
Hello while I launch the dj_setup_database executable, I receive the following error.
*ERROR 1071 (42000) at line 436: Specified key was too long; max key length is 767 bytes*
Do you know what can create this error?
Regards Guillaume
DOMjudge-devel mailing list DOMjudge-devel@domjudge.org https://www.domjudge.org/mailman/listinfo/domjudge-devel
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
DOMjudge-devel mailing list DOMjudge-devel@domjudge.org https://www.domjudge.org/mailman/listinfo/domjudge-devel