version 1.1.1.1, 2012/02/21 23:47:58
|
version 1.1.1.2, 2012/05/29 12:34:41
|
Line 535 PHP_FUNCTION(mysqli_change_user)
|
Line 535 PHP_FUNCTION(mysqli_change_user)
|
old_charset = mysql->mysql->charset; |
old_charset = mysql->mysql->charset; |
#endif |
#endif |
|
|
|
#if defined(MYSQLI_USE_MYSQLND) |
|
rc = mysqlnd_change_user_ex(mysql->mysql, user, password, dbname, FALSE, (size_t) password_len); |
|
#else |
rc = mysql_change_user(mysql->mysql, user, password, dbname); |
rc = mysql_change_user(mysql->mysql, user, password, dbname); |
|
#endif |
MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); |
MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); |
|
|
if (rc) { |
if (rc) { |
Line 883 void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARA
|
Line 887 void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARA
|
*/ |
*/ |
/* Even if the string is of length zero there is one byte alloced so efree() in all cases */ |
/* Even if the string is of length zero there is one byte alloced so efree() in all cases */ |
if (Z_TYPE_P(stmt->result.vars[i]) == IS_STRING) { |
if (Z_TYPE_P(stmt->result.vars[i]) == IS_STRING) { |
efree(stmt->result.vars[i]->value.str.val); | STR_FREE(stmt->result.vars[i]->value.str.val); |
} |
} |
if (!stmt->result.is_null[i]) { |
if (!stmt->result.is_null[i]) { |
switch (stmt->result.buf[i].type) { |
switch (stmt->result.buf[i].type) { |
Line 1047 PHP_FUNCTION(mysqli_stmt_fetch)
|
Line 1051 PHP_FUNCTION(mysqli_stmt_fetch)
|
/* {{{ php_add_field_properties */ |
/* {{{ php_add_field_properties */ |
static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRMLS_DC) |
static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRMLS_DC) |
{ |
{ |
add_property_string(value, "name", (char *) (field->name ? field->name : ""), 1); | add_property_string(value, "name",(field->name ? field->name : ""), 1); |
add_property_string(value, "orgname", (char *) (field->org_name ? field->org_name : ""), 1); | add_property_string(value, "orgname",(field->org_name ? field->org_name : ""), 1); |
add_property_string(value, "table", (char *) (field->table ? field->table : ""), 1); | add_property_string(value, "table",(field->table ? field->table : ""), 1); |
add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1); | add_property_string(value, "orgtable",(field->org_table ? field->org_table : ""), 1); |
add_property_string(value, "def", (field->def ? field->def : ""), 1); | add_property_string(value, "def",(field->def ? field->def : ""), 1); |
add_property_string(value, "db", (field->db ? field->db : ""), 1); | add_property_string(value, "db",(field->db ? field->db : ""), 1); |
|
|
/* FIXME: manually set the catalog to "def" due to bug in |
/* FIXME: manually set the catalog to "def" due to bug in |
* libmysqlclient which does not initialize field->catalog |
* libmysqlclient which does not initialize field->catalog |
Line 1287 PHP_FUNCTION(mysqli_get_host_info)
|
Line 1291 PHP_FUNCTION(mysqli_get_host_info)
|
return; |
return; |
} |
} |
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); |
MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); |
| #if !defined(MYSQLI_USE_MYSQLND) |
RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); |
RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); |
|
#else |
|
RETURN_STRING((mysql->mysql->data->host_info) ? mysql->mysql->data->host_info : "", 1); |
|
#endif |
} |
} |
/* }}} */ |
/* }}} */ |
|
|
Line 1800 PHP_FUNCTION(mysqli_prepare)
|
Line 1807 PHP_FUNCTION(mysqli_prepare)
|
memcpy(last_error, stmt->stmt->last_error, MYSQL_ERRMSG_SIZE); |
memcpy(last_error, stmt->stmt->last_error, MYSQL_ERRMSG_SIZE); |
memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1); |
memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1); |
#else |
#else |
MYSQLND_ERROR_INFO error_info = mysql->mysql->error_info; | MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info; |
#endif |
#endif |
mysqli_stmt_close(stmt->stmt, FALSE); |
mysqli_stmt_close(stmt->stmt, FALSE); |
stmt->stmt = NULL; |
stmt->stmt = NULL; |
Line 1811 PHP_FUNCTION(mysqli_prepare)
|
Line 1818 PHP_FUNCTION(mysqli_prepare)
|
memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE); |
memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE); |
memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1); |
memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1); |
#else |
#else |
mysql->mysql->error_info = error_info; | *mysql->mysql->data->error_info = error_info; |
#endif |
#endif |
} |
} |
} |
} |