WordPress.org

Make WordPress Core

#20821 closed defect (bug) (invalid)

DB Restore

Reported by: Juggy69 Owned by: Stuart Giles
Milestone: Priority: normal
Severity: normal Version: 3.3.2
Component: General Keywords:
Focuses: Cc:

Description

Hi Not sure if this is a bug or not

I have been backing up a site daily for the last 4 months, due to a "corruption" i have tried to restore the DB but keep getting errors that "Null" can not be used

I have tried 2 separate hosts also just in case DB server was the issue, i am using MYPHPAdmin to restore the DB

I have also had to recreate the site from sratch and again have been backing up so again as a test i have tried to restore the DB to a new DB and again getting errors

Error

SQL query:

INSERT INTO wp_acplinks
VALUES (
"1", "http://codex.wordpress.org/", "Documentation", NULL , NULL , NULL , "Y", "1", '0', "0000-00-00 00:00:00", NULL , NULL , NULL
);

MySQL said: Documentation
#1048 - Column 'link_image' cannot be null

The main DB i started with is 13mb

the new DB is 2mb

Regards

Stuart

Change History (1)

comment:1 SergeyBiryukov23 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from critical to normal
  • Status changed from new to closed

Looks like there's something wrong with your DB backup tool. Those values shouldn't be NULL indeed.

The default value for those columns is an empty string:
http://core.trac.wordpress.org/browser/tags/3.3.2/wp-admin/includes/schema.php#L112

When I export wp_links table with phpMyAdmin, the query contains empty strings instead of NULL:

INSERT INTO `wp_links` VALUES
(1, 'http://codex.wordpress.org/', 'Documentation', '', '', '', 'Y', 1, 0, '0000-00-00 00:00:00', '', '', ''),

Since it's clearly a support issue, please try the support forums: http://wordpress.org/support/

Note: See TracTickets for help on using tickets.