Searched refs:sqlstate (Results 1 - 23 of 23) sorted by relevance

/PHP_TRUNK/ext/mysqli/
H A Dmysqli_exception.c39 void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC, char *format, ...) argument
50 php_error_docref(NULL TSRMLS_CC, E_WARNING, "(%s/%d): %s", sqlstate, errorno, message);
62 if (sqlstate) {
63 zend_update_property_string(mysqli_exception_class_entry, &sql_ex, "sqlstate", sizeof("sqlstate") - 1,
64 sqlstate TSRMLS_CC);
66 zend_update_property_string(mysqli_exception_class_entry, &sql_ex, "sqlstate", sizeof("sqlstate") - 1,
H A Dmysqli_priv.h77 extern void php_mysqli_report_error(const char *sqlstate, int errorno, const char *error TSRMLS_DC);
79 extern void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC, char *format, ...);
H A Dmysqli_prop.c202 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
212 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_sqlstate(mysql->mysql));
388 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
398 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate")
[all...]
H A Dmysqli_report.c30 extern void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC, char *format, ...);
49 /* {{{ void php_mysqli_report_error(char *sqlstate, int errorno, char *error) */
50 void php_mysqli_report_error(const char *sqlstate, int errorno, const char *error TSRMLS_DC) argument
52 php_mysqli_throw_sql_exception((char *)sqlstate, errorno TSRMLS_CC, "%s", error);
H A Dphp_mysqli_structs.h159 zval sqlstate; member in struct:st_mysqli_warning
H A Dmysqli_warning.c46 zval_dtor(&(w->sqlstate));
64 ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, Zzend_string_dupLICATE);
113 ZVAL_UTF8_STRINGL(&(w->sqlstate), "HY000", sizeof("HY000") - 1, Zzend_string_dupLICATE);
231 ZVAL_COPY(retval, &w->sqlstate);
327 {"sqlstate", sizeof("sqlstate") - 1, mysqli_warning_sqlstate, NULL},
H A Dmysqli_nonapi.c432 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
442 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_sqlstate(mysql->mysql));
473 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, message->sqlstate);
483 add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate")
[all...]
H A Dmysqli_api.c1862 char sqlstate[SQLSTATE_LENGTH+1]; local
1867 memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1);
1878 memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1);
/PHP_TRUNK/ext/mysqlnd/
H A Dmysqlnd_auth.c133 if (auth_resp_packet->sqlstate[0]) {
134 strlcpy(conn->error_info->sqlstate, auth_resp_packet->sqlstate, sizeof(conn->error_info->sqlstate));
135 DBG_ERR_FMT("ERROR:%u [SQLSTATE:%s] %s", auth_resp_packet->error_no, auth_resp_packet->sqlstate, auth_resp_packet->error);
H A Dmysqlnd_priv.h110 strlcpy((error_info).sqlstate, "00000", sizeof((error_info).sqlstate)); \
123 strlcpy((error_info).sqlstate, (b), sizeof((error_info).sqlstate)); \
129 strlcpy(error_for_the_list.sqlstate, (b), sizeof(error_for_the_list.sqlstate)); \
142 SET_CLIENT_ERROR((error_info_to), (error_info_from).error_no, (error_info_from).sqlstate, (error_info_from).error); \
H A Dmysqlnd_ps.c1763 /* {{{ mysqlnd_stmt::sqlstate */
1765 MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const s TSRMLS_DC)
1768 return stmt && stmt->error_info->sqlstate[0] ? stmt->error_info->sqlstate:MYSQLND_SQLSTATE_NULL;
2337 MYSQLND_METHOD(mysqlnd_stmt, sqlstate),
H A Dmysqlnd_wireprotocol.c236 unsigned int *error_no, char *sqlstate TSRMLS_DC)
244 memcpy(sqlstate, unknown_sqlstate, MYSQLND_SQLSTATE_LENGTH);
250 sqlstate is following. No need to check for buf_left_len as we checked > 2 above,
256 memcpy(sqlstate, p, MYSQLND_SQLSTATE_LENGTH);
268 sqlstate[MYSQLND_SQLSTATE_LENGTH] = '\0';
352 &packet->error_no, packet->sqlstate
355 The server doesn't send sqlstate in the greet packet.
360 memcpy(packet->sqlstate, "08004", MYSQLND_SQLSTATE_LENGTH);
712 &packet->error_no, packet->sqlstate
867 &packet->error_no, packet->sqlstate
[all...]
H A Dmysqlnd_wireprotocol.h84 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_packet_greet
121 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_packet_auth_response
151 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_packet_ok
173 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_packet_eof
H A Dmysqlnd.c240 SET_CLIENT_ERROR(*conn->error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error);
286 SET_CLIENT_ERROR(*conn->error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error);
805 SET_CLIENT_ERROR(*conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error);
1581 /* {{{ mysqlnd_conn_data::sqlstate */
1583 MYSQLND_METHOD(mysqlnd_conn_data, sqlstate)(const MYSQLND_CONN_DATA * const conn TSRMLS_DC)
1585 return conn->error_info->sqlstate[0] ? conn->error_info->sqlstate:MYSQLND_SQLSTATE_NULL;
3002 MYSQLND_METHOD(mysqlnd_conn_data, sqlstate),
H A Dmysqlnd_structs.h113 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_error_info
122 char sqlstate[MYSQLND_SQLSTATE_LENGTH + 1]; member in struct:st_mysqlnd_error_list_element
/PHP_TRUNK/ext/pdo/
H A Dphp_pdo_driver.h685 const char *sqlstate, const char *supp TSRMLS_DC);
H A Dpdo_dbh.c41 void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate, const char *supp TSRMLS_DC) /* {{{ */ argument
60 strncpy(*pdo_err, sqlstate, 6);
62 /* hash sqlstate to error messages */
118 /* hash sqlstate to error messages */
/PHP_TRUNK/ext/pdo_pgsql/
H A Dpgsql_statement.c176 char *sqlstate = pdo_pgsql_sqlstate(S->result); local
183 if (sqlstate && !strcmp(sqlstate, "42P05")) {
193 pdo_pgsql_error_stmt(stmt, status, sqlstate);
H A Dphp_pdo_pgsql_int.h82 extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line TSRMLS_DC);
H A Dpgsql_driver.c65 int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line TSRMLS_DC) /* {{{ */ argument
81 if (sqlstate == NULL || strlen(sqlstate) >= sizeof(pdo_error_type)) {
85 strcpy(*pdo_err, sqlstate);
/PHP_TRUNK/ext/pdo_dblib/
H A Ddblib_driver.c104 S->err.sqlstate = stmt->error_code;
331 H->err.sqlstate = dbh->error_code;
429 DBLIB_G(err).sqlstate,
H A Dpdo_dblib.c130 strcpy(einfo->sqlstate, state);
160 dblib_globals->err.sqlstate = dblib_globals->sqlstate;
H A Dphp_pdo_dblib_int.h107 char *sqlstate; member in struct:__anon1
131 char sqlstate[6]; variable

Completed in 41 milliseconds