summaryrefslogtreecommitdiff
path: root/sql/sql_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_error.h')
-rw-r--r--sql/sql_error.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_error.h b/sql/sql_error.h
index 6b0d4d7749c..113b51454c6 100644
--- a/sql/sql_error.h
+++ b/sql/sql_error.h
@@ -396,7 +396,7 @@ private:
*/
Sql_condition()
:m_mem_root(NULL)
- { }
+ { error_index= 0; }
/**
Complete the Sql_condition initialisation.
@@ -419,6 +419,7 @@ private:
:m_mem_root(mem_root)
{
DBUG_ASSERT(mem_root != NULL);
+ error_index= 0;
}
Sql_condition(MEM_ROOT *mem_root, const Sql_user_condition_identity &ucid)
@@ -426,6 +427,7 @@ private:
m_mem_root(mem_root)
{
DBUG_ASSERT(mem_root != NULL);
+ error_index= 0;
}
/**
Constructor for a fixed message text.
@@ -436,7 +438,8 @@ private:
*/
Sql_condition(MEM_ROOT *mem_root,
const Sql_condition_identity &value,
- const char *msg)
+ const char *msg,
+ ulonglong current_error_index)
:Sql_condition_identity(value),
m_mem_root(mem_root)
{
@@ -444,6 +447,7 @@ private:
DBUG_ASSERT(value.get_sql_errno() != 0);
DBUG_ASSERT(msg != NULL);
set_builtin_message_text(msg);
+ error_index= current_error_index;
}
/** Destructor. */
@@ -497,6 +501,9 @@ private:
/** Memory root to use to hold condition item values. */
MEM_ROOT *m_mem_root;
+
+ /* Index of error for INSERT/REPLACE statement. */
+ ulonglong error_index;
};
///////////////////////////////////////////////////////////////////////////