Commit graph

7727 commits

Author SHA1 Message Date
evgen@moonbone.local
6bb2d4d7a9 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11864
2005-08-15 14:01:42 +04:00
evgen@moonbone.local
85afb22ef1 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-10802
2005-08-15 13:34:47 +04: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
evgen@moonbone.local
7fcb9cd599 Fix bug #10802 Index is not used if table using BDB engine on HP-UX
HP-UX compiler was generating code which makes wrong conversion from double to
ulonglong which results in not using index in some cases.

Changed type cast operators odrer with which generated code makes proper 
conversion.
2005-08-15 13:02:29 +04:00
sanja@hasky.mysql.fi
1006063ef1 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hasky.mysql.fi:/home/sanja/work-merge-5.0
2005-08-13 11:16:26 +03:00
sanja@hasky.mysql.fi
2e2b897ff3 item_subselect.cc:
postmerge fix
subselect.result:
  new 5.0 result (postmerge)
2005-08-13 11:15:17 +03:00
serg@sergbook.mysql.com
135103bac1 after merge 2005-08-13 08:42:35 +02: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
8d7a364074 Merge 50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into  50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-bug2-4.1
2005-08-13 07:49:22 +03:00
bell@50.0.168.192.in-addr.arpa
c96bedb745 Merge 50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-4.1
into  50.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-bug2-4.1
2005-08-13 07:46:06 +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
serg@sergbook.mysql.com
d42f973b80 merged 2005-08-12 22:58:13 +02:00
serg@sergbook.mysql.com
f5ff607c14 BUG#12162 - one can start two transactions with the same XID.
Now we keep all active XID's in a hash
2005-08-12 21:15:01 +02:00
evgen@moonbone.local
0f9b982970 Fix bug #12298 Typo in timestampdiff() function name results in erroneous
view being created.

Item_func_timestamp_diff::func_name() were returning function name as
"timestamp_diff" thus when view was executed function parameters wasn't 
properly recognized and error was raised.
2005-08-12 22:42:50 +04:00
timour@mysql.com
8f115aafd7 WL#2486
Disabled one test case because it is still a problem due to the fix for WL#2486.
Pushed to enable code review.
2005-08-12 20:10:24 +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
bar@mysql.com
1b50f35ab2 Merge mysql.com:/usr/home/bar/mysql-4.1.b12351
into  mysql.com:/usr/home/bar/mysql-5.0
2005-08-12 17:10:00 +05:00
bar@mysql.com
fd7ad7f16f Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12351
2005-08-12 15:44:03 +05:00
igor@rurik.mysql.com
42810cd07a Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-08-12 01:33:45 -07:00
igor@rurik.mysql.com
da441e949c sql_base.cc:
Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.
2005-08-12 01:27:04 -07:00
jimw@mysql.com
898aae5e0f Add SLEEP(seconds) function, which always returns 0 after the given
number of seconds (which can include microseconds). (Bug #6760)
2005-08-11 18:58:22 -07:00
jimw@mysql.com
7d1c4bc3c9 Fix which include file is used to decide whether to skip rpl_openssl, the
earlier change wasn't correct. (But the other changes to the test were.)
2005-08-11 17:14:11 -07:00
igor@rurik.mysql.com
0aff8a13dc sql_base.cc:
Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
view.result, view.test:
  Added a test case for bug #12382.
2005-08-11 16:10:34 -07:00
jimw@mysql.com
03162293da Merge mysql.com:/home/jimw/my/mysql-5.0-12457
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-11 14:35:01 -07:00
acurtis@xiphis.org
597b7412c7 fix after merge 2005-08-11 18:42:22 +01:00
acurtis@xiphis.org
b9476f7d50 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0
2005-08-11 12:18:53 +01:00
sanja@arthur.local
3b64651683 query_cache_notembedded.test, query_cache_notembedded.result:
postmerge fix
2005-08-11 13:07:08 +03:00
dlenev@mysql.com
0f75d64734 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11973-2
2005-08-11 10:39:33 +04:00
acurtis@xiphis.org
445bc1336e Merge xiphis.org:/usr/home/antony/work2/p2-bug10109.3
into  xiphis.org:/usr/home/antony/work2/p2-bug10109.4
2005-08-10 22:17:53 +01:00
sergefp@mysql.com
9125477df5 Merge mysql.com:/home/psergey/mysql-5.0-bug12228-r4
into mysql.com:/home/psergey/mysql-5.0-bug12228-r5
2005-08-10 21:17:52 +00:00
sergefp@mysql.com
fbab5fc568 BUG#12228: Post review fixes: Added test case, code cleanup. 2005-08-10 21:17:02 +00:00
jimw@mysql.com
afb43a6397 Fix rpl_openssl test to actually work. (Bug #12457, Bug #10860) 2005-08-10 13:30:53 -07: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
dlenev@mysql.com
ec5ceecab7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg12280
2005-08-10 10:32:43 +04:00
dlenev@mysql.com
51537c057d Fix for bug #12280 "Triggers: crash if flush tables".
We should not allow FLUSH statement to be executed inside both triggers
and stored functions.
2005-08-10 10:31:32 +04:00
dlenev@mysql.com
60511c3df2 Clumsy but working fix for bug #11973 "SELECT .. INTO var_name; in trigger
cause crash on update".

Let us update "thd" pointer in LEX, all its units and in LEX::result before
executing statement in trigger body, since triggers are associated with TABLE
object and because of this can be used in different threads.
2005-08-10 00:23:56 +04:00
evgen@moonbone.local
2a025ffbeb Fix bug #12340 Wrong comparison in ha_innobase::cmp_ref()
When PRIMARY KEY is present ha_innobase::cmp_ref() uses it to compare refs.
After comparing part of key it moves pointers to compare next part.
For varchar parts pointers were moved only by length of parts, not including
bytes containig part length itself. This results in wrong comparision and
wrong number of deleted records.
2005-08-09 22:05:07 +04:00
acurtis@xiphis.org
aa99bd61c0 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/p2-bug10109.3
2005-08-09 16:35:51 +01:00
dlenev@mysql.com
82fb0beb9e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is
2005-08-09 12:57:50 +04:00
monty@mysql.com
c954c09a11 Fixed test that failed on 32 bit systems 2005-08-09 11:21:45 +03:00
dlenev@mysql.com
0c38d33507 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is
2005-08-09 11:43:55 +04:00
igor@rurik.mysql.com
253883803b Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2005-08-08 16:55:29 -07:00
igor@rurik.mysql.com
73be194f96 subselect.test, subselect.result:
Added a test case for bug #12392.
item_cmpfunc.cc:
  Fixed bug #12392.
  Missing handling of rows containing NULL components
  when evaluating IN predicates caused a crash.
2005-08-08 16:51:12 -07:00
sergefp@mysql.com
c6db76b076 Fix for BUG#12228: SP cache code:
* Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
  sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
* Use new SP Cache use contract in the code.

There is no test case because it doesn't seem to be possible to cause thread races to end
the same way they end in heavy-load test. This patch removes the crash in heavy test.
2005-08-08 23:23:34 +00:00
monty@mysql.com
7b1aed3fba Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2005-08-09 00:15:27 +03: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
patg@krsna.patg.net
6128521b5b item_strfunc.cc:
BUG #11104 
      Took out the offset-=delimiter_length-1 out of the for loop. It was causing
      basically this: 
      select substring_index('the king of the the hill', 'the', -2) to not work.
      The first iteration, offset would be initialised to 24, then strstr would 
      point at 'the king of the the* hill' ('*'means right before the 
      character following), returning a offset of 16. The for loop would then 
      decrement offset by two (3 - 1), to 14, now pointing at 
      "the king of th*e the hill", _skipping_ past the 'e' in the second to last
      'the', and therefore strstr would never have a chance of matching the 
      second to last 'the', then moving on to the 'the' at the begginning of the 
      string!
      In a nutshell, offset was being decremented by too great a value, preventing
      the second to last 'the' from being ever found, hence the result of 
      'king of the the hill' from the query that is reported in the bug report
func_str.test:
  BUG #11104
  Added tests to make sure fix addresses issues in original bug report
func_str.result:
  BUG #11104 
  New results for new tests
2005-08-08 13:46:13 -07:00
jimw@mysql.com
a17fa23332 Merge mysql.com:/home/jimw/my/mysql-5.0-11570
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-08 11:43:07 -07:00
jimw@mysql.com
253d528b14 Fix error code in some tests because of merge 2005-08-08 11:42:09 -07:00