1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
unknown 128c3942a8 Bug#17204 "second CALL to procedure crashes Server"
Bug#18282 "INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views"
This bug caused crashes or resulted in wrong data being returned
when one tried to obtain information from I_S tables about views
using stored functions.

It was caused by the fact that we were using LEX representing
statement which were doing select from I_S tables as active LEX
when contents of I_S table were built. So state of this LEX both
affected and was affected by open_tables() calls which happened
during this process. This resulted in wrong behavior and in
violations of some of invariants which caused crashes.

This fix tries to solve this problem by properly saving/resetting
and restoring part of LEX which affects and is affected by the
process of opening tables and views in get_all_tables() routine.
To simplify things we separated this part of LEX in a new class
and made LEX its descendant.


mysql-test/r/information_schema_db.result:
  test case
mysql-test/t/information_schema_db.test:
  test case
sql/sql_lex.cc:
  To simplify saving/resetting and restoring part of LEX which
  affects and is affected by the process of opening tables and
  views we moved it to new class Query_tables_list and made LEX
  descendant of this class. Also introduced two LEX methods 
  which can be used to save and reset or to restore this state.
sql/sql_lex.h:
  To simplify saving/resetting and restoring part of LEX which
  affects and is affected by the process of opening tables and
  views we moved it to new class Query_tables_list and made LEX
  descendant of this class. Also introduced two LEX methods 
  which can be used to save and reset or to restore this state.
sql/sql_show.cc:
  Now in get_all_tables() routine we properly save/reset and
  restore part of LEX (statement table list and information
  about routines used) which affects and is affected by the
  process of opening tables and views.
sql/sql_table.cc:
  Now we clean-up LEX after opening table (view) in two stages.
  In the first stage we call LEX::cleanup_after_one_table_open()
  to clean-up selects lists and derived tables state. In the
  second stage which happens after close_thread_tables() is
  invoked we call Query_tables_list::reset_query_tables_list(FALSE)
  to rollback changes in Query_tables_list.
2006-05-30 10:45:23 +05:00
..
2005-10-28 23:17:51 +04:00
2006-05-03 16:33:42 +05:00
2006-05-01 21:30:09 +03:00
2006-03-01 15:50:15 +04:00
2006-05-09 13:31:46 -07:00
2006-03-30 09:13:25 +05:00
2006-03-30 17:14:55 +04:00
2005-09-08 18:15:05 +01:00
2006-05-24 17:21:35 +03:00
2006-04-11 15:26:18 +05:00
2006-05-06 23:48:13 -07:00
2005-12-06 21:28:13 +01:00
2006-05-03 19:01:29 +05:00
2005-10-28 02:36:19 +03:00
2006-05-17 20:48:48 -07:00
2005-08-29 21:06:45 +02:00
2006-03-06 23:43:47 +01:00
2006-05-24 17:21:35 +03:00
2005-09-02 09:50:17 +03:00
2006-05-09 13:31:46 -07:00
2006-05-01 22:10:50 -04:00
2005-09-26 22:43:09 -07:00
2006-01-06 00:47:49 +02:00
2006-02-20 15:03:16 +01:00
2006-02-07 19:57:31 +01:00
2005-09-15 22:21:30 +04:00
2006-03-08 10:40:29 +01:00
2005-09-14 23:12:01 +03:00
2006-05-03 19:01:29 +05:00
2005-10-13 11:28:06 +02:00
2005-10-13 11:28:06 +02:00
2006-04-26 17:09:41 -07:00