From 97aa8e8c0ad5c921f70f021e99f1a1ed5499b47e Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 20 Apr 2012 21:09:16 +0200 Subject: LPBUG#983285 - incompatibility in frm in case of VIEWs with non-default ALGORITHM option. As part of derived tables redesign, values for VIEW_ALGORITHM_MERGE and VIEW_ALGORITHM_TMPTABLE have changed from (former values 1 rsp 2 , new values 5 rsp 9). This lead to the problem that views, created with version 5.2 or earlier would not work in all situations (e.g "SHOW CREATE VIEW"), or with mysqldump. The fix is to restore backward compatibility for the from file, and convert algorithm={1,2} in the frm to {5,9} when reading .frm from disk, and store backward compatible values when writing from to disk. Also allow processing correct processing for "invalid" .frms created with MariaDB 5.3/5.5 GA releases (where algorithm stored in memory matched the one stored in frm). --- sql/parse_file.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/parse_file.h') diff --git a/sql/parse_file.h b/sql/parse_file.h index 2ebcd2ec987..a435a4e66fd 100644 --- a/sql/parse_file.h +++ b/sql/parse_file.h @@ -26,6 +26,7 @@ enum file_opt_type { FILE_OPTIONS_STRING, /**< String (LEX_STRING) */ FILE_OPTIONS_ESTRING, /**< Escaped string (LEX_STRING) */ FILE_OPTIONS_ULONGLONG, /**< ulonglong parameter (ulonglong) */ + FILE_OPTIONS_VIEW_ALGO, /**< Similar to longlong, but needs conversion */ FILE_OPTIONS_TIMESTAMP, /**< timestamp (LEX_STRING have to be allocated with length 20 (19+1) */ FILE_OPTIONS_STRLIST, /**< list of escaped strings -- cgit v1.2.1