Commit graph

127 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
1b164c7b83 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
konstantin@mysql.com
6f8d3c4844 A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
2005-09-22 02:11:21 +04:00
monty@mysql.com
1a6f16edd9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-08-15 18:35:48 +03:00
evgen@moonbone.local
5dc75a559d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11864
2005-08-15 13:21:55 +04:00
monty@mysql.com
4c0d23e156 Fixes during review of new pushed code
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
2005-08-12 13:54:42 +03:00
evgen@moonbone.local
baf0c9ad08 Fix bug #11864 non unique names are allowed in subquery
Column names weren't checked for uniqueness for subqueries.

Code for names uniqueness checking used for view creation moved into 
separate function named check_duplicate_names(). It's called on 
preparation of subqueries to check uniqueness of names. If duplicate names 
are found then error is raised.
2005-08-10 17:45:00 +04:00
sergefp@mysql.com
d9ce6e8f25 BUG#11869:part 2: post-review fixes: merging into 5.0
We're out of bits in st_select_lex->options so make TMP_TABLE_FORCE_MYISAM ==
OPTION_FOUND_COMMENT (the latter is not used by create_tmp_table).
2005-08-07 21:21:30 +00:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
konstantin@mysql.com
9f379d7f05 Patch two (the final one) for Bug#7306 "the server side preparedStatement
error for LIMIT placeholder".
The patch adds grammar support for LIMIT ?, ? and changes the
type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
so that it can point to Item_param.
2005-06-07 14:11:36 +04:00
bell@sanja.is.com.ua
05c9defefa Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-multi-5.0
2005-04-01 13:02:29 +03:00
bell@sanja.is.com.ua
1029e533df postmerge 4.1->5.0 fixes 2005-04-01 02:14:30 +03:00
bell@sanja.is.com.ua
05d4ed14e4 merge 4.1->5.0 2005-03-31 10:39:48 +03:00
bell@sanja.is.com.ua
1659dacab1 fixed mechanism of detection selection from table wich we update
(BUG##9398, BUG#8703)
fixed wrong join view detection in multi-delete which lead to server crash
2005-03-28 15:13:31 +03:00
bell@sanja.is.com.ua
4554b1f263 fixed union types merging and table related metadata (BUG#8824) 2005-03-23 08:36:48 +02:00
monty@mysql.com
e2ea35ec67 Merge with 4.1 2005-02-22 15:47:00 +02:00
bell@sanja.is.com.ua
2d3076b69d removed wrong distinct UNION detection (BUG#6565) 2005-02-14 02:06:21 +02:00
pem@mysql.comhem.se
2c26ebe359 WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.
2005-02-08 20:52:50 +01:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
dlenev@brandersnatch.localdomain
48fcadf358 Small cleanup of derived tables handling.
We should not call free_tmp_table() for derived table in 
mysql_derived_filling(), since by this moment this table is already
registered in THD::derived_tables list and thus free_tmp_table() will
be called for it automatically in close_thread_tables().
2004-12-19 12:51:40 +03:00
gluh@gluh.mysql.r18.ru
6372efa7da Fix for bug#7212: information_schema: "Can't find file" errors if storage engine gone(after review) 2004-12-16 16:31:36 +03:00
dlenev@brandersnatch.localdomain
4b0882e0a6 Fix for bug #6765 "Implicit access to time zone description
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.
2004-12-09 13:31:46 +03:00
monty@mysql.com
75d0958dc3 After merge fixes
Fixed compiler warnings
Fix core dump when sending SIGHUP to mysqld
2004-12-06 17:15:54 +02:00
bell@sanja.is.com.ua
064b02203f new lock for multiupdate:
- open and create derived tables
- detect which tables should be locked for write
- lock and fill derived tables
some unitialized variables fixed
2004-11-05 17:29:47 +02:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bell@sanja.is.com.ua
f3e6405ff1 postreview fixes (BUG#5618 & BUG#5590) 2004-09-25 15:07:50 +03:00
bell@sanja.is.com.ua
f11bcefae1 fixed error handling if creating derived table failed
single row subquery always can return NULL (no rows found) (BUG#5590)
2004-09-17 19:08:46 +03:00
bell@sanja.is.com.ua
ad6ad34b45 memory leak fixed 2004-09-05 10:57:26 +03:00
bell@sanja.is.com.ua
bb62c80201 memory leaks fixed 2004-09-04 23:05:12 +03:00
konstantin@mysql.com
568c6e8526 Fix for bug#4912 "mysqld crashs in case a statement is executed
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.
2004-08-21 02:02:46 +04:00
bell@sanja.is.com.ua
9336d36cf8 VIEW
two TABLE_LIST copy eliminated
2004-07-16 01:15:55 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
konstantin@mysql.com
b793142c8f Unused variables removed (many files). 2004-06-21 20:39:19 +04:00
bell@sanja.is.com.ua
c7396f8d20 PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) 2004-05-20 02:02:49 +03:00
bell@sanja.is.com.ua
ef5f15c351 fixed subquery in the FROM clause with parameter (BUG#3020) 2004-04-08 23:28:47 +03:00
monty@mysql.com
42cf92ce37 Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly
2004-04-05 13:56:05 +03:00
serg@serg.mylan
99886df867 correct support for a mix of UNION/UNION ALL in the same query.
Bug#1428
2004-03-23 14:43:24 +01:00
bell@sanja.is.com.ua
8035ce40ec DBUG_ASSERT(fixed == 0) added to fix_fields() 2004-03-17 14:26:26 +02:00
bell@sanja.is.com.ua
0aa7a4b4ea after merge & valgrind test fixes (BUG#2120) 2004-02-10 02:18:22 +02:00
bell@sanja.is.com.ua
74a9ca1991 ufter revview fix (BUG#2120) 2004-02-09 14:44:03 +02:00
bell@sanja.is.com.ua
f9af8578bc make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge)
2004-02-01 20:07:44 +02:00
bell@sanja.is.com.ua
2a9cd37cd6 now all tables of query are locked in one place (including derived tables)
fixed BUG#2120 and other problem with EXPLAINing derived tables
2004-02-01 15:30:32 +02:00
bell@sanja.is.com.ua
0b7ebbb57d Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-insert-4.1
2004-01-17 15:28:56 +02:00
bell@sanja.is.com.ua
48686f89e6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ft_derived-4.1
2004-01-17 14:03:22 +02:00
bell@sanja.is.com.ua
4714f690f1 assigned correct lex->current_select for derived tables (BUG#2349)
moved LIMIT initialialization, because it is need only for single select derived table
2004-01-14 15:15:42 +02:00
bell@sanja.is.com.ua
d358e52b8b As far as we cut off derived table branch, we have to close JOINs (BUG#2141)
(test case is absend because it is multi-thread and very big)
2004-01-06 13:13:04 +02:00
bell@sanja.is.com.ua
e756a511f8 fixed unlocking tables during subquery execution (BUG#2048) 2003-12-10 22:46:14 +02:00
monty@mysql.com
7f9466a717 Merge 2003-11-28 13:31:38 +02:00
monty@mysql.com
ede8169d24 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log
2003-11-28 12:18:13 +02:00
bell@sanja.is.com.ua
9702a4027d removed unused variable 2003-11-27 09:34:41 +02:00