mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge branch 'mysql/5.5' into 5.5
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2013, Monty Program Ab.
|
||||
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2016, MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -5463,3 +5463,28 @@ fl_create_iterator(enum handler_iterator_type type,
|
||||
}
|
||||
}
|
||||
#endif /*TRANS_LOG_MGM_EXAMPLE_CODE*/
|
||||
|
||||
|
||||
/**
|
||||
Report a warning for FK constraint violation.
|
||||
|
||||
@param thd Thread handle.
|
||||
@param table table on which the operation is performed.
|
||||
@param error handler error number.
|
||||
*/
|
||||
void warn_fk_constraint_violation(THD *thd,TABLE *table, int error)
|
||||
{
|
||||
String str;
|
||||
switch(error) {
|
||||
case HA_ERR_ROW_IS_REFERENCED:
|
||||
table->file->get_error_message(error, &str);
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_ROW_IS_REFERENCED_2, str.c_ptr_safe());
|
||||
break;
|
||||
case HA_ERR_NO_REFERENCED_ROW:
|
||||
table->file->get_error_message(error, &str);
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_NO_REFERENCED_ROW_2, str.c_ptr_safe());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user