Commit graph

58 commits

Author SHA1 Message Date
Oleksandr Byelkin
c8948b0d0d MDEV-8931: (server part of) session state tracking
System variables tracking
2016-08-31 17:17:46 +02:00
Monty
b4ff64568c Fixed wrong counting of global Memory_used 2016-04-28 13:39:55 +03:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Sergei Golubchik
9214d043fd disable SHOW I_S_table for built-in I_S tables
This fixes
MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
2016-02-23 10:54:34 +01:00
Sergei Golubchik
271fed4106 Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
Sergei Golubchik
f3444df415 Merge branch 'mysql/5.5' into 5.5
reverted about half of commits as either not applicable or
outright wrong
2016-02-09 11:27:40 +01:00
Alexey Botchkov
f3926cd18e MDEV-5273 Prepared statement doesn't return metadata after prepare.
Fix for SHOW CREATE DATABASE.
2016-01-28 11:12:03 +04:00
Alexey Botchkov
df26954951 MDEV-5273 Prepared statement doesn't return metadata after prepare.
The metadata creation part of the mysqld_shww_create separated
        to be used on the mysqld_stmt_prepare stage.
2016-01-26 23:18:13 +04:00
Venkatesh Duggirala
2735f0b920 Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK
Problem:
    ========
    1) Drop table queries are re-generated by server
    before writing the events(queries) into binlog
    for various reasons. If table name/db name contains
    a non regular characters (like latin characters),
    the generated query is wrong. Hence it breaks the
    replication.
    2) In the edge case, when table name/db name contains
    64 characters, server is throwing an assert
    assert(M_TBLLEN < 128)
    3) In the edge case, when db name contains 64 latin
    characters, binlog content is interpreted badly
    which is leading replication failure.

    Analysis & Fix :
    ================
    1) Parser reads the table name from the query and converts
    it to standard charset(utf8) and stores it in table_name variable.
    When drop table query is regenerated with the same table_name
    variable, it should be converted back to the original charset
    from standard charset(utf8).

    2) Latin character takes two bytes for each character. Limit
    of the identifier is 64. SYSTEM_CHARSET_MBMAXLEN is set to '3'.
    So there is a possiblity that tablename/dbname contains 3 * 64.
    Hence assert is changed to
    (M_TBLLEN <= NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)

    3) db_len in the binlog event header is taking 1 byte.
       db_len is ranged from 0 to 192 bytes (3 * 64).
       While reading the db_len from the event, server
       is casting to uint instead of uchar which is leading
       to bad db_len. This problem is fixed by changing the
       cast type to uchar.
2015-12-01 15:38:11 +05:30
Sergey Vojtovich
31e365efae MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor.
Added thd parameter to all routines that may create items.
Also removed "current_thd" from Item::Item. This reduced number of
pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
2015-08-21 10:40:39 +04:00
V S Murthy Sidagam
c3870e089a Bug #18592390 QUERY TO I_S.TABLES AND I_S.COLUMNS LEADS TO HUGE MEMORY USAGE
Description: On an example MySQL instance with 28k empty
InnoDB tables, a specific query to information_schema.tables
and information_schema.columns leads to memory consumption
over 38GB RSS.

Analysis: In get_all_tables() call, we fill the I_S tables
from frm files and storage engine. As part of that process
we call make_table_name_list() and allocate memory for all
the 28k frm file names in the THD mem_root through
make_lex_string_root(). Since it has been called around
28k * 28k times there is a huge memory getting hogged in
THD mem_root. This causes the RSS to grow to 38GB.

Fix: As part of fix we are creating a temporary mem_root
in get_all_tables and passing it to fill_fiels(). There we
replace the THD mem_root with the temporary mem_root and
allocates the file names in temporary mem_root and frees
it once we fill the I_S tables in get_all_tables and
re-assign the original mem_root back to THD mem_root.

Note: Checked the massif out put with the fix now the memory growth is just around 580MB at peak.
2015-04-27 23:50:13 +05:30
Alexander Barkov
c6d3f8058d MDEV-7112 Split HA_CREATE_INFO 2014-12-08 10:56:08 +04:00
Sergei Golubchik
f62c12b405 Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
Sergei Golubchik
db8af31831 SHOW and FLUSH for I_S tables.
Extend existing plugins to support
* SHOW QUERY_RESPONSE_TIME
* FLUSH QUERY_RESPONSE_TIME
* SHOW LOCALE

