dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Error when installing wordpress

Open guilhem opened this issue 5 years ago • 7 comments

Wordpress installation fail with error (on bolt side) :

CREATE TABLE wp_term_taxonomy (
 term_taxonomy_id bigint(20) unsigned NOT NULL auto_increment,
 term_id bigint(20) unsigned NOT NULL default 0,
 taxonomy varchar(32) NOT NULL default '',
 description longtext NOT NULL,
 parent bigint(20) unsigned NOT NULL default 0,
 count bigint(20) NOT NULL default 0,
 PRIMARY KEY  (term_taxonomy_id),
 UNIQUE KEY term_id_taxonomy (term_id,taxonomy),
 KEY taxonomy (taxonomy)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci': syntax error at position 274 near 'count'

Running wordpress fail with:

WordPress database error syntax error at position 38 near 'wp_posts' for query SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER BY wp_posts.post_date DESC LIMIT 0, 10 made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
WordPress database error unsupported syntax: insert ignore into wp_options(option_name, option_value, autoload) values ('auto_updater.lock', '1615303328', 'no') for query INSERT IGNORE INTO `wp_options` ( `option_name`, `option_value`, `autoload` ) VALUES ('auto_updater.lock', '1615303328', 'no') /* LOCK */ made by do_action_ref_array('wp_version_check'), WP_Hook->do_action, WP_Hook->apply_filters, wp_version_check, do_action('wp_maybe_auto_update'), WP_Hook->do_action, WP_Hook->apply_filters, wp_maybe_auto_update, WP_Automatic_Updater->run, WP_Upgrader::create_lock

guilhem avatar Mar 09 '21 15:03 guilhem

@guilhem it seems that WordPress is using some SQL features that we do not yet support. I emphasize this quite normal, every time we connect a new tool stuff like this comes up. I have assigned this to a member of our SQL team.

We will follow up with details/estimates.

oscarbatori avatar Mar 09 '21 16:03 oscarbatori

MySQL's parser is more lenient than ours when it comes to using reserved words (count) as column names. We're working on fixing this now and should have something soon.

The SQL_CALC_FOUND_ROWS syntax is not yet supported. Considering WordPress uses it we can prioritize a fix. But it's a little more involved, and will take a little longer to address. We're adding it to our list of integration use cases. We'll give an update on ETA later this week.

zachmu avatar Mar 09 '21 17:03 zachmu

hello @zachmu any update regarding ETA?

laurentvergnaud avatar Mar 22 '21 12:03 laurentvergnaud

This is now fixed in source, but hasn't made it into a release yet. We'll get a release with this out today.

zachmu avatar Apr 02 '21 18:04 zachmu

The create table statement in https://github.com/dolthub/dolt/issues/1417#issue-826110870 works as well now.

zachmu avatar Apr 02 '21 18:04 zachmu

SQL_CALC_FOUND_ROWS works in the latest release. Please let us know what other issues you find using dolt with wordpress!

zachmu avatar Apr 07 '21 23:04 zachmu

Thank you @zachmu, will definitely do!

laurentvergnaud avatar Apr 08 '21 07:04 laurentvergnaud