mariadb/myisammrg
Sergey Vojtovich 97bd763544 BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error
stating that the merge table is incorrectly defined. This
happens if MERGE child tables were accessed before and we
failed to open another incorrectly defined MERGE table in
this connection.

myrg_open() internally used my_errno as a variable for determining
failure, and thus could be tricked into a wrong decision by other
uses of my_errno.

With this fix we use function local boolean flag instead of my_errno
to determine failure.

myisammrg/myrg_open.c:
  There are two requirement for accessing/setting my_errno variable,
  which were not followed by myrg_open():
  - it must be checked immediately after a function returned an error. There
    must be no calls to other functions that may change it's value between.
  - my_errno value must be set right before a function is going to return an
    error. There must be no calls to other functions that may change it's
    value between (that's why we have these tricks with save_errno at the
    bottom of myrg_open()).
  
  myrg_open() internally used my_errno as a variable for determining
  failure, and thus could be tricked into a wrong decision by other
  uses of my_errno.
mysql-test/r/merge.result:
  A test case for BUG#32047.
mysql-test/t/merge.test:
  A test case for BUG#32047.
2009-02-04 15:46:23 +04:00
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
make-ccc Import changeset 2000-07-31 21:29:14 +02:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_close.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_create.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_def.h BUG#26976 - Missing table in merge not noted in related error msg + 2007-06-06 04:42:41 +05:00
myrg_delete.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_extra.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_info.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_locking.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_open.c BUG#32047 - 'Spurious' errors while opening MERGE tables 2009-02-04 15:46:23 +04:00
myrg_panic.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_queue.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_range.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rfirst.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rkey.c fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
myrg_rlast.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rnext.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rnext_same.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rprev.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rrnd.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_rsame.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_static.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_update.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
myrg_write.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00