move userstat tables to use the new API instead of
hand-coded syntax
2014-10-11 18:53:04 +02:00
Sergei Golubchik
513f5840f8 MDEV-6138 show sysvar's help in I_S tables
INFORMATION_SCHEMA.SYSTEM_VARIABLES
2014-10-11 10:23:20 +02:00
Sergei Petrunia
d161546b67 MDEV-6689: valgrind errors in view.test in 10.1
SHOW COLUMNS and SHOW KEYS commands fill IS_table_read_plan
in a special way - they don't set or use lookup_field_vals
member.

Added a "trivial_show_command" flag that signals that
lookup_field_vals has no valid data, made EXPLAIN code honor it.
2014-09-04 01:12:49 +04:00
Sergei Golubchik
5045615cd9 small cleanup of the SHOW CREATE TABLE code 2014-07-08 19:39:06 +02:00
Sergei Petrunia
424d5de89d Merge bb-10.1-explain-analyze into 10.1 2014-06-25 16:46:42 +04:00
Sergei Petrunia
c08de06246 MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries
- "ANALYZE $stmt" should discard select's output, but it should still
  evaluate the output columns (otherwise, subqueries in select list
  are not executed)
- SHOW EXPLAIN's code practice of calling JOIN::save_explain_data()
  after JOIN::exec() is disastrous for ANALYZE, because it resets
  all counters after the first execution. It is stopped
  = "Late" test_if_skip_sort_order() calls explicitly update their part
    of the query plan.
  = Also, I had to rewrite I_S optimization to actually have optimization
    and execution stages.
2014-06-24 19:41:43 +04:00
Venkatesh Duggirala
66d624b7d6 Bug#17638477 UNINSTALL AND INSTALL SEMI-SYNC PLUGIN CAUSES SLAVES TO BREAK
Problem: Uninstallation of semi sync plugin causes replication to
break.

Analysis: A semisync enabled replication is mutual agreement between
Master and Slave when the connection (I/O thread) is established.
Once I/O thread is started and if semisync is enabled on both
master and slave, master appends special magic header to events
using semisync plugin functions and sends it to slave. And slave
expects that each event will have that special magic header format
and reads those bytes using semisync plugin functions.

When semi sync replication is in use if users execute
uninstallation of the plugin on master, slave gets confused while
interpreting that event's content because it expects special 
magic header at the beginning of the event. Slave SQL thread will
be stopped with "Missing magic number in the header" error.

Similar problem will happen if uninstallation of the plugin happens
on slave when semi sync replication is in in use. Master sends
the events with magic header and slave does not know about the
added magic header and thinks that it received a corrupted event.
Hence slave SQL thread stops with "Found  corrupted event" error.

Fix: Uninstallation of semisync plugin will be blocked when semisync
replication is in use and will throw 'ER_UNKNOWN_ERROR' error.
To detect that semisync replication is in use, this patch uses
semisync status variable values.
 > On Master, it checks for 'Rpl_semi_sync_master_status' to be OFF
    before allowing the uninstallation of rpl_semi_sync_master plugin.
    >> Rpl_semi_sync_master_status is OFF when
        >>> there is no dump thread running
        >>> there are no semisync slaves
 > On Slave, it checks for 'Rpl_semi_sync_slave_status' to be OFF
    before allowing the uninstallation of rpl_semi_sync_slave plugin.
    >> Rpl_semi_sync_slave_status is OFF when
       >>> there is no I/O thread running
       >>> replication is asynchronous replication.
2014-05-05 22:22:15 +05:30
Michael Widenius
b18a1b0e6c MDEV-5850: MySQL Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names
Bug #3329 Incomplete lower_case_table_names=2 implementation

The problem was that check_db_name() converted database names to lower case also in case of lower_case_table_names=2.

Fixed by removing the conversion in check_db_name for lower_case_table_names = 2 and instead converting db name to
lower case at same places as table names are converted.

Fixed bug that SHOW CREATE DATABASE FOO showed information for database 'foo'.

I also removed some checks of lower_case_table_names when it was enough to use table_alias_charset.


mysql-test/mysql-test-run.pl:
  Added --use-copy argument to force mysql-test-run to copy files instead of doing symlinks. This is needed when you run
  with test directory on another file system
