On Mon, May 02, 2022 at 12:25:04PM +0200, giova...@paclan.it wrote:
> On 5/2/22 09:40, Henrik K wrote:
> > On Mon, May 02, 2022 at 09:16:59AM +0200, giova...@paclan.it wrote:
> >> Recently committed DecodeShortURLs.pm plugin is not compatible with 
> >> previous third party plugin nor with what was in-tree until few days ago.
> >> Users running trunk should carefully read docs and upgrade their database 
> >> schema.
> >> Should we warn users@ as well when we commit those incompatible changes ?
> > 
> > I don't think I made any changes that would make trunk users incompatible,
> > if that's what you are suggesting?
> > 
> > SQLite version requirement I did bump up for upsert simplicity.
> > 
> I tried to convert my database to the new schema and I had this error when 
> running alter table queries:
> 
> ALTER TABLE `short_url_cache` CHANGE `created` `created` TIMESTAMP on update 
> CURRENT_TIMESTAMP NOT NULL; 
> #1292 - Incorrect datetime value: '1641801897' for column 
> `test`.`short_url_cache`.`created` at row 1
> 
> MySQL TIMESTAMP is stored as "YYYY-MM-DD HH:MM:SS" and not as a Unix epoch 
> timestamp.
> For this to work cached data should be converted or emptied.

Ah ok I see...  so you are actually using MySQL?  I kind of figured it was
not supported, since the plugin clearly documents only "sqlite" is supported

"Currently only sqlite is configured"
"url_shortener_cache_type sqlite"

I did notice there is sql/decodeshorturl_mysql.sql but I kind of shrugged it
off as something in development..

I actually just noticed that year ago there was actually some talk about
improving the plugin..  well atleast now it should be generally usable.

If I hazard a guess, then hopefully you are actually the only one using
MySQL, not sure it's worth bothering users@ about.  As a cache table there
no need to convert anything, just drop it and create again.  If you prefer,
the plugin can go back to using unix timestamps for MySQL, doesn't matter to
me..

Reply via email to