|
|
|
|
@ -2048,38 +2048,6 @@ void PgSQL_Connection::reset() {
|
|
|
|
|
auto_increment_delay_token = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
void PgSQL_Connection::update_warning_count_from_connection() {
|
|
|
|
|
// if a prepared statement was cached while 'mysql_thread_query_digest' was true, and subsequently,
|
|
|
|
|
// 'mysql_thread_query_digest' is set to false, fetching that statement from the cache may still contain the digest text.
|
|
|
|
|
// To prevent this, we will check the digest text in conjunction with 'mysql_thread_query_digest' to verify whether it
|
|
|
|
|
// is enabled or disabled.
|
|
|
|
|
if (myds && myds->sess && myds->sess->CurrentQuery.QueryParserArgs.digest_text) {
|
|
|
|
|
const char* dig_text = myds->sess->CurrentQuery.QueryParserArgs.digest_text;
|
|
|
|
|
const size_t dig_len = strlen(dig_text);
|
|
|
|
|
// SHOW WARNINGS doesn't have any impact warning count,
|
|
|
|
|
// so we are replication same behaviour here
|
|
|
|
|
if (parent->myhgc->handle_warnings_enabled() &&
|
|
|
|
|
(dig_len != 13 || strncasecmp(dig_text, "SHOW WARNINGS", 13) != 0)) {
|
|
|
|
|
warning_count = mysql_warning_count(pgsql);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PgSQL_Connection::update_warning_count_from_statement() {
|
|
|
|
|
// if a prepared statement was cached while 'mysql_thread_query_digest' was true, and subsequently,
|
|
|
|
|
// 'mysql_thread_query_digest' is set to false, fetching that statement from the cache may still contain the digest text.
|
|
|
|
|
// To prevent this, we will check the digest text in conjunction with 'mysql_thread_query_digest' to verify whether it
|
|
|
|
|
// is enabled or disabled.
|
|
|
|
|
if (myds && myds->sess && myds->sess->CurrentQuery.stmt_info && myds->sess->CurrentQuery.stmt_info->digest_text &&
|
|
|
|
|
pgsql_thread___query_digests == true) {
|
|
|
|
|
if (parent->myhgc->handle_warnings_enabled()) {
|
|
|
|
|
warning_count = mysql_stmt_warning_count(query.stmt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void PgSQL_Connection::set_status(bool set, uint32_t status_flag) {
|
|
|
|
|
if (set) {
|
|
|
|
|
this->status_flags |= status_flag;
|
|
|
|
|
@ -2100,7 +2068,7 @@ bool PgSQL_Connection::MultiplexDisabled(bool check_delay_token) {
|
|
|
|
|
if (status_flags & (STATUS_MYSQL_CONNECTION_USER_VARIABLE | STATUS_MYSQL_CONNECTION_PREPARED_STATEMENT |
|
|
|
|
|
STATUS_MYSQL_CONNECTION_LOCK_TABLES | STATUS_MYSQL_CONNECTION_TEMPORARY_TABLE | STATUS_MYSQL_CONNECTION_GET_LOCK | STATUS_MYSQL_CONNECTION_NO_MULTIPLEX |
|
|
|
|
|
STATUS_MYSQL_CONNECTION_SQL_LOG_BIN0 | STATUS_MYSQL_CONNECTION_FOUND_ROWS | STATUS_MYSQL_CONNECTION_NO_MULTIPLEX_HG |
|
|
|
|
|
STATUS_MYSQL_CONNECTION_HAS_SAVEPOINT | STATUS_MYSQL_CONNECTION_HAS_WARNINGS)) {
|
|
|
|
|
STATUS_MYSQL_CONNECTION_HAS_SAVEPOINT /*| STATUS_MYSQL_CONNECTION_HAS_WARNINGS*/ )) {
|
|
|
|
|
ret = true;
|
|
|
|
|
}
|
|
|
|
|
if (check_delay_token && auto_increment_delay_token) return true;
|
|
|
|
|
|