Opened 8 years ago
Closed 7 years ago
#34611 closed defect (bug) (invalid)
WordPress database error
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.4 |
Component: | Database | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '( meta_id bigint(20) unsigned NOT NULL auto_increment, term_id bigint(20) un' at line 1]
CREATE TABLE ( meta_id bigint(20) unsigned NOT NULL auto_increment, term_id bigint(20) unsigned NOT NULL default '0', meta_key varchar(255) default NULL, meta_value longtext, PRIMARY KEY (meta_id), KEY term_id (term_id), KEY meta_key (meta_key(191)) ) DEFAULT CHARACTER SET utf8
Change History (5)
#2
@
8 years ago
@dd32 Is there precedent for shimming support for new tables into database dropins? For example, what if someplace like wp_set_wpdb_vars()
, we did something like:
if ( ! in_array( 'termmeta', $wpdb->tables ) ) { $wpdb->tables[] = 'termmeta'; }
#3
@
8 years ago
Database dropins are supposed to extend wpdb
so that they inherit this stuff, it kind of surprised me to see $wpdb->field_types
in wp_set_wpdb_vars()
.
We've had issues in the past with db dropins and updated versions relying upon new methods/etc, and the answer then was "extend wpdb!", so I'd rather not do anything here until we're sure of why it's been hit.
Hi @wpdeveloper and welcome to Trac!
Where did you see this error? During install? Upgrade?
Are you running any Database dropins? (wp-content/db.php)