mysql-test/r/lowercase_table.result:
  Updated results
mysql-test/r/lowercase_table2.result:
  Updated results
mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
  Updated results
mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
  Updated results
mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
  Updated results
mysql-test/t/lowercase_table.test:
  Added tests with mixed case databases
mysql-test/t/lowercase_table2.test:
  Added tests with mixed case databases
sql/log.cc:
  Don't check lower_case_table_names when we can use table_alias_charset
sql/sql_base.cc:
  Don't check lower_case_table_names when we can use table_alias_charset
sql/sql_db.cc:
  Use cmp_db_names() for checking if current database changed.
  mysql_rm_db() now converts db to lower case if lower_case_table_names was used.
  Changed database options cache to use table_alias_charset. This fixed a bug where SHOW CREATE DATABASE showed wrong information.
sql/sql_parse.cc:
  Change also db name to lower case when file names are changed.
  Don't need to story copy of database name anymore when lower_case_table_names == 2 as check_db_name() don't convert in this case.
  Updated arguments to mysqld_show_create_db().
  When adding table to TABLE_LIST also convert db name to lower case if needed (same way as we do with table names).
sql/sql_show.cc:
  mysqld_show_create_db() now also takes original name as argument for output to user.
sql/sql_show.h:
  Updated prototype for mysqld_show_create_db()
sql/sql_table.cc:
  In mysql_rename_table(), do same conversions to database name as we do for the file name
2014-03-23 15:43:57 +02:00
Michael Widenius
5426facdcb Replication changes for CREATE OR REPLACE TABLE
- CREATE TABLE is by default executed on the slave as CREATE OR REPLACE
- DROP TABLE is by default executed on the slave as DROP TABLE IF NOT EXISTS

This means that a slave will by default continue even if we try to create
a table that existed on the slave (the table will be deleted and re-created) or
if we try to drop a table that didn't exist on the slave.
This should be safe as instead of having the slave stop because of an inconsistency between
master and slave, it will fix the inconsistency.
Those that would prefer to get a stopped slave instead for the above cases can set slave_ddl_exec_mode to STRICT. 

- Ensure that a CREATE OR REPLACE TABLE which dropped a table is replicated
- DROP TABLE that generated an error on master is handled as an identical DROP TABLE on the slave (IF NOT EXISTS is not added in this case)
- Added slave_ddl_exec_mode variable to decide how DDL's are replicated

New logic for handling BEGIN GTID ... COMMIT from the binary log:

- When we find a BEGIN GTID, we start a transaction and set OPTION_GTID_BEGIN
- When we find COMMIT, we reset OPTION_GTID_BEGIN and execute the normal COMMIT code.
- While OPTION_GTID_BEGIN is set:
  - We don't generate implict commits before or after statements
  - All tables are regarded as transactional tables in the binary log (to ensure things are executed exactly as on the master)
- We reset OPTION_GTID_BEGIN also on rollback

This will help ensuring that we don't get any sporadic commits (and thus new GTID's) on the slave and will help keep the GTID's between master and slave in sync.


mysql-test/extra/rpl_tests/rpl_log.test:
  Added testing of mode slave_ddl_exec_mode=STRICT
mysql-test/r/mysqld--help.result:
  New help messages
mysql-test/suite/rpl/r/create_or_replace_mix.result:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/r/create_or_replace_row.result:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/r/create_or_replace_statement.result:
  Testing replication of create or replace
mysql-test/suite/rpl/r/rpl_gtid_startpos.result:
  Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave.
mysql-test/suite/rpl/r/rpl_row_log.result:
  Updated result
mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
  Updated result
mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result:
  Updated result
mysql-test/suite/rpl/r/rpl_stm_log.result:
  Updated result
mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result:
  Updated result
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  Updated result
mysql-test/suite/rpl/t/create_or_replace.inc:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_mix.cnf:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_mix.test:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_row.cnf:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_row.test:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_statement.cnf:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/create_or_replace_statement.test:
  Testing of CREATE OR REPLACE TABLE with replication
mysql-test/suite/rpl/t/rpl_gtid_startpos.test:
  Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave.
mysql-test/suite/rpl/t/rpl_stm_log.test:
  Removed some lines
mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result:
  Testing of slave_ddl_exec_mode
mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test:
  Testing of slave_ddl_exec_mode
