Support for unbuffered queries - PMA_DBI_QUERY_UNBUFFERED and fix support of PMA_DBI_QUERY_STORE.
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
/**
|
/**
|
||||||
* Common Option Constants For DBI Functions
|
* Common Option Constants For DBI Functions
|
||||||
*/
|
*/
|
||||||
define('PMA_DBI_QUERY_STORE', 1); // Force STORE_RESULT method, ignored by classic MySQL.
|
define('PMA_DBI_QUERY_STORE', 1); // Force STORE_RESULT method, ignored by classic MySQL.
|
||||||
|
define('PMA_DBI_QUERY_UNBUFFERED', 2); // Do not read whole query
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Including The DBI Plugin
|
* Including The DBI Plugin
|
||||||
|
@@ -119,7 +119,13 @@ function PMA_DBI_try_query($query, $link = NULL, $options = 0) {
|
|||||||
if (PMA_MYSQL_INT_VERSION < 40100) {
|
if (PMA_MYSQL_INT_VERSION < 40100) {
|
||||||
$query = PMA_convert_charset($query);
|
$query = PMA_convert_charset($query);
|
||||||
}
|
}
|
||||||
return mysql_query($query, $link);
|
if ($options == ($options | PMA_DBI_QUERY_STORE)) {
|
||||||
|
return mysql_query($query, $link);
|
||||||
|
} elseif ($options == ($options | PMA_DBI_QUERY_UNBUFFERED)) {
|
||||||
|
return mysql_unbuffered_query($query, $link);
|
||||||
|
} else {
|
||||||
|
return mysql_query($query, $link);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following function is meant for internal use only.
|
// The following function is meant for internal use only.
|
||||||
|
@@ -92,8 +92,10 @@ function PMA_DBI_select_db($dbname, $link = NULL) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function PMA_DBI_try_query($query, $link = NULL, $options = 0) {
|
function PMA_DBI_try_query($query, $link = NULL, $options = 0) {
|
||||||
if ($options == $options | PMA_DBI_QUERY_STORE) {
|
if ($options == ($options | PMA_DBI_QUERY_STORE)) {
|
||||||
$method = MYSQLI_STORE_RESULT;
|
$method = MYSQLI_STORE_RESULT;
|
||||||
|
} elseif ($options == ($options | PMA_DBI_QUERY_UNBUFFERED)) {
|
||||||
|
$method = MYSQLI_USE_RESULT;
|
||||||
} else {
|
} else {
|
||||||
$method = MYSQLI_USE_RESULT;
|
$method = MYSQLI_USE_RESULT;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user