[Home]

Summary:ASTERISK-28188: mysql db import error
Reporter:Michael (ringo)Labels:pjsip
Date Opened:2018-11-28 12:02:36.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:General
Versions:16.0.0 Frequency of
Occurrence
Related
Issues:
Environment:debian 9 amd64, asterisk v16 LTS, using pjsip, mysql ODBC.Attachments:
Description:root@#:/opt/src/asterisk-16.0.1# mysql temp < /opt/src/asterisk-16.0.1/contrib/realtime/mysql/mysql_config.sql
ERROR 1071 (42000) at line 613: Specified key was too long; max key length is 767 bytes

if I edit mysql_config.sql line 613 and change varchar to VARCHAR(190), it imports successfully.
Comments:By: Asterisk Team (asteriskteam) 2018-11-28 12:02:38.035-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Benjamin Keith Ford (bford) 2018-12-03 10:55:16.187-0600

This seems to be a problem with the OS. Works fine with Ubuntu, but Debian appears to have problems.

By: Sean Bright (seanbright) 2019-01-02 11:29:50.168-0600

There is no {{contrib/realtime/mysql}} directory in the git repository. Is that being packaged by a third party? My assumption is that your database's default charset is {{utf8mb4}} or something along those lines making the columns 4x longer than they should be.

By: Michael (ringo) 2019-01-03 15:36:40.572-0600

yep utf8mb4 is the default.

By: Sean Bright (seanbright) 2019-01-03 16:46:44.470-0600

Where are you getting the Asterisk source from that you have a {{contrib/realtime/mysql/mysql_config.sql}} file?

By: Michael (ringo) 2019-01-04 07:26:44.631-0600


http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz

asterisk-16.1.1/contrib/realtime/mysql/mysql_config.sql

By: Michael (ringo) 2019-01-04 07:41:12.889-0600

If i...
create database temp character set UTF8;
then
mysql temp < /opt/src/asterisk-16.1.1/contrib/realtime/mysql/mysql_config.sql
it seems to work fine.

By: Sean Bright (seanbright) 2019-01-04 08:37:53.550-0600

Well that's embarrassing. Looks like those SQL files are generated during the release process from the alembic scripts in the repository. Sorry for the confusion.

By: Michael (ringo) 2019-01-04 13:00:38.386-0600

fine by me.  you pointed towards the problem and solved it for me.