Commit graph

1350 commits

Author SHA1 Message Date
monty@mysql.com
82fc54781b Fixed problems found by valgrind
Fixed problems in test suite where some test failed
Fixed access to not initialized memory in federated
Fixed access to not initialized memory when using BIT fields in internal temporary tables
2005-09-22 03:23:07 +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
msvensson@neptunus.(none)
d612caf39a Merge neptunus.(none):/home/msvensson/mysql/bug10713
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
2005-09-13 09:41:01 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
01ce8a8aa9 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-09-12 20:18:49 +03:00
monty@mishka.mysql.com
0965bfa832 Review fixes since last pull
Fix for bug #13025; Server crash in filesort because wrong call to handler::position()
2005-09-12 18:48:17 +03:00
sergefp@mysql.com
66d6373d14 Fix a valgrind warning. 2005-09-10 15:32:07 +04:00
igor@rurik.mysql.com
bcae525685 Manual merge 2005-09-08 13:44:36 -07:00
igor@rurik.mysql.com
19192328f2 sql_select.cc:
Fixed bug #12885.
  Forced inheritence of the maybe_null flag for the expressions
  containing GROUP BY attributes in selects with ROLLUP.
olap.test, olap.result:
  Added test case for bug #12885.
2005-09-08 12:37:16 -07:00
aivanov@mysql.com
d6398c1aae Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-0
2005-09-07 18:58:58 +04:00
aivanov@mysql.com
4b245a2803 join_outer.result, opt_range.cc, item_cmpfunc.cc:
Post merge changes
sql_yacc.yy:
  Post merge changes
sql_select.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions (post merge changes).
   The function add_key_fields() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
2005-09-07 17:42:47 +04:00
sergefp@mysql.com
99870f616d Fix for BUG#12941: in create_tmp_field(), if the passed item is an Item_ref, put newly
created item into item->result_field, not *(item->ref)->result_field.
2005-09-07 11:50:41 +04:00
konstantin@mysql.com
a3ddcdf8fb Rename:
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed 
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to 
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
2005-09-02 17:21:19 +04:00
msvensson@neptunus.(none)
1efa3714aa Bug10213 mysqldump crashes when dumping VIEWs
- Added testcase for this bug
 - Check if compact view format can be used
 - Clean up mysqld_show_create
2005-09-01 11:36:42 +02:00
evgen@moonbone.local
41fc00641c create.test, create.result, sql_select.cc, item.cc:
After merge fix for bug #12537
2005-08-31 22:06:34 +04:00
evgen@moonbone.local
f917803e0c Manual merged 2005-08-31 21:24:25 +04:00
evgen@moonbone.local
6ed7255448 manual merge of bug fix#12537 2005-08-30 23:29:47 +04:00
evgen@moonbone.local
d76f9471cb Fix bug #12537 UNION produces longtext instead of varchar
Item::tmp_table_field_from_field_type() and create_tmp_field_from_item()
was converting string field to blob depending on byte-wise length instead of
character length, which results in converting valid varchar string with
length == 86 to longtext.

Made that functions above take into account max width of character when
converting string fields to blobs.
2005-08-30 16:19:53 +04:00
andrey@lmy004.
7b1b3997a8 fix for bug #11904 (select statement, cursor, grouping wrong results) 2005-08-26 09:45:30 +02:00
evgen@moonbone.local
3831bb56df Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/11718-bug-4.1-mysql
2005-08-22 15:46:14 +04:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
4084c13605 Merge c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-4.1
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
2005-08-20 16:38:55 -04:00
igor@rurik.mysql.com
2d32b77693 distinct.test, distinct.result:
Added test cases for bug #12625.
sql_select.cc:
  Fixed bug #12625.
  Fixed invalid removal of constant items from the DISTINCT
  list in the function create_distinct_group.
2005-08-19 01:57:22 -07:00
evgen@moonbone.local
6d8bd17c3a Fix bug #11718 query with function, join and order by returns wrong type.
create_tmp_field_from_item() was creating tmp field without regard to
original field type of Item. This results in wrong type being reported to
client.

To create_tmp_field_from_item() added special handling for Items with 
DATE/TIME field types to preserve their type.
2005-08-17 23:53:12 +04:00
igor@rurik.mysql.com
9693dc6a6b sql_select.cc:
Fixed bug #11479.
  The JOIN::reinit method cannot call setup_tables
  after the optimization phase since this function
  removes some optimization settings for joined
  tables. E.g. it resets values of the null_row flag to 0.
