[wp-trac] [WordPress Trac] #13715: dbDelta produces warnings

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 3 20:54:07 UTC 2010


#13715: dbDelta produces warnings
-----------------------------+----------------------------------------------
 Reporter:  mitchoyoshitaka  |       Owner:  ryan      
     Type:  defect (bug)     |      Status:  new       
 Priority:  normal           |   Milestone:  Unassigned
Component:  Database         |     Version:  3.0       
 Severity:  normal           |    Keywords:  has-patch 
-----------------------------+----------------------------------------------
Changes (by mitchoyoshitaka):

  * keywords:  has-patch reporter-feedback => has-patch


Comment:

 Replying to [comment:2 nacin]:
 > What's the table statement?
 Here's my code:


 {{{
                 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );

                 $dbSql = array(
                                                 "CREATE TABLE
 `{$this->db_prefix}visitors` (
                                                         `visitor_id` INT
 UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
                                                         `cookie`
 BINARY(16) NOT NULL UNIQUE KEY ,
                                                         `timestamp`
 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
                                                 ) ENGINE = MYISAM ;");
                 dbDelta( $dbSql );
 }}}

 where of course $this->db_prefix actually resolved to something involving
 $wpdb->prefix. I'm using an array because there actually are multiple, but
 I can reproduce this even with that first query.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13715#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list