Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik 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@stripped, 2006-12-04 16:04:27+03:00, anozdrin@booka. +4 -0
Fix for BUG#24293: '\Z' token is not handled correctly in views.
If SELECT-part of CREATE VIEW statement contains '\Z',
it is not handled correctly.
The problem was in String::print().
Symbol with code 032 (26) is replaced with '\z',
which is not supported by the lexer.
The fix is to replace the symbol with '\Z'.
BitKeeper/etc/collapsed@stripped, 2006-12-04 14:05:11+03:00, anozdrin@booka. +1 -0
mysql-test/r/view.result@stripped, 2006-12-04 16:04:24+03:00, anozdrin@booka. +9 -0
Update result file.
mysql-test/t/view.test@stripped, 2006-12-04 16:04:24+03:00, anozdrin@booka. +15 -0
Add test case for BUG#24293.
sql/sql_string.cc@stripped, 2006-12-04 16:04:24+03:00, anozdrin@booka. +2 -2
We should replace 032 with \Z, since lexer does not understand \z.
# 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: anozdrin
# Host: booka.
# Root: /home/alik/Documents/MySQL/devel/5.0-rt-charsets
--- 1.94/sql/sql_string.cc 2006-12-04 16:04:34 +03:00
+++ 1.95/sql/sql_string.cc 2006-12-04 16:04:34 +03:00
@@ -1033,8 +1033,8 @@ void String::print(String *str)
case '\r':
str->append(STRING_WITH_LEN("\\r"));
break;
- case 26: //Ctrl-Z
- str->append(STRING_WITH_LEN("\\z"));
+ case '\032': // Ctrl-Z
+ str->append(STRING_WITH_LEN("\\Z"));
break;
default:
str->append(c);
--- 1.184/mysql-test/r/view.result 2006-12-04 16:04:34 +03:00
+++ 1.185/mysql-test/r/view.result 2006-12-04 16:04:34 +03:00
@@ -3014,4 +3014,13 @@ i j
6 3
DROP VIEW v1, v2;
DROP TABLE t1;
+DROP VIEW IF EXISTS v1;
+CREATE VIEW v1 AS SELECT 'The\ZEnd';
+SELECT * FROM v1;
+TheEnd
+TheEnd
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1`
AS select _latin1'The\ZEnd' AS `TheEnd`
+DROP VIEW v1;
End of 5.0 tests.
--- 1.170/mysql-test/t/view.test 2006-12-04 16:04:34 +03:00
+++ 1.171/mysql-test/t/view.test 2006-12-04 16:04:34 +03:00
@@ -2960,4 +2960,19 @@ DROP VIEW v1, v2;
DROP TABLE t1;
+#
+# BUG#24293: '\Z' token is not handled correctly in views
+#
+
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+CREATE VIEW v1 AS SELECT 'The\ZEnd';
+SELECT * FROM v1;
+
+SHOW CREATE VIEW v1;
+
+DROP VIEW v1;
+
--echo End of 5.0 tests.
--- 1.14/BitKeeper/etc/collapsed 2006-12-04 16:04:34 +03:00
+++ 1.15/BitKeeper/etc/collapsed 2006-12-04 16:04:34 +03:00
@@ -19,3 +19,4 @@
4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454f8960jsVT_kMKJtZ9OCgXoba0xQ
+4573fea3Q0v0UfRkp9kF-wduuPNeGg
| Thread |
|---|
| • bk commit into 5.0 tree (anozdrin:1.2317) BUG#24293 | Alexander Nozdrin | 4 Dec |