Commit 98f3fd64 authored by Olivier Bertrand's avatar Olivier Bertrand

- Issue a warning instead of an error when inserting in release built a value

  concerning a nullable column wrongly created as indexed (MDEV-4494)

modified:
  storage/connect/ha_connect.cc
parent 46671250
......@@ -2940,14 +2940,14 @@ int ha_connect::external_lock(THD *thd, int lock_type)
if (CloseTable(g)) {
// This is an error while builing index
#if defined(_DEBUG)
// Make it a warning to avoid crash
//#if defined(_DEBUG)
// Make it a warning to avoid crash on debug
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, g->Message);
rc= 0;
#else // !_DEBUG
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
rc= HA_ERR_INTERNAL_ERROR;
#endif // !DEBUG
//#else // !_DEBUG
// my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
// rc= HA_ERR_INTERNAL_ERROR;
//#endif // !DEBUG
} // endif Close
DBUG_RETURN(rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment