[wp-trac] [WordPress Trac] #41956: Errno in $wpdb

WordPress Trac noreply at wordpress.org
Tue Apr 10 18:54:09 UTC 2018


#41956: Errno in $wpdb
--------------------------------------+------------------------------
 Reporter:  LeonN1960                 |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Database                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by birgire):

 * keywords:  has-patch needs-refresh => has-patch has-unit-tests


Comment:

 [attachment:41956.5.diff] refreshes the patch, adjusts according to code
 standard and adds the tests:

 - {{{test_get_err_no_should_return_zero_when_no_errors()}}}
 - {{{test_get_err_no_should_return_error_code_from_last_error()}}}
 - {{{test_get_err_msg_should_return_empty_string_when_no_errors()}}}
 - {{{test_get_err_msg_should_return_message_from_last_error()}}}
 - {{{test_get_last_error_should_return_false_without_errors()}}}
 -
 {{{test_get_last_error_should_return_error_code_and_msg_from_last_error()}}}

 Here I generated and used specific error codes/messages that seems to be
 shared between MySQL and MariaDB:

 https://mariadb.com/kb/en/library/mariadb-error-codes/#shared-
 mariadbmysql-error-codes

 We can also adjust the tests if that's not the case.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41956#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list