DB update issue

17 views
Skip to first unread message

Greg Childers

unread,
Feb 28, 2026, 4:22:08 AMFeb 28
to Boinc Projects
Hi,

I am updating NFS@Home to the latest server, but ran into this error when doing the upgrade:

Doing query:

alter table host add column misc text not null default''

PHP Fatal error:  Uncaught mysqli_sql_exception: BLOB, TEXT, GEOMETRY or JSON column 'misc' can't have a default value in /home/boincadm/projects/nfs/html/inc/db.inc:45

Stack trace:

#0 /home/boincadm/projects/nfs/html/inc/db.inc(45): mysqli_query()

#1 /home/boincadm/projects/nfs/html/ops/db_update.php(35): _mysql_query()

#2 /home/boincadm/projects/nfs/html/ops/db_update.php(1240): do_query()

#3 /home/boincadm/projects/nfs/html/ops/upgrade_db.php(66): update_11_23_2025()

#4 {main}

  thrown in /home/boincadm/projects/nfs/html/inc/db.inc on line 45


Fatal error: Uncaught mysqli_sql_exception: BLOB, TEXT, GEOMETRY or JSON column 'misc' can't have a default value in /home/boincadm/projects/nfs/html/inc/db.inc:45

Stack trace:

#0 /home/boincadm/projects/nfs/html/inc/db.inc(45): mysqli_query()

#1 /home/boincadm/projects/nfs/html/ops/db_update.php(35): _mysql_query()

#2 /home/boincadm/projects/nfs/html/ops/db_update.php(1240): do_query()

#3 /home/boincadm/projects/nfs/html/ops/upgrade_db.php(66): update_11_23_2025()

#4 {main}

  thrown in /home/boincadm/projects/nfs/html/inc/db.inc on line 45


Removing the default'' at the end of the sql seems to fix it.


Best,

Greg

David P. Anderson

unread,
Feb 28, 2026, 5:09:08 AMFeb 28
to Greg Childers, Boinc Projects
Hmm.  default '' works with my MariaDB 10.1.44.
Google says default ('') works with MySQL, but it doesn't work with MariaDB.

It's OK to not have a default, because hosts are only inserted from the C++ API,
which supplies values for all fields.
So I'll remove this from the DB update.

-- D

--
You received this message because you are subscribed to the Google Groups "boinc_projects" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boinc_project...@ssl.berkeley.edu.
To view this discussion visit https://groups.google.com/a/ssl.berkeley.edu/d/msgid/boinc_projects/CAPOvAR4_OjbQ_eid1kTL3eFc5KiwGC4gZxdE%3DY4PD1HiprdDdQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages