Ticket #2115 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

MySQL 5 incompatibility caused by TEXT NOT NULL columns without default value

Reported by: jan Owned by: anonymous
Priority: high Milestone:
Component: General Version: 2.0
Severity: blocker Keywords: mysql default null strict
Cc:

Description

Hi there, I'm using Mysql 5.0.15 at home and noticed that WP 2.0 uses tables with columns of the type TEXT NOT NULL yet with no default value. This results in a bunch of queries failing. This problem can be solved by giving the columns empty default values.

This seems to have been mentioned before:  http://wordpress.org/support/topic/51300#post-281554

There's also a ticket exsisting that mentions this problem that hasn't been adressed since Nov 2nd:  http://trac.wordpress.org/ticket/1808

Most providers are still running Mysql 4, but I guess you don't want to be caught with your pants down when they switch to 5.0 and thousands of blogs stop working.

Change History

comment:1   jan6 years ago

Related tickets:  http://trac.wordpress.org/ticket/1953

In  http://trac.wordpress.org/changeset/3281 Ryan is right: text-fields cannot have default values according to the MySQL-Manual. This gets stranger and stranger: After I manually did a alter table wp_posts modify pinged text not null default ''; I neither received a warning nor did the new default value show up in SHOW CREATE TABLE. This looks like an inconsistency in MySQL. The problem however persists: WP2.0RC3 doesn't run on a vanilla Mysql 5 installation.

  • Severity changed from critical to blocker
  • Milestone set to 2.0

comment:3   Jan6 years ago

I've posted some more info in this support-thread:

 http://wordpress.org/support/topic/52753

comment:4   ryan6 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [3353]) Make wp_insert_attachment() MySQL 5 strict mode compliant. fixes #2115

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.