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);
}
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.