Subject: | After upgrade of ubuntu, can't insert new items into any Class::DBI table through "insert" statements that have no primary key id |
Date: | Thu, 29 Dec 2016 20:04:19 -0500 |
To: | bug-Class-DBI-mysql [...] rt.cpan.org |
From: | Emily Ezust <emily [...] lieder.net> |
Hi there,
First, thank you so much for a wonderful library - I've been using it for
many years for a 21-year-old free-access web archive of 85,000+ classical
art song texts and 28,000+ translations.
I've just upgraded ubuntu and tried to use a local version of my website,
which uses Class::DBI::mysql. Every "insert" statement in my code that has
no primary key id specified now fails with this error message in my browser:
Can't insert new Lieder::Text: Can't get last insert id at
/var/www/testrepo/perl/lieder/protected/ModText.html line 473. Stack:
[/usr/share/perl/5.22/Carp.pm:166] [/usr/share/perl5/Class/DBI.pm:169]
[/usr/share/perl5/Class/DBI.pm:609] [/usr/share/perl5/Class/DBI.pm:628]
[/usr/share/perl5/Class/DBI.pm:573] [/usr/share/perl5/Class/DBI.pm:444]
[/var/www/testrepo/perl/lieder/protected/ModText.html:473]
[/var/www/testrepo/perl/lieder/protected/autohandler:53]
[/var/www/testrepo/perl/lieder/autohandler:289] at
/var/www/testrepo/perl/lieder/protected/ModText.html line 473.
Lieder::Text is one of two dozen classes that inherit from
Class::DBI::mysql. All the "insert" statements in my code rely on the
Class::DBI "magic" to figure out the next insert id to use, so the id is
not provided in the insert statement. Each table has a proper primary key
with autoincrement.
The code was all working before the upgrade, and works fine on my
production server (Red Hat, Openshift).
Other details:
cpan[1]> install Class::DBI
Class::DBI is up to date (3.0.17).
cpan[2]> install Class::DBI::mysql
Class::DBI::mysql is up to date (1.00).
% uname -a
Linux ubuntu 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:46:51 UTC 2016
i686 i686 i686 GNU/Linux
% mysql --version
mysql Ver 14.14 Distrib 5.7.16, for Linux (i686) using EditLine wrapper
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
====================
Is there something I can do to make this work again? Please let me know if
you need any other information.
Many thanks, and happy holidays,
Emily
--
Emily Ezust, Founder
The LiederNet Archive - http://www.lieder.net/