MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Gleb Shchepa 56b9586fd1 Bug #40021: Renaming view fails, archived .frm for view is
missing after downgrade

Obsolete arc/ directory and view .frm file backup support
has been removed by the patch for bug 17823. However, that
bugfix caused a problem with "live downgrades" of the
server: if we rename some view 4 times under 5.1.29/5.0.72
and then try to rename it under 5.1.28/5.0.70 on the same
database, the server fails with a error:

  query 'RENAME TABLE ... TO ...' failed: 6: Error on
  delete of '....frm-0001' (Errcode: 2)

Also .frm file of that view may be lost (renamed to .frm~).

The server failed because it tried to rename latest 3
backup .frm files renaming the view: the server used an
integer value of the "revision" field of .frm file to
extract those file names. After the fix for bug 17823 those
files were not created/maintained any more, however the
"revision" field was incremented as usual. So, the server
failed renaming non existent files.

This fix solves the problem by removing the support for
"revision" .frm file field:
1. New server silently ignores existent "revision" fields
   in old .frm files and never write it down;
2. Old server assumes, that missing "revision" field in new
   .frm files means default value of 0.
3. Accordingly to the fix for bug 17823 the new server
   drops arc/ directory on alter/rename view, so after
   "live downgrade" old server begins maintenance of the
   arc/ directory from scratch without conflicts with .frm
   files.


sql/parse_file.cc:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  1. static write_parameter(): the old_version parameter
     and the section for FILE_OPTIONS_REV have been re moved.
  2. write_parameter(): the max_versions parameter has been
     removed;
  3. sql_create_definition_file(): removal of dead code;
  4. rename_in_schema_file(): revision and num_view_backups
     parameters and dead code have been removed;
  5. File_parser::parse(): FILE_OPTIONS_REV section has been
     removed.
sql/parse_file.h:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  1. The FILE_OPTIONS_REV constant has been removed.
  2. sql_create_definition_file and rename_in_schema_file
     functions: obsolete versions, revision and
     num_view_backups parameters have been removed.
sql/sql_db.cc:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  Commentary update.
sql/sql_trigger.cc:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  sql_create_definition_file() calls have been updates to
  new parameter lists.
sql/sql_view.cc:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  1. The mysql_create_view function code is used for both
     CREATE VIEW and ALTER queries, but query cache is
     necessary for ALTER command only. Check for a non first
     view revision has been replaced with a direct check for
     ALTER query.
  2. The num_view_backups global constant has been removed.
  3. view_parameters: the "revision" .frm field support has
     been removed.
  4. sql_create_definition_file and rename_in_schema_file
     function calls have been updates to new parameter lists.
sql/table.h:
  Bug #40021: Renaming view fails, archived .frm for view is
              missing after downgrade
  
  TABLE_LIST: the revision field has been removed.
2008-11-14 21:25:57 +04:00
.bzr-mysql Fix some bad merge that got the string "5.1-bugteam" into this 5.0 tree. 2008-10-04 18:32:23 +02:00
bdb my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
BitKeeper Fix bug in BK trigger for sending changes to InnoDB devs. 2008-01-24 00:31:47 -07:00
BUILD Bug#27526: BUILD/check_cpu misbehaving on Debian testing 2008-08-18 13:28:46 -04:00
client Fix for bug#37527: mysqlcheck fails to report entire database 2008-11-14 11:40:46 +04:00
cmd-line-utils Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines 2008-03-07 13:41:11 -08:00
config/ac-macros Makefile.am, Info.plist.sh: 2008-02-26 18:36:06 +01:00
dbug Bug#35986 valgrind warning in DbugParse for empty string in SET GLOBAL DEBUG="" 2008-05-02 12:49:31 +02:00
Docs Makefile.am, configure.in: 2007-11-22 17:48:40 +01:00
extra Merge main 5.0 branch -> 5.0-build (team tree). 2008-10-04 17:38:24 +02:00
heap fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
include Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY. 2008-08-22 17:31:53 +05:00
innobase Cherry-pick fix for Bug#35220 from innodb-5.0-ss2475 snapshot. 2008-08-07 18:25:24 -06:00
libmysql Bug#37226 Explicit call of my_thread_init() on Windows for every new thread. 2008-09-01 17:46:37 -04:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. 2008-02-27 12:42:43 +04:00
man Bug#37098 Get rid of "Installed (but unpackaged)" files in the RPM build 2008-08-25 21:07:41 +02:00
myisam Fix for bug#37277: Potential crash when a spatial index isn't the first key 2008-08-26 18:51:06 +05:00
myisammrg fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
mysql-test Test case for bug #34774: key prefix on text field in federated 2008-11-14 11:42:29 +04:00
mysys Bug#36279 - mysql built with Visual Studio 2005 does not display 2008-11-10 21:18:04 +01:00
ndb fixed warnings and compile errors from the fix for bug 26243 2008-03-29 09:52:16 +02:00
netware Bug#30129: mysql_install_db appears to run normally, but the databases \ 2008-08-06 09:25:03 -04:00
os2 Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
scripts Bug#35754: mysql_install_db does not work if no hostname is set 2008-09-24 08:59:56 -04:00
server-tools Bug #33907 : Errors compiling mysql with Microsoft Visual C++ Express 2008 2008-08-21 19:11:17 +02:00
sql Bug #40021: Renaming view fails, archived .frm for view is 2008-11-14 21:25:57 +04:00
sql-bench my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql-common Merge five.local.lan:/work/trees/mysql-5.0-build-src-clean 2008-04-04 14:51:43 +02:00
SSL SSL/Makefile.am mysql-test/Makefile.am: 2007-07-27 17:39:07 +02:00
strings Bug#36270: incorrect calculation result - works in 4.1 but not in 5.0 or 5.1 2008-08-15 15:46:21 -04:00
support-files Bug #40546 Debug server in RPM is built with compiler optimization 2008-11-06 16:24:58 +01:00
tests Bug#38291 memory corruption and server crash with view/sp/function 2008-08-20 14:49:28 +05:00
tools Avoid the name conflict between the system-provided "md5.h" and the MySQL one 2007-07-19 14:14:03 +02:00
VC++Files Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and 2007-11-19 18:59:25 +03:00
vio Bug#33050 5.0.50 fails many SSL testcases 2008-02-07 08:48:28 +01:00
win Merge main 5.0 branch -> 5.0-build (team tree). 2008-10-04 17:38:24 +02:00
zlib The header "config.h" needs to be included "early" to control other headers. 2008-10-13 14:23:39 +02:00
.bzrignore patch for bug#32496 (2nd) with ansi conformant and Mysql test case. 2007-11-26 21:28:01 +01:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt Work around for older version of cmake. 2008-04-07 18:40:37 -04:00
configure.in Raise version number after cloning 5.0.72 2008-10-24 11:37:40 +02:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
INSTALL-SOURCE Makefile.am: 2007-11-02 12:59:45 +01:00
INSTALL-WIN-SOURCE Makefile.am: 2007-11-02 12:59:45 +01:00
Makefile.am Bug#36788 Multiple funcs_1 'trig' tests are failing on vanilla builds 2008-06-02 21:57:11 +02:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.