subselect.result, subselect.test:
  Added a test case for bug #11479.
2005-08-15 21:33:58 -07: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
sanja@hasky.mysql.fi
16d279bb12 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  hasky.mysql.fi:/home/sanja/work-merge-5.0
2005-08-13 08:19:34 +03:00
bell@50.0.168.192.in-addr.arpa
1e248ceaf1 fixed convertion and handling IN subqueries with rows (BUG#11867) 2005-08-13 07:45:14 +03:00
timour@mysql.com
354ce1d024 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge
2005-08-12 19:27:54 +03:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03: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
konstantin@mysql.com
f6306a8db1 A fix for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in
subqry order by server crash": failing DBUG_ASSERT(curr_join == this)
when opening a cursor.
Ensure that for top-level join curr_join == join (always), 
and thus fix the failing assert.
curr_join is a hack to ensure that uncacheable subqueries can be
re-evaluated safely, and should be never different from main join
in case of top-level join.
2005-08-10 12:25:26 +04:00
monty@mysql.com
99cb083549 Review of new pushed code
- Fixed some error condtion when handling dates with 'T'
- Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed
- Safety fixes and cleanups
2005-08-09 00:13:49 +03:00
konstantin@mysql.com
78482b2616 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kostja/mysql/mysql-5.0-11909
2005-08-08 19:26:19 +04:00
konstantin@mysql.com
043f77ccdf A fix and a test case for Bug#11909 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY nested queries corrupt result"
2005-08-08 19:24:56 +04:00
sergefp@mysql.com
8e09db01ad Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug12082
2005-08-08 14:04:09 +00:00
sergefp@mysql.com
65566e449d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11869-part3
2005-08-07 21:32:26 +00: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
sergefp@mysql.com
c3bac658be Manual merge 2005-08-07 11:03:54 +00:00
sergefp@mysql.com
5e9545d4c4 BUG#11869 (cont'd, eliminating "table type doesn't support FULLTEXT" error):
When creating temporary table for UNION, pass TMP_TABLE_FORCE_MYISAM flag to 
create_tmp_table if we will be using fulltext function(s) when reading from the 
temp. table.
2005-08-06 21:08:28 +00:00
evgen@moonbone.local
1894cff045 Manual merge of #11335 bugfix 2005-08-05 00:34:42 +04:00
igor@rurik.mysql.com
b5f33d2bc4 Manual merge 2005-08-02 12:09:49 -07:00
igor@rurik.mysql.com
8420d76f8d sql_select.cc, sql_class.h:
Reversed the changes to fix bug #12095 after review
  done by SergeyG. Applied a fix suggested by him.
2005-08-02 11:58:52 -07:00
schwenke@alpha.xl.local
655a86a9e7 Merge aschwenke@bk-internal.mysql.com:/home/bk/mysql-5.0
into  alpha.xl.local:/home/schwenke/Work/MySQL/BK-internal-tree/mysql-5.0
2005-08-01 08:34:29 +02:00
monty@mishka.local
7f845036c0 After merge fixes
Review of new pushed code
2005-07-31 22:56:24 +03:00
monty@mishka.local
585da2f6fd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0
2005-07-31 21:09:18 +03:00
schwenke@alpha.xl.local
84c5ce61c5 Merge aschwenke@bk-internal.mysql.com:/home/bk/mysql-5.0
into  alpha.xl.local:/home/schwenke/Work/MySQL/BK-internal-tree/mysql-5.0
2005-07-31 19:59:20 +02:00
monty@mishka.local
8437e9c1be Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
2005-07-31 12:49:55 +03:00
sergefp@mysql.com
7bf65299cc Fix for BUG#12082 (assert failure when the query fails to get a lock for record in 'const' table):
Set table->key_read back to 0 regardless of whether join_read_const() succeeded or not.
2005-07-31 02:47:54 +00:00
evgen@moonbone.local
fa0ea36507 Fix bug #11335 View redefines TinyInt(1) column definition
Item_type_holder doesn't store information about length and exact type of
original item which results in redefining length to max_length and geometry 
type to longtext.

Changed the way derived tables except unions are built. Now they are created
from original field list instead of list of Item_type_holder.
2005-07-30 05:53:35 +04:00
schwenke@alpha.xl.local
4344cd39e0 fixed two bugs that break Windows build 2005-07-29 15:40:39 +02:00
igor@rurik.mysql.com
64e53ec5c4 Manual merge 2005-07-28 21:28:20 -07:00