1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed the problem of mdev-5970:

back-ported the patch for bug #13256831 from mysql-5.6 code line.

  Here's the comment this patch was provided with:

  Fixed bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD.

  This bug only occurs if a user tries to update a base table using
  an updatable view and this view was created as a join for which
  the clause 'WITH CHECK OPTION' was specified.

  The reason for the bug was that when such an update was
  executed, row positions were not properly handled for tables
  that were not updated but had constraints that had to be
  checked due to the 'WITH CHECK OPTION' clause.

  The reason for the bug was that when such update is executed
  then for tables specified in the view definition and
  also listed in the 'WITH CHECK OPTION' clause the positioning to
  row being updated is not performed.
This commit is contained in:
Igor Babaev
2014-04-17 12:53:53 -07:00
parent bd44c086b3
commit 12eb6d88f7
3 changed files with 55 additions and 0 deletions

View File

@ -1917,6 +1917,13 @@ loop_end:
TABLE *tbl= table;
do
{
/*
Signal each table (including tables referenced by WITH CHECK OPTION
clause) for which we will store row position in the temporary table
that we need a position to be read first.
*/
tbl->prepare_for_position();
Field_string *field= new Field_string(tbl->file->ref_length, 0,
tbl->alias.c_ptr(),
&my_charset_bin);