summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move USE_PRAGMA_IMPLEMENTATION to proper placemonty@mysql.com2005-06-031-4/+1
| | | | | | Ensure that 'null_value' is not accessed before val() is called in FIELD() functions Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
* tztime.cc:kent@mysql.com2005-06-021-0/+2
| | | | | | Set #pragma implementation" earlier Many files: Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
* Add ifdefs to control when "#pragma implementation" should be usedmsvensson@neptunus.(none)2005-05-261-1/+1
| | | | Added some more ifdefs for "#pragma interface"
* mergingramil@mysql.com2005-02-281-14/+33
|\
| * Fix signatures of placement operator delete in places where placement konstantin@mysql.com2005-02-151-0/+2
| | | | | | | | | | | | | | delete is declared. As we don't use exceptions placement delete is never called and the fix only affects numerous warnings when compiling with MS Visual C++. For more info see http://www.gotw.ca/gotw/010.htm.
| * fixed cleanup of result object of subqueries. (BUG#8125)bell@sanja.is.com.ua2005-01-261-0/+8
| |
| * manually mergedserg@serg.mylan2004-12-101-1/+1
| |\
| | * two fixes for potential security bugsserg@serg.mylan2004-12-071-2/+2
| | |
| * | Merge bk-internal.mysql.com:/home/bk/mysql-4.1dlenev@mysql.com2004-12-091-1/+0
| |\ \ | | | | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
| | * | Fix for bug #6765 "Implicit access to time zone description dlenev@brandersnatch.localdomain2004-12-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables requires privileges for them if some table or column level grants present" (with after-review fixes). We should set SELECT_ACL for implicitly opened tables in my_tz_check_n_skip_implicit_tables() to be able to bypass privilege checking in check_grant(). Also we should exclude those tables from privilege checking in multi-update.
| * | | mergebell@sanja.is.com.ua2004-12-071-1/+2
| |\ \ \ | | |/ / | |/| |
| | * | reporting empty result added in case of max/min optimisation of ALL/ANY/SOME ↵bell@sanja.is.com.ua2004-11-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | subqueries fixed null processing in NOT operation used in ALL subquery (Bug #6247)
| * | | moved ndb_use_transactions out of opts and to be set default true in THD::inittomas@poseidon.ndb.mysql.com2004-11-181-0/+3
| |/ /
| * | Simpler arena swapping codemonty@mysql.com2004-11-081-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root. This gives us the following benefits: - Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases) - Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT) - We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
| * | A fix according to Monty's request:bar@mysql.com2004-10-291-2/+4
| | | | | | | | | | | | | | | "uint *errors" is now a non-optional parameter in String:copy() and copy_and_convert().
* | | A fix (bug #6089: FOUND_ROWS returns wrong values when no table/view is used).ram@gw.mysql.r18.ru2004-10-271-0/+1
|/ /
* | Merge bk-internal.mysql.com:/home/bk/mysql-4.1monty@mysql.com2004-10-261-1/+2
|\ \ | | | | | | | | | into mysql.com:/home/my/mysql-4.1
| * | A lot of fixes for prepared statements (PS):monty@mysql.com2004-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New mysqltest that can run mysqltest with PS Added support for ZEROFILL in PS Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result() Updated test cases to support --ps-protocol (Some tests are still run using old protocol) Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2... Fixed crash in PS when using sub queries Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever" Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries) Fix for PS and SELECT ... PROCEDURE Reset all warnings when executing a new PS query group_concat(...ORDER BY) didn't work with PS Fixed problem with test suite when not using innodb
* | | force assigning error handler for all mem_rootsbell@sanja.is.com.ua2004-10-211-3/+3
|/ /
* | A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)" konstantin@mysql.com2004-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | crashes server." The fix makes Item_func_rand prepared-statements aware plus it fixes the case when RAND is used in prepared statements and replication is on (as well as several similar issues). Until now we did not reset THD before every execution of a prepared statement, so if some execution had set thd->time_zone_used or thd->rand_used they would not be reset until next mysql_parse. Some of post-review fixes done.
* | A fix and test case for Bug#5987 "subselect in bool function konstantin@mysql.com2004-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes server (prepared statements)": the bug was that all boolean items always recovered its original arguments at statement cleanup stage. This collided with Item_subselect::select_transformer, which tries to permanently change the item tree to use a transformed subselect instead of original one. So we had this call sequence for prepare: mysql_stmt_prepare -> JOIN::prepare -> Item_subselect::fix_fields -> the item tree gets transformed -> Item_bool_rowready_func2::cleanup, item tree is recovered to original state, while it shouldn't have been; mysql_stmt_execute -> attempts to execute a broken tree -> crash. Now instead of bluntly recovering all arguments of bool functions in Item_bool_rowready_func2::cleanup, we recover only those which were changed, and do it in one place. There still would exist a possibility for a collision with subselect tranformation, if permanent and temporary changes were performed at the same stage. But fortunately subselect transformation is always done first, so it doesn't conflict with the optimization done by propogate_cond_constants. Now we have: mysql_stmt_prepare -> JOIN::prepare -> subselect transformation permanently changes the tree -> cleanup doesn't recover anything, because nothing was registered for recovery. mysql_stmt_execute -> JOIN::prepare (the tree is already transformed, so it doesn't change), JOIN::optimize -> propogate_cond_constants -> temporary changes the item tree with constants -> JOIN::execute -> cleanup -> the changes done by propogate_cond_constants are recovered, as they were registered for recovery.
* | Solve compile problem - use system types like 'size_t'.joerg@mysql.com2004-10-081-1/+1
| |
* | Merge bk-internal.mysql.com:/home/bk/mysql-4.1konstantin@mysql.com2004-10-081-0/+48
|\ \ | | | | | | | | | into mysql.com:/media/sda1/mysql/mysql-4.1-5748-anew
| * | A fix for Bug#5748 "Prepared statement with BETWEEN and bigint values konstantin@mysql.com2004-10-081-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crashes mysqld": implementation for a generic item tree modifications registry. Every item tree modification which should be rolled back for subsequent execution of a prepared statement or stored procedure should be saved in the registry. All such modifications are rolled back at once during cleanup stage of PS. Actual fix for the bug just adds a call to register modifications to convert_constant_item. Post review fixes implemented.
* | | Merge with 4.0 for 4.1 releasemonty@mysql.com2004-10-061-5/+4
|\ \ \ | |/ / |/| / | |/ | | | | | | Noteworthy: - New HANDLER code - New multi-update-grant-check code - Table lock code in ha_innodb.cc was not applied
| * BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).ingo@mysql.com2004-09-241-8/+7
| | | | | | | | | | | | | | | | | | | | BUG#4335 - one name can be handler open'ed many times. Reworked the HANDLER functions and interface. Using a HASH to store information on open tables that survives FLUSH TABLE. HANDLER tables alias names must now be unique, though it is allowed in 4.0 to qualify them with the database name of the base table.
* | Merge bk-internal.mysql.com:/home/bk/mysql-4.1dlenev@mysql.com2004-09-231-23/+46
|\ \ | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-4.1-memroot
| * | Implementation of Monty's idea about clear_alloc_root() optimization and ↵dlenev@brandersnatch.localdomain2004-09-231-23/+46
| | | | | | | | | | | | | | | | | | | | | | | | cleanup of work with memory roots in THD/Statement/Item_arena. Added assertions preventing memory allocation on bzero'ed MEM_ROOT since it is worked by pure luck and was very ineffective.
* | | A fix and test case for Bug#5315 "mysql_change_user() doesn't freekonstantin@mysql.com2004-09-221-0/+1
|/ / | | | | | | prepared statements."
* | Return character strings in table, type, possible_keys, key fieldsbar@mysql.com2004-09-161-8/+10
| | | | | | | | of EXPLAIN SELECT, rather than binary strings.
* | Merginghf@deer.(none)2004-09-141-3/+8
|\ \
| * | Additional fix about pathshf@deer.(none)2004-09-131-1/+1
| | |
| * | A set of mysql_home_path-related fixeshf@deer.(none)2004-09-071-2/+9
| | |
* | | Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1tulin@build.mysql.com2004-09-091-1/+1
|\ \ \ | | | | | | | | | | | | into build.mysql.com:/users/tulin/mysql-4.1-ndb-merge
| * | | A fix and test case for bug#5399 "Wrong statement executed by MySQLkonstantin@mysql.com2004-09-081-1/+1
| | | | | | | | | | | | | | | | server" (use my_charset_bin for stmt id hash).
* | | | Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndbtomas@poseidon.(none)2004-09-061-2/+4
|\ \ \ \ | |/ / / | | | | | | | | into poseidon.(none):/home/tomas/mysql-4.1-ndb
| * | | Remove extra '/' after mysql_real_data_homemonty@mysql.com2004-09-031-1/+2
| |/ / | | | | | | | | | Add missing parameter to strxnmov() that caused some INTO OUTFILE commands to core dump
| * | Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1hf@deer.(none)2004-09-021-28/+58
| |\ \ | | | | | | | | | | | | into deer.(none):/home/hf/work/mysql-4.1.4815
| * | | Addition to the fix for #4815hf@deer.(none)2004-09-021-10/+2
| | | |
| * | | Fix for bug #4815 (embedded server calculates wrong places for outfiles)hf@deer.(none)2004-08-241-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In some places in mysqld behaviour depends on system working directory It works badly in libmysqld because user can set it in the way he needs. I think we should explicitly insert mysql_real_data_home value in paths in these places
* | | | renamed ha_recovery_logging to ha_enable_transactiontomas@poseidon.(none)2004-09-031-0/+1
| |/ / |/| | | | | | | | | | | | | | added tests to alter table for "large" alter tables and truncates in ndbcluster added debug printout in restart() in ndbcluster added flag THD::transaction.on to enable/disable transaction
* | | Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1sergefp@mysql.com2004-08-311-3/+3
|\ \ \ | | | | | | | | | | | | into mysql.com:/dbdata/psergey/mysql-4.1-bug-psnames
| * | | Change Item_arena::state to enumsergefp@mysql.com2004-08-311-3/+3
| | | |
* | | | Fix for BUG#5242: Made SQL Syntax Prepared Statement names case-insensitive.sergefp@mysql.com2004-08-291-1/+1
|/ / /
* | | Merge: manual resolvekonstantin@mysql.com2004-08-241-24/+54
|\ \ \ | |/ / |/| |
| * | Fix for Bug#5034 "prepared "select 1 into @arg15", second konstantin@mysql.com2004-08-241-27/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | execute crashes server": we were deleting lex->result after each execute, but prepared statements assumed that it's left intact. The fix adds cleanup() method to select_result hierarchy, so that result objects can be reused. Plus we now need to delete result objects more wisely.
* | | Merge bk-internal.mysql.com:/home/bk/mysql-4.1monty@mysql.com2004-08-241-7/+12
|\ \ \ | | | | | | | | | | | | into mysql.com:/home/my/mysql-4.1
| * | | Portablity fixes & simple optimizationsmonty@mysql.com2004-08-241-7/+12
| |/ /
* | | Fix to compile with msvc: converted static const int Item_arena::* to enum ↵sergefp@mysql.com2004-08-241-3/+3
|/ / | | | | | | members, undefine ERROR
* | Fix for bug#4912 "mysqld crashs in case a statement is executedkonstantin@mysql.com2004-08-211-14/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a second time". The bug was caused by incompatibility of negations elimination algorithm and PS: during first statement execute a subtree with negation was replaced with equivalent subtree without NOTs. The problem was that although this transformation was permanent, items of the new subtree were created in execute-local memory. The patch adds means to check if it is the first execute of a prepared statement, and if this is the case, to allocate items in memory of the prepared statement. The implementation: - backports Item_arena from 5.0 - adds Item_arena::is_stmt_prepare(), Item_arena::is_first_stmt_execute(). - deletes THD::allocate_temporary_pool_for_ps_preparing(), THD::free_temporary_pool_for_ps_preparing(); they were redundant. and adds a few invariants: - thd->free_list never contains junk (= freed items) - thd->current_arena is never null. If there is no prepared statement, it points at the thd. The rest of the patch contains mainly mechanical changes and cleanups.