[wp-trac] [WordPress Trac] #41335: dbDelta() does not recognize MySQL's IF NOT EXISTS statement

WordPress Trac noreply at wordpress.org
Sat Jul 15 12:24:53 UTC 2017


#41335: dbDelta() does not recognize MySQL's IF NOT EXISTS statement
-----------------------------+-----------------------------
 Reporter:  kmaxim           |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  4.8
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 When a new table is creating with {{{IF NOT EXISTS}}} MySQL statement in
 query then array {{{$cqueries}}}(creational queries) will have invalid
 table names as keys.

 The keys of the array use below in the function's code for fetch the table
 column structure in {{{DESCRIBE}}} statement.

 Example query: {{{CREATE TABLE wp_delta_table...}}}
 The extracted table name: wp_delta_table

 Example query: {{{CREATE TABLE IF NOT EXISTS wp_delta_table...}}}
 The extracted table name: IF

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41335>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list