summaryrefslogtreecommitdiff
path: root/mysql-test/std_data/bug48449.frm
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-02-10 16:11:08 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-02-10 16:11:08 -0200
commit63817720b41a9daa5d792d517c58ae29130cc254 (patch)
treef17a4425f7b1a84eac567fc2cb03cad6b89f65d5 /mysql-test/std_data/bug48449.frm
parentee66332ce43f5aa05b9957ead4bc8dc9b540695e (diff)
downloadmariadb-git-63817720b41a9daa5d792d517c58ae29130cc254.tar.gz
Bug#48449: hang on show create view after upgrading when view contains function of view
SHOW CREATE TABLE on a view (v1) that contains a function whose statement uses another view (v2), could trigger a infinite loop if the view referenced within the function causes a warning to be raised while opening the said view (v2). The problem was a infinite loop over the stack of internal error handlers. The problem would be triggered if the stack contained two or more handlers and the first two handlers didn't handle the raised condition. In this case, the loop variable would always point to the second handler in the stack. The solution is to correct the loop variable assignment so that the loop is able to iterate over all handlers in the stack. mysql-test/r/view.result: Add test case result for Bug#48449. mysql-test/std_data/bug48449.frm: Add a incomplete view definition that causes a warning to be issued. mysql-test/t/view.test: Add test case for Bug#48449 sql/sql_class.cc: Iterate over all handlers in the stack.
Diffstat (limited to 'mysql-test/std_data/bug48449.frm')
-rw-r--r--mysql-test/std_data/bug48449.frm12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/std_data/bug48449.frm b/mysql-test/std_data/bug48449.frm
new file mode 100644
index 00000000000..b6a717427aa
--- /dev/null
+++ b/mysql-test/std_data/bug48449.frm
@@ -0,0 +1,12 @@
+TYPE=VIEW
+query=select `test`.`t2`.`a` AS `a` from `test`.`t2`
+md5=5e6eaf216e7b016fcedfd4e1113517af
+updatable=1
+algorithm=0
+definer_user=root
+definer_host=localhost
+suid=2
+with_check_option=0
+timestamp=2010-01-01 15:00:00
+create-version=1
+source=select * from t2