From: Date: November 11 2005 6:03pm Subject: bk commit into 5.0 tree (evgen:1.1962) BUG#13622 List-Archive: http://lists.mysql.com/internals/32185 X-Bug: 13622 Message-Id: <20051111170338.EFD513BBFE@localhost.moonbone.local> Below is the list of changes that have just been committed into a local 5.0 repository of evgen. When evgen does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1962 05/11/11 20:03:32 evgen@stripped +3 -0 Fix bug #13622 Wrong view .frm created if some field's alias contain \n View .frm parser assumes that query string will take only 1 line, with \n in aliases query stringmay take several lines thus produces bad .frm file. 'query' parameter type changed from 'string' to 'escaped string' mysql-test/t/view.test 1.118 05/11/11 20:02:12 evgen@stripped +9 -0 Test case for bug #13622 Wrong view .frm created if some field's alias contain \n mysql-test/r/view.result 1.127 05/11/11 20:01:55 evgen@stripped +8 -0 Test case for bug #13622 Wrong view .frm created if some field's alias contain \n sql/sql_view.cc 1.74 05/11/11 20:00:04 evgen@stripped +1 -1 Fix bug #13622 \n in column alias results in broken .frm 'query' parameter type changed to 'escaped string' # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: evgen # Host: moonbone.local # Root: /work/13622-bug-5.0-mysql --- 1.126/mysql-test/r/view.result 2005-10-28 16:50:29 +04:00 +++ 1.127/mysql-test/r/view.result 2005-11-11 20:01:55 +03:00 @@ -2323,3 +2323,11 @@ 1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where DROP VIEW v1,v2; DROP TABLE t1,t2,t3; +create table t1 (f1 int); +create view v1 as select t1.f1 as '123 +456' from t1; +select * from v1; +123 +456 +drop view v1; +drop table t1; --- 1.117/mysql-test/t/view.test 2005-10-28 14:11:24 +04:00 +++ 1.118/mysql-test/t/view.test 2005-11-11 20:02:12 +03:00 @@ -2189,4 +2189,13 @@ DROP VIEW v1,v2; DROP TABLE t1,t2,t3; +# +# Bug #13622 Wrong view .frm created if some field's alias contain \n +# +create table t1 (f1 int); +create view v1 as select t1.f1 as '123 +456' from t1; +select * from v1; +drop view v1; +drop table t1; --- 1.73/sql/sql_view.cc 2005-10-28 01:56:37 +04:00 +++ 1.74/sql/sql_view.cc 2005-11-11 20:00:04 +03:00 @@ -496,7 +496,7 @@ static File_option view_parameters[]= {{{(char*) STRING_WITH_LEN("query")}, offsetof(TABLE_LIST, query), - FILE_OPTIONS_STRING}, + FILE_OPTIONS_ESTRING}, {{(char*) STRING_WITH_LEN("md5")}, offsetof(TABLE_LIST, md5), FILE_OPTIONS_STRING},