6.0.0-alpha12
5/29/25

[#15172] mysql V 8.0.36: SQL QUERY FAILED: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'other_attributes' can't have a default value
Summary mysql V 8.0.36: SQL QUERY FAILED: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'other_attributes' can't have a default value
Queue Kronolith
Queue Version FRAMEWORK_6_0
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at) , ralf.lang (at) ralf-lang (dot) de
Requester mrch (at) mailbox (dot) org
Created 09/26/2024 (245 days ago)
Due
Updated 05/29/2025 (today)
Assigned 05/29/2025 (today)
Resolved 05/29/2025 (today)
Milestone
Patch No

History
05/29/2025 06:43:19 PM Ralf Lang Comment #5
State ⇒ Resolved
Reply to this comment
05/29/2025 10:49:24 AM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (FRAMEWORK_6_0):

commit 9b12019057d6b5dd3b9a488598256e554e77a136
Author: Ralf Lang <ralf.lang@ralf-lang.de>
Date:   Thu, 29 May 2025 12:49:21 +0200

Release 3.0.0-alpha6  (API Version: 3.0.0-alpha1)

fix: Also apply defaults filter when changing an existing column's type
fix: Special case default field values must not be quoted if they are 
expressions
feat: Optionally supply sqlType to addColumnOptions
fix: #15172 Add a filter to support column defaults on mysql >= 8.0.13 
for TEXT, BLOB and JSON format

  M .horde.yml
  M composer.json
  M doc/changelog.yml

https://github.com/horde/Db/commit/9b12019057d6b5dd3b9a488598256e554e77a136
05/29/2025 09:10:14 AM Ralf Lang Comment #3 Reply to this comment
Confirmed.
I don't have this in mariadb.
There's a workaround in mysql 8.0.13 and later by using an 
expression rather than a literal as default for text and blob field. 
We will build a patch based on this.
Preliminary patch at library level

commit c2d525d02cb0a7c2f087e0c86f9728caf3e44816 (HEAD -> 
FRAMEWORK_6_0, origin/HEAD, origin/FRAMEWORK_6_0)
Author: Ralf Lang <ralf.lang@ralf-lang.de>
Date:   Thu May 29 11:08:19 2025 +0200

     fix: #15172 Add a filter to support column defaults on mysql >= 
8.0.13 for TEXT, BLOB and JSON format

Will test if this is sufficient for nag and kronolith on this version of mysql
05/29/2025 08:36:07 AM Ralf Lang Comment #2
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Assigned to Ralf Lang
Reply to this comment
Confirmed.
I don't have this in mariadb.
There's a workaround in mysql 8.0.13 and later by using an expression 
rather than a literal as default for text and blob field. We will 
build a patch based on this.
09/26/2024 07:16:14 AM mrch (at) mailbox (dot) org Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ mysql V 8.0.36: SQL QUERY FAILED: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB, TEXT, GEOMETRY or JSON column 'other_attributes' can't have a default value
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Fresh install according to:
https://wiki.horde.org/Doc/Dev/H6/Installation/InstallBase?referrer=Doc%2FDev%2FH6%2FInstallation

The execution of
http://192.168.122.5/horde/admin/config/?app=kronolith&action=schema
throws the above error.

The schema remains without update.

IMHO the problem seems to be located in
/var/www/html/horde/vendor/horde/kronolith/migration/28_kronolith_icalendar_storage.php
line 46.

IMHO related to:
https://www.percona.com/blog/cant-we-assign-a-default-value-to-the-blob-text-geometry-and-json-data-types/

Saved Queries