summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
Commit message (Collapse)AuthorAgeFilesLines
* Bug#35997 Event scheduler seems to let the server crash, if it is embedded.thek@adventure.(none)2008-05-121-1/+6
| | | | | | | | | SHOW commands fail in embedded mode because schema_table array doesn't correspond to enum_schema_tables. This patch implements a dummy implementation of the abstract fill_table function to be used when the event scheduler (or other core feature) isn't part of the build.
* Bug#35997 Event scheduler seems to let the server crash, if it is embedded.thek@adventure.(none)2008-05-091-6/+12
| | | | | | The event scheduler was not designed to work in embedded mode. This patch disables and excludes the event scheduler when the server is compiled for embedded build.
* Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-03-281-3/+21
|\ | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| * Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-03-131-3/+5
| |\ | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| * \ Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-03-071-3/+21
| |\ \ | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | * \ Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-02-121-6/+2
| | |\ \ | | | | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | * \ \ Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2008-02-081-3/+21
| | |\ \ \ | | | | | | | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | | * \ \ Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-mainjani@a88-113-38-195.elisa-laajakaista.fi2007-12-071-3/+21
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
| | | | * \ \ Merge hynda.mysql.fi:/home/my/mysql-5.1-mainjani@hynda.mysql.fi2007-11-261-3/+21
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into hynda.mysql.fi:/home/my/mysql-5.1-marvel
| | | | | * \ \ Merge hynda.mysql.fi:/home/my/mysql-5.1-mainjani@hynda.mysql.fi2007-11-081-3/+21
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into hynda.mysql.fi:/home/my/mysql-5.1-marvel
| | | | | | * | | Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1monty@mysql.com/narttu.mysql.fi2007-10-111-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options - Added syncing of directory when creating .frm files - Portability fixes - Added missing cast that could cause bugs - Code cleanups - Made some bit functions inline - Moved things out of myisam.h to my_handler.h to make them more accessable - Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM) - Fixed bugs in error conditions - Use compiler time asserts instead of run time - Fixed indentation HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong (Added a define for old value to ensure we don't break any old code) Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong) - Initialize error messages early to get better errors when mysqld or an engine fails to start - Fix windows bug that query_performance_frequency was not initialized if registry code failed - thread_stack -> my_thread_stack_size
* | | | | | | | | Merge host.loc:/home/uchum/work/mysql-5.1gshchepa/uchum@host.loc2008-03-271-4/+12
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into host.loc:/home/uchum/work/5.1-opt
| * \ \ \ \ \ \ \ \ Merge host.loc:/home/uchum/work/5.0-optgshchepa/uchum@host.loc2008-03-251-0/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into host.loc:/home/uchum/work/5.1-opt
| | * | | | | | | | | Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BYmhansson/martin@riffraff.(none)2008-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When swapping out heap I_S tables to disk, this is done after plan refinement. Thus, READ_RECORD::file will still point to the (deleted) heap handler at start of execution. This causes segmentation fault if join buffering is used and the query is a star query where the result is found to be empty before accessing some table. In this case that table has not been initialized (i.e. had its READ_RECORD re-initialized) before the cleanup routine tries to close the handler. Fixed by updating READ_RECORD::file when changing handler.
| * | | | | | | | | | Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashesgluh@mysql.com/eagle.(none)2008-03-141-4/+10
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | referenced_key_name field can be uninitialized in the case when referenced table is dropped. Added codition which allows to handle this situation.
* | | | | | | | | | Manual mergeistruewing@stella.local2008-03-141-3/+5
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-optkaa@kaamos.(none)2008-03-121-3/+5
| |\ \ \ \ \ \ \ \ \ | | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | into kaamos.(none):/data/src/opt/mysql-5.1-opt
| | * | | | | | | | Bug #34367: sql/sql_show.cc: create_schema_table should handle mhansson/martin@riffraff.(none)2008-03-071-3/+5
| | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQL_TYPE_NEWDECIMAL Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until we have a working information_schema plugin as part of the source distribution.
* | | | | | | | | Merge ↵antony@pcg5ppc.xiphis.org2008-03-071-3/+4
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines into pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
| * | | | | | | | BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR ||svoj@mysql.com/june.mysql.com2008-03-071-3/+4
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_status == DA_OK Reading from information_scema.tables or information_schema.columns may cause assertion failure in debug builds. This may happen under rare circumstances when information_schema fails to get information about a table (e.g. when a connection is killed). This happens because open_normal_and_derived_tables() can return an error without setting an error message in THD. But information_schema attempts to get an error message from THD unconditionally. With this fix information_schema attempts to get an error message from THD only in case error message is set in THD.
* | | | | | | | Fix for Bug#30217: Views: changes in metadata behaviouranozdrin/alik@quad.2008-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between 5.0 and 5.1. The problem was that in the patch for Bug#11986 it was decided to store original query in UTF8 encoding for the INFORMATION_SCHEMA. This approach however turned out to be quite difficult to implement properly. The main problem is to preserve the same IS-output after dump/restore. So, the fix is to rollback to the previous functionality, but also to fix it to support multi-character-set-queries properly. The idea is to generate INFORMATION_SCHEMA-query from the item-tree after parsing view declaration. The IS-query should: - be completely in UTF8; - not contain character set introducers. For more information, see WL4052.
* | | | | | | | Rename send_eof() to my_eof() for consistency with my_ok() and my_error()kostja@dipika.(none)2008-02-191-9/+9
|/ / / / / / /
* | | | | | | Merge quad.:/mnt/raid/alik/MySQL/devel/5.1anozdrin/alik@quad.2008-02-011-6/+2
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | into quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
| * | | | | | Fix a build failure (embedded server).kostja@dipika.(none)2008-01-301-2/+0
| | | | | | |
| * | | | | | A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES andkostja@dipika.(none)2008-01-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pre-locking. The crash was caused by an implicit assumption in check_table_access() that table_list parameter is always a part of lex->query_tables. When iterating over the passed list of tables, check_table_access() used to stop only when lex->query_tables_last_not_own was reached. In case of pre-locking, lex->query_tables_last_own is not NULL and points to some element of lex->query_tables. When the parameter of check_table_access() was not part of lex->query_tables, loop invariant could never be violated and a crash would happen when the current table pointer would point beyond the end of the provided list. The fix is to change the signature of check_table_access() to also accept a numeric limit of loop iterations, similarly to check_grant(), and supply this limit in all places when we want to check access of tables that are outside lex->query_tables, or just want to check access to one table.
* | | | | | | Merge ramayana.hindu.god:/home/tsmith/m/bk/51tsmith@ramayana.hindu.god2008-01-251-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
| * | | | | | A pre-requisite for the fix for Bug#12713 "Error in a stored function kostja@bodhi.(none)2007-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | called from a SELECT doesn't cause ROLLBACK of state" Make private all class handler methods (PSEA API) that may modify data. Introduce and deploy public ha_* wrappers for these methods in all sql/. This necessary to keep track of all data modifications in sql/, which is in turn necessary to be able to optimize two-phase commit of those transactions that do not modify data.
* | | | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maintserg@janus.mylan2007-12-201-23/+32
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | into janus.mylan:/usr/home/serg/Abk/mysql-5.1
| * | | | | | Bug#12713 "Error in a stored function called from a SELECT doesn't kostja@bodhi.(none)2007-12-121-23/+32
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cause ROLLBACK of statement", part 1. Review fixes. Do not send OK/EOF packets to the client until we reached the end of the current statement. This is a consolidation, to keep the functionality that is shared by all SQL statements in one place in the server. Currently this functionality includes: - close_thread_tables() - log_slow_statement(). After this patch and the subsequent patch for Bug#12713, it shall also include: - ha_autocommit_or_rollback() - net_end_statement() - query_cache_end_of_result(). In future it may also include: - mysql_reset_thd_for_next_command().
* | | | | | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmergecmiller@zippy.cornsilk.net2007-12-141-5/+13
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
| * | | | | Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1mkindahl@dl145h.mysql.com2007-11-211-2/+4
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
| | * | | | Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1bar@bar.myoffice.izhnet.ru2007-10-301-2/+4
| | |\ \ \ \ | | | |_|/ / | | |/| | | | | | | | | into mysql.com:/home/bar/mysql-work/mysql-5.1-new-rpl-merge
| | | * | | Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rplmats@kindahl-laptop.dnsalias.net2007-10-121-2/+4
| | | |\ \ \ | | | | |_|/ | | | |/| | | | | | | | into kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
| | | | * | Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rplmats@kindahl-laptop.dnsalias.net2007-10-121-2/+4
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | into kindahl-laptop.dnsalias.net:/home/bk/b29549-mysql-5.1-target-5.1.22
| | | | | * | BUG#29549 (Endians: test failures on Solaris):mats@kindahl-laptop.dnsalias.net2007-10-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring code to add parameter to pack() and unpack() functions with purpose of indicating if data should be packed in little-endian or native order. Using new functions to always pack data for binary log in little-endian order. The purpose of this refactoring is to allow proper implementation of endian-agnostic pack() and unpack() functions. Eliminating several versions of virtual pack() and unpack() functions in favor for one single virtual function which is overridden in subclasses. Implementing pack() and unpack() functions for some field types that packed data in native format regardless of the value of the st_table_share::db_low_byte_first flag. The field types that were packed in native format regardless are: Field_real, Field_decimal, Field_tiny, Field_short, Field_medium, Field_long, Field_longlong, and Field_blob. Before the patch, row-based logging wrote the rows incorrectly on big-endian machines where the storage engine defined its own low_byte_first() to be FALSE on big-endian machines (the default is TRUE), while little-endian machines wrote the fields in correct order. The only known storage engine that does this is NDB. In effect, this means that row-based replication from or to a big-endian machine where the table was using NDB as storage engine failed if the other engine was either non-NDB or on a little-endian machine. With this patch, row-based logging is now always done in little-endian order, while ORDER BY uses the native order if the storage engine defines low_byte_first() to return FALSE for big-endian machines. In addition, the max_data_length() function available in Field_blob was generalized to the entire Field hierarchy to give the maximum number of bytes that Field::pack() will write.
| * | | | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-optevgen@moonbone.local2007-11-131-3/+6
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into moonbone.local:/work/30081-bug-5.1-opt-mysql
| | * | | | | | Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDSevgen@moonbone.local2007-11-131-3/+6
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command and reported to a client. The fact that a timestamp field will be set to NO on UPDATE wasn't shown by the SHOW COMMAND and reported to a client through connectors. This led to problems in the ODBC connector and might lead to a user confusion. A new filed flag called ON_UPDATE_NOW_FLAG is added. Constructors of the Field_timestamp set it when a field should be set to NOW on UPDATE. The get_schema_column_record function now reports whether a timestamp field will be set to NOW on UPDATE.
| * | | | | | Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statementgkodinov/kgeorge@magare.gmz2007-11-011-0/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SHOW CREATE TRIGGER was not checking for detected errors opening/reading the trigger file. Fixed to return the already generated error.
* | | | | | Rewrite profiler code to be easier to maintain and less buggy.cmiller@zippy.cornsilk.net2007-11-091-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Between 5.0 and 5.1, the step of incrementing the global query id changed, which broke how the profiler noticed when a new query had started. That reset the state list and caused all but the last five (or so) states to be thrown away. Now, don't watch for query_id changes in the lower level. Add a bogus state change at the end of profiling so that the last real state change is timed. Emit source reference for the start of the span of time instead of the end of it.
* | | | | | Fix several merge problems. There are many changes in 5.1 from 5.0cmiller@zippy.cornsilk.net2007-11-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | that affect profiling.
* | | | | | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-communitycmiller@zippy.cornsilk.net2007-10-311-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1
| * \ \ \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0cmiller@zippy.cornsilk.net2007-10-101-5/+19
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | * | | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0cmiller@zippy.cornsilk.net2007-09-101-5/+19
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | | * | | | | In 5.0, Field_double::val_str uses "%g" to render floating pointcmiller@zippy.cornsilk.net2007-07-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | numbers, which uses "X.YeZ" notation when the exponent Z would be less than -4. That behavior at -4 is not exactly what we want, and our Decimal type offers smarter number representation. By changing profiling to use Decimal types, we get more readable output.
| | | * | | | | Merge mysqldev@production.mysql.com:my/mysql-5.0-releasecmiller@zippy.cornsilk.net2007-07-021-3/+10
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
| | | | * | | | | Unify profiling SHOW code and INFORMATION_SCHEMA code forcmiller@zippy.cornsilk.net2007-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | profiling. Also, Bug#26938: profiling client hang if used before enabled In the SHOW command, not sending header data because we had no rows to send was a protocol violation. Porting the SHOW PROFILE command to use the Information Schema table avoids that problem.
| | | | * | | | | Merge mysqldev@production.mysql.com:my/mysql-5.0-releasecmiller@zippy.cornsilk.net2007-04-261-3/+9
| | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-community
* | | | | \ \ \ \ \ Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-recentcommmergecmiller@zippy.cornsilk.net2007-10-291-26/+49
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1
| * | | | | | | | | Bug#31633 Information schema = NULL queries crash the servergluh@mysql.com/eagle.(none)2007-10-231-22/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added correct handling of NULL values for lookup fields
| * | | | | | | | | Bug#31381 Error in retrieving Data from INFORMATION_SCHEMAgluh@mysql.com/eagle.(none)2007-10-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move 'table_collation' field filling outside of if(file) condition because this field has 'OPEN_FRM_ONLY' attribute