sql/handler.cc:
  Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
  This is to ensure that statments are not commited too early if non transactional tables are used.
sql/log.cc:
  Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
  Also treat 'direct' log events as transactional (to get them logged as they where on the master)
sql/log_event.cc:
  Ensure that the new error from DROP TABLE when trying to drop a view is treated same as the old one.
  Store error code that slave expects in THD.
  Set OPTION_GTID_BEGIN if we find a BEGIN.
  Reset OPTION_GTID_BEGIN if we find a COMMIT.
sql/mysqld.cc:
  Added slave_ddl_exec_mode_options
sql/mysqld.h:
  Added slave_ddl_exec_mode_options
sql/rpl_gtid.cc:
  Reset OPTION_GTID_BEGIN if we record a gtid (safety)
sql/sql_class.cc:
  Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set.
sql/sql_class.h:
  Added to THD: log_current_statement and slave_expected_error
sql/sql_insert.cc:
  Ensure that CREATE OR REPLACE is logged if table was deleted.
  Don't do implicit commit for CREATE if we are under OPTION_GTID_BEGIN
sql/sql_parse.cc:
  Change CREATE TABLE -> CREATE OR REPLACE TABLE for slaves
  Change DROP TABLE -> DROP TABLE IF EXISTS for slaves
  CREATE TABLE doesn't force implicit commit in case of OPTION_GTID_BEGIN
  Don't do commits before or after any statement if OPTION_GTID_BEGIN was set.
sql/sql_priv.h:
  Added OPTION_GTID_BEGIN
sql/sql_show.cc:
  Enhanced store_create_info() to also be able to handle CREATE OR REPLACE
sql/sql_show.h:
  Updated prototype
sql/sql_table.cc:
  Ensure that CREATE OR REPLACE is logged if table was deleted.
sql/sys_vars.cc:
  Added slave_ddl_exec_mode
sql/transaction.cc:
  Added warning if we got a GTID under OPTION_GTID_BEGIN
2014-02-05 19:01:59 +02:00
Sergey Vojtovich
1a2a9d74fe MDEV-4911 - add KILL query id, and add query id information to processlist
It is now possible to kill query by query id. KILL syntax was extended to:
KILL [HARD | SOFT] [CONNECTION | QUERY [ID query_id]] [thread_id | USER user_name]

Added QUERY_ID column to INFORMATION_SCHEMA.PROCESSLIST.

Fixed tests affected by this change:
- added PROCESSLIST.QUERY_ID column
- ID is now keyword and is quoted in SHOW CREATE TABLE output
- PFS statement digest is calculated basing on token id
  (not token text). Token id has shifted for keywords residing
  after ID in keywords array.
2013-09-13 20:14:56 +04:00
Sergei Golubchik
8980e67693 * use Dynamic_array<> instead of List<> for the list of found tables in sql_show.cc
* make find_files static
2013-04-07 17:11:19 +02:00
Sergei Golubchik
ccc9238335 s/st_ha_create_information/HA_CREATE_INFO/ 2013-04-07 15:35:39 +02:00
Igor Babaev
7760efad74 Merge mariadb-5.5 -> 10.0-base. 2012-12-16 16:49:19 -08:00
Sergei Golubchik
68baf07dcd 5.3 merge 2012-10-18 23:33:06 +02:00
Sergey Petrunya
30df032e28 SHOW EXPLAIN: merge with 5.5-main 2012-10-06 11:03:37 +04:00
Alexey Botchkov
8c2bb705f1 MDEV-495 backport --ignore-db-dir.
The feature was backported from MySQL 5.6.
Some code was added to make commands as
        SELECT * FROM ignored_db.t1;
        CALL ignored_db.proc();
        USE ignored_db;
to take that option into account.

per-file comments:
  mysql-test/r/ignore_db_dirs_basic.result
        test result added.
  mysql-test/t/ignore_db_dirs_basic-master.opt
        options for the test,
        actually the set of --ignore-db-dir lines.
  mysql-test/t/ignore_db_dirs_basic.test
        test for the feature.
        Same test from 5.6 was taken as a basis,
        then tests for SELECT, CALL etc were added.

per-file comments:
  sql/mysql_priv.h
MDEV-495 backport --ignore-db-dir.
        interface for db_name_is_in_ignore_list() added.
  sql/mysqld.cc
