YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
/* Disable the unneeded read-only mode of the original DA. */
save_stmt_da->set_warning_info_read_only(false);
/* Set new diagnostics area, execute statement and restore. */
thd->set_stmt_da(&new_stmt_da);
rv= m_info->aggregate(thd, save_stmt_da);
thd->set_stmt_da(save_stmt_da);
/* Bail out early if statement succeeded. */ if (! rv)
{
thd->get_stmt_da()->set_ok_status(0, 0, NULL);
DBUG_RETURN(false);
}
/* Statement failed, retrieve the error information for propagation. */
uint sql_errno= new_stmt_da.sql_errno(); constchar *message= new_stmt_da.message(); constchar *sqlstate= new_stmt_da.get_sqlstate();
/* In case of a fatal error, set it into the original DA.*/ if (unlikely(thd->is_fatal_error))
{
save_stmt_da->set_error_status(sql_errno, message, sqlstate, NULL);
DBUG_RETURN(true);
}
/* Otherwise, just append the new error as a exception condition. */
save_stmt_da->push_warning(thd, sql_errno, sqlstate,
Sql_condition::WARN_LEVEL_ERROR,
message);
/* Appending might have failed. */ if (unlikely(!(rv= thd->is_error())))
thd->get_stmt_da()->set_ok_status(0, 0, NULL);
/* Advance to the requested condition. */ while (cond_number--)
cond= it_conds++;
DBUG_ASSERT(cond);
/* Evaluate the requested information in the context of the condition. */ while ((cond_info_item= it_items++))
{ if ((rv= evaluate(thd, cond_info_item, cond))) break;
}
Item *
Condition_information_item::make_utf8_string_item(THD *thd, const String *str)
{ /* Default is utf8 character set and utf8mb3_general_ci collation. */
CHARSET_INFO *to_cs= &my_charset_utf8mb3_general_ci; /* If a charset was not set, assume that no conversion is needed. */
CHARSET_INFO *from_cs= str->charset() ? str->charset() : to_cs;
String tmp(str->ptr(), str->length(), from_cs); /* If necessary, convert the string (ignoring errors), then copy it over. */
uint conv_errors; returnnew (thd->mem_root) Item_string(thd, &tmp, to_cs, &conv_errors,
DERIVATION_COERCIBLE, MY_REPERTOIRE_UNICODE30);
}
switch (m_name)
{ case CLASS_ORIGIN:
value= make_utf8_string_item(thd, &(cond->m_class_origin)); break; case SUBCLASS_ORIGIN:
value= make_utf8_string_item(thd, &(cond->m_subclass_origin)); break; case CONSTRAINT_CATALOG:
value= make_utf8_string_item(thd, &(cond->m_constraint_catalog)); break; case CONSTRAINT_SCHEMA:
value= make_utf8_string_item(thd, &(cond->m_constraint_schema)); break; case CONSTRAINT_NAME:
value= make_utf8_string_item(thd, &(cond->m_constraint_name)); break; case CATALOG_NAME:
value= make_utf8_string_item(thd, &(cond->m_catalog_name)); break; case SCHEMA_NAME:
value= make_utf8_string_item(thd, &(cond->m_schema_name)); break; case TABLE_NAME:
value= make_utf8_string_item(thd, &(cond->m_table_name)); break; case COLUMN_NAME:
value= make_utf8_string_item(thd, &(cond->m_column_name)); break; case CURSOR_NAME:
value= make_utf8_string_item(thd, &(cond->m_cursor_name)); break; case MESSAGE_TEXT:
value= make_utf8_string_item(thd, &(cond->m_message_text)); break; case MYSQL_ERRNO:
value= new (thd->mem_root) Item_uint(thd, cond->m_sql_errno); break; case RETURNED_SQLSTATE:
str.set_ascii(cond->get_sqlstate(), strlen(cond->get_sqlstate()));
value= make_utf8_string_item(thd, &str); break; case ROW_NUMBER:
value= new (thd->mem_root) Item_uint(thd, cond->m_row_number);
}
DBUG_RETURN(value);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.41Bemerkung:
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.