Pages: 1
Hello/Hi/Greetings,
What can cause this?
Piwigo URL: http://fotoarkiv.no
Offline
( ! ) Warning: [mysql error 167] Out of range value for column 'id' at row 1 INSERT INTO `piwigo_tags` (`name`,`url_name`) VALUES('Hohenzollern','hohenzollern') in /hd1/var/www/virtual/fotodb.net/arkiv/include/dblayer/functions_mysqli.inc.php on line 847 Call Stack # Time Memory Function Location 1 0.0000 389848 {main}( ) .../admin.php:0 2 0.2874 1140816 include( '/hd1/var/www/virtual/fotodb.net/arkiv/admin/batch_manager.php ) .../admin.php:345 3 0.7617 4977080 include( '/hd1/var/www/virtual/fotodb.net/arkiv/admin/batch_manager_global.php ) .../batch_manager.php:814 4 0.7621 4988456 get_tag_ids( $raw_tags = [0 => 'Hohenzollern'], $allow_create = ??? ) .../batch_manager_global.php:110 5 0.7621 4988544 tag_id_from_tag_name( $tag_name = 'Hohenzollern' ) .../functions.php:2816 6 0.7735 4989968 mass_inserts( $table_name = 'piwigo_tags', $dbfields = [0 => 'name', 1 => 'url_name'], $datas = [0 => ['name' => 'Hohenzollern', 'url_name' => 'hohenzollern']], $options = ??? ) .../functions.php:1756 7 0.7741 4990096 pwg_query( $query = '\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')' ) .../functions_mysqli.inc.php:550 8 0.7743 4990144 my_error( $header = '\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')', $die = FALSE ) .../functions_mysqli.inc.php:132 9 0.7744 4990336 trigger_error( $message = '[mysql error 167] Out of range value for column \'id\' at row 1\n\nINSERT INTO `piwigo_tags`\n (`name`,`url_name`)\n VALUES(\'Hohenzollern\',\'hohenzollern\')', $error_type = 512 ) .../functions_mysqli.inc.php:847
Offline
Further investigation leads me to think ID number in MariaDB Piwigo database has a LIMIT set to 65535 items.
Shit.
Last edited by BigIsland270972 (2023-02-07 17:50:39)
Offline
Yes, tag id smallint(5) unsigned is limited to 64k. As are category id and group id.
You maybe could get away with changing
* table piwigo_image_tag `tag_id`
* table piwigo_tags `id`
both to mediumint(8) unsigned, which would allow for values up to 16777215.
Maybe, because I don't know if there's code that assumes max uint16 values.
Offline
Hello
yes if there is more than 1.6M there is the possibility at 4 294 967 295 with INT()
just replace this in mariadb.
Offline
Actually it'd be more than 16M, but I'd guess if one had more tags than that there'd be more urgent problems than getting even more tags..
Offline
erAck wrote:
Yes, tag id smallint(5) unsigned is limited to 64k. As are category id and group id.
You maybe could get away with changing
* table piwigo_image_tag `tag_id`
* table piwigo_tags `id`
both to mediumint(8) unsigned, which would allow for values up to 16777215.
Maybe, because I don't know if there's code that assumes max uint16 values.
Thanks for the reply. What SQL query will convert the table type from smallint to mediumint or bigint??
Best regards
Robert
Last edited by BigIsland270972 (2023-02-07 20:13:13)
Offline
Never mind. I found a solution using phpmyadmin.
THANKS to ALL!
RESOLVED.
Cheers
Last edited by BigIsland270972 (2023-02-07 20:41:59)
Offline
Just a quick NOTE. If anybody encounter this problem in the future don't hesitate to contact me for the instructions.
Best regards
Robert
Offline
Pages: 1