summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-04-20 21:09:16 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2012-04-20 21:09:16 +0200
commit97aa8e8c0ad5c921f70f021e99f1a1ed5499b47e (patch)
treeab6a8ee83e5465dda106e506a7597c79ba94efa5 /sql/sql_view.cc
parent9997b78ae48a518e65b7c96c947e868419c679ca (diff)
downloadmariadb-git-97aa8e8c0ad5c921f70f021e99f1a1ed5499b47e.tar.gz
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).
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 8760e936d36..2c9227b46f7 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -736,7 +736,7 @@ static File_option view_parameters[]=
FILE_OPTIONS_ULONGLONG},
{{ C_STRING_WITH_LEN("algorithm")},
my_offsetof(TABLE_LIST, algorithm),
- FILE_OPTIONS_ULONGLONG},
+ FILE_OPTIONS_VIEW_ALGO},
{{ C_STRING_WITH_LEN("definer_user")},
my_offsetof(TABLE_LIST, definer.user),
FILE_OPTIONS_STRING},