summaryrefslogtreecommitdiff
path: root/ext/mysql
diff options
context:
space:
mode:
authorSean Finney <seanius@debian.org>2009-06-24 22:49:04 +0200
committerSean Finney <seanius@debian.org>2009-06-24 22:49:04 +0200
commit84f4ca9b07fe5b73d840258f4aa7c1eb534c4253 (patch)
tree9829bd578af8a4a8b42b04277f9067e00dc5ad90 /ext/mysql
parent6821b67124604da690c5e9276d5370d679c63ac8 (diff)
downloadphp-84f4ca9b07fe5b73d840258f4aa7c1eb534c4253.tar.gz
Imported Upstream version 5.3.0~RC4upstream/5.3.0_RC4upstream/5.3.0.RC4
Diffstat (limited to 'ext/mysql')
-rw-r--r--ext/mysql/php_mysql.c8
-rw-r--r--ext/mysql/tests/mysql_db_query.phpt6
2 files changed, 6 insertions, 8 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 7b5c29873..64fe0eaa6 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.35 2009/02/18 16:34:47 johannes Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.37 2009/05/20 08:30:12 kalle Exp $ */
/* TODO:
*
@@ -1166,7 +1166,7 @@ PHP_FUNCTION(mysql_thread_id)
}
ZEND_FETCH_RESOURCE2(mysql, php_mysql_conn *, &mysql_link, id, "MySQL-Link", le_link, le_plink);
- RETURN_LONG(mysql_thread_id(mysql->conn));
+ RETURN_LONG((long) mysql_thread_id(mysql->conn));
}
/* }}} */
@@ -1472,9 +1472,7 @@ PHP_FUNCTION(mysql_db_query)
CHECK_LINK(id);
}
- if (MySG(trace_mode) || !strcasecmp(get_active_function_name(TSRMLS_C), "mysql")) {
- php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use mysql_query() instead.");
- }
+ php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "This function is deprecated; use mysql_query() instead");
php_mysql_do_query_general(query, query_len, mysql_link, id, db, MYSQL_STORE_RESULT, return_value TSRMLS_CC);
}
diff --git a/ext/mysql/tests/mysql_db_query.phpt b/ext/mysql/tests/mysql_db_query.phpt
index be7f87ac2..8adf48171 100644
--- a/ext/mysql/tests/mysql_db_query.phpt
+++ b/ext/mysql/tests/mysql_db_query.phpt
@@ -25,7 +25,7 @@ if (NULL !== ($tmp = @mysql_db_query($link)))
printf("[003] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
-if (!$res = mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1', $link))
+if (!$res = @mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1', $link))
printf("[004] [%d] %s\n", mysql_errno($link), mysql_error($link));
$row = mysql_fetch_assoc($res);
@@ -40,7 +40,7 @@ if (ini_get('unicode.semantics') && !is_unicode($row['label'])) {
mysql_free_result($res);
-if (!$res = mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1'))
+if (!$res = @mysql_db_query($db, 'SELECT id, label FROM test ORDER BY id LIMIT 1'))
printf("[007] [%d] %s\n", mysql_errno(), mysql_error());
$row = mysql_fetch_assoc($res);
@@ -58,4 +58,4 @@ mysql_close($link);
print "done!\n";
?>
--EXPECTF--
-done! \ No newline at end of file
+done!