MDEV-495 backport --ignore-db-dir.
        --ignore-db-dir handling.
  sql/set_var.cc
MDEV-495 backport --ignore-db-dir.
        the @@ignore_db_dirs variable added.
  sql/sql_show.cc
MDEV-495 backport --ignore-db-dir.
        check if the directory is ignored.
  sql/sql_show.h
MDEV-495 backport --ignore-db-dir.
        interface added for opt_ignored_db_dirs.
  sql/table.cc
MDEV-495 backport --ignore-db-dir.
        check if the directory is ignored.
2012-09-27 13:18:07 +05:00
Rohit Kalhans
1e5a759aff upmerge to bug#14548159 2012-09-22 18:07:04 +05:30
Rohit Kalhans
5f003eca00 BUG#14548159: NUMEROUS CASES OF INCORRECT IDENTIFIER
QUOTING IN REPLICATION 

Problem: Misquoting or unquoted identifiers may lead to
incorrect statements to be logged to the binary log.

Fix: we use specialized functions to append quoted identifiers in
the statements generated by the server.
2012-09-22 17:50:51 +05:30
unknown
ced3907c02 Merge from 5.3 2012-08-24 15:29:01 +02:00
Sergey Petrunya
0e5193435a MWL#182: Explain running statements: Address feedback:
- Use LEX::value_list instead of LEX::show_explain_for_thread
- Factor out common code into find_thread_by_id(ulong id)
2012-08-08 21:24:00 +04:00
Sergey Petrunya
2368f8895d MWL#182: Explain running statements
- Address feedback from the second code review.
2012-07-17 21:52:08 +04:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Konstantin Osipov
eb882fe41b Fix Bug#56443 remove last 'mysqld_show_column_type' remains
sql/sql_show.h:
  Remove an unused declaration.
2010-10-13 12:48:08 +04:00
Konstantin Osipov
148260044e Fix Bug#56443 remove last 'mysqld_show_column_type' remains 2010-10-13 12:48:08 +04:00
Mats Kindahl
23d8586dbf WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Mats Kindahl
e409d6f69c WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Build Team
e85fe79430 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Build Team
366adeab08 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Mats Kindahl
dcd050c550 Bug #34707: Row based replication: slave creates table within wrong database
The failure was caused by executing a CREATE-SELECT statement that creates a
table in another database than the current one. In row-based logging, the
CREATE statement was written to the binary log without the database, hence
creating the table in the wrong database, causing the following inserts to
fail since the table didn't exist in the given database.

Fixed the bug by adding a parameter to store_create_info() that will make
the function print the database name before the table name and used that
in the calls that write the CREATE statement to the binary log. The database
name is only printed if it is different than the currently selected database.

The output of SHOW CREATE TABLE has not changed and is still printed without
the database name.

mysql-test/suite/rpl/t/rpl_row_create_table.test:
  Added test to check that CREATE-SELECT into another database than the
  current one replicates.
sql/sql_insert.cc:
  Adding parameter to calls to store_create_info().
sql/sql_show.cc:
  Adding parameter to calls to store_create_info().
  
  Extending store_create_info() with parameter 'show_database' that will cause
  the database to be written before the table name.
sql/sql_show.h:
  Adding parameter to call to store_create_info() to tell if the database should be shown or not.
sql/sql_table.cc:
  Adding parameter to calls to store_create_info().
2008-10-08 11:15:00 +02:00
Mats Kindahl
70b18065d0 Bug #34707: Row based replication: slave creates table within wrong database
The failure was caused by executing a CREATE-SELECT statement that creates a
table in another database than the current one. In row-based logging, the
CREATE statement was written to the binary log without the database, hence
creating the table in the wrong database, causing the following inserts to
fail since the table didn't exist in the given database.

Fixed the bug by adding a parameter to store_create_info() that will make
the function print the database name before the table name and used that
in the calls that write the CREATE statement to the binary log. The database
name is only printed if it is different than the currently selected database.

The output of SHOW CREATE TABLE has not changed and is still printed without
the database name.
2008-10-08 11:15:00 +02:00
unknown
82d28fada7 WL#3732 Information schema optimization
client/mysqldump.c:
  table type compare is changed to case insensitive
mysql-test/r/information_schema.result:
  test result
mysql-test/r/information_schema_db.result:
  result fix
mysql-test/suite/ndb/r/ndb_alter_table.result:
  result fix
mysql-test/suite/ndb/r/ndb_temporary.result:
  result fix
mysql-test/t/information_schema.test:
  test case
sql/ha_ndbcluster.cc:
  char* variables are changed to LEX_STRING
sql/ha_ndbcluster.h:
  char* variables are changed to LEX_STRING
sql/ha_ndbcluster_binlog.cc:
  char* variables are changed to LEX_STRING
sql/handler.cc:
  char* variables are changed to LEX_STRING
sql/handler.h:
  char* variables are changed to LEX_STRING
sql/sql_base.cc:
  Modified functions which are used during open table process
  according to table opening method and requested_object.
sql/sql_select.cc:
  Add support for I_S tables into select_describe() function
sql/sql_show.cc:
  1. Added initialization of 'open_method' to 'st_field_info' structs.
  2. Added initialization of 'i_s_requested_object' to 'ST_SCHEMA_TABLE' structs.
  3. New function which calculates database name and table name values 
     from 'where' condition if it's possible
     void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *table,
                                  LOOKUP_FIELD_VALUES *lookup_field_vals);
  4. New function which set table open method
     setup_table_open_method(TABLE_LIST *tables,
                             ST_SCHEMA_TABLE *schema_table,
                             enum enum_schema_tables schema_table_idx)
  5. New function
     int make_db_list(THD *thd, List<LEX_STRING> *files,
                      LOOKUP_FIELD_VALUES *lookup_field_vals,
                      bool *with_i_schema)
  6. New function
     int make_table_name_list(THD *thd, List<LEX_STRING> *files, LEX *lex,
                              LOOKUP_FIELD_VALUES *lookup_field_vals,
                              bool with_i_schema, LEX_STRING *db_name)
  7. Modified 'get_all_tables' function according to new schema(see wl#3732).
sql/sql_show.h:
  char* variables are changed to LEX_STRING
sql/table.cc:
  Modified functions which are used during open table process
  according to table opening method and requested_object.
sql/table.h:
  1. added new constants(open_method)
  #define SKIP_OPEN_TABLE 0
  #define OPEN_FRM_ONLY   1
  #define OPEN_FULL_TABLE 2
      
  2. Added new field 'open_method' into struct st_field_info;
     uint open_method;
      
  3. Added new field into ST_SCHEMA_TABLE struct
     uint i_s_requested_object;  /* the object we need to open(TABLE | VIEW) */.
  4. Added new field to TABLE_LIST struct.
     uint i_s_requested_object;
     This field is set from ST_SCHEMA_TABLE.i_s_requested_object
     for processed table before opening.
      
  5. Added new fields to TABLE_LIST struct, used for 'explain select' for I_S table
     bool has_db_lookup_value;
     bool has_table_lookup_value;
     uint table_open_method;
sql/unireg.h:
  added new constants
2007-08-03 03:14:05 +05:00
gluh@mysql.com/eagle.(none)
27ab885525 WL#3732 Information schema optimization 2007-08-03 03:14:05 +05:00
unknown
bc642e1132 Post-merge fixes (merge from the main).
mysql-test/r/innodb_mysql.result:
  Update test results (merge from the main tree).
mysql-test/r/query_cache.result:
  Update test results (merge from the main tree).
mysql-test/r/sp.result:
  Update test results (merge from the main tree).
mysql-test/t/query_cache.test:
  Use --echo End of to simplify future merges.
sql/handler.h:
  st_table_list -> TABLE_LIST
sql/item_create.cc:
  A post-merge fix (this code is in sql_yacc.yy in 5.0)
sql/rpl_utility.h:
  st_table_list -> TABLE_LIST
sql/sp.cc:
  A post-merge fix.
sql/sp_head.cc:
  In 5.1 memdup_root returns void*.
sql/sql_show.cc:
  st_table_list -> TABLE_LIST
sql/sql_show.h:
  st_table_list -> TABLE_LIST
sql/sql_yacc.yy:
  A post-merge fix.
sql/table.cc:
  st_table_list -> TABLE_LIST
sql/table.h:
  st_table_list -> TABLE_LIST
2007-07-17 00:59:21 +04:00
kostja@bodhi.(none)
b8fc731804 Post-merge fixes (merge from the main). 2007-07-17 00:59:21 +04:00