Skip Menu |

This queue is for tickets about the Class-DBI-mysql CPAN distribution.

Report information
The Basics
Id: 119579
Status: new
Priority: 0/
Queue: Class-DBI-mysql

Owner: Nobody in particular
Requestors: emily [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

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 [...]
From: Emily Ezust <emily [...]>
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/] [/usr/share/perl5/Class/] [/usr/share/perl5/Class/] [/usr/share/perl5/Class/] [/usr/share/perl5/Class/] [/usr/share/perl5/Class/] [/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 -
Subject: Re: [ #119579] AutoReply: 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:56:28 -0500
To: bug-Class-DBI-mysql [...]
From: Emily Ezust <emily [...]>
Download (untitled) / with headers
text/plain 599b
Some further information on this bug: Even though the error message says "Can't insert new X", the values *are* being added to the database after all, with the correct next primary key id. There is no error when I issue an insert command with a new primary key id specified (not that this is a practical workaround, but it might be useful to know). The error message I get from the perl interpreter (as opposed to via apache) might also be useful: ...Can't get last insert id at (eval 251)[/usr/share/perl/5.22/] line 2. at (eval 251)[/usr/share/perl/5.22/] line 2.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to