Commit graph

424 commits

Author SHA1 Message Date
serg@serg.mylan
14f94dc0ca many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
timour@mysql.com
cc7d1268c4 WL#2486 - Natural/using join according to SQL:2003.
Post-review fixes according to Monty's review.
2005-11-28 21:57:50 +02:00
konstantin@mysql.com
b1d951d462 Always initialize THD::thread_stack: it's used in
check_stack_overrun().
2005-11-23 21:18:10 +03:00
monty@mysql.com
5513ab69b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-12 00:59:52 +03:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
serg@serg.mylan
e91712d9bb pthread_handler_decl() changed to be ctags-friendly
(and contain extern "C" when necessary)
2005-10-08 16:39:55 +02:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
dlenev@mysql.com
e231ebe5fb Fix for bug #12704 "Server crashes during trigger execution".
This bug occurs when some trigger for table used by DML statement is created
or changed while statement was waiting in lock_tables(). In this situation
prelocking set which we have calculated becames invalid which can easily lead
to errors and even in some cases to crashes.

With proposed patch we no longer silently reopen tables in lock_tables(),
instead caller of lock_tables() becomes responsible for reopening tables and
recalculation of prelocking set.
2005-09-15 03:56:09 +04:00
bell@sanja.is.com.ua
da64c1eab3 postmerge changes 2005-09-02 09:50:17 +03:00
bell@sanja.is.com.ua
144c847da6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-08-23 23:17:36 +03:00
monty@mysql.com
3eaa953529 Cleanups and optimization during review of new code 2005-08-18 03:12:42 +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
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
acurtis@xiphis.org
015447b211 Bug#10109
"INSERT .. SELECT ... ON DUPLICATE KEY UPDATE fails"
  Ensure that check_insert_fields() is only called once when
  doing an INSERT..SELECT
2005-08-07 03:16:15 +01:00
bell@sanja.is.com.ua
4c69fbe632 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
jimw@mysql.com
4cf8696eae Fix crash in 'INSERT DELAYED' statement that failed due to a
conflict in a unique key. (Bug #12226)
2005-08-01 17:00:03 -07:00
konstantin@mysql.com
9c6f14aa3d Get rid of checking for ETIME return value of pthread_cond_timedwait.
ETIME was returned by cond_timedwait (sic, the pre-POSIX1001b function) on 
Solaris 2.6 and 2.7. pthread_cond_timedwait on Solaris returns ETIMEDOUT.
The standard requirement is that the only additional return value
of pthred_cond_timedwait compared to pthread_cond_wait is ETIMEDOUT.
Let us not bloat the application code with redundant checks,
and if we're ever to work on a platform that returns a non-standard 
value, we should write a wrapper for that platform (like we do, e.g., for
Windows).
2005-07-14 19:42:56 +04:00
kent@mysql.com
aab8220342 Merge 2005-07-13 02:39:23 +02:00
reggie@linux.site
d502f28f1c sql_insert.cc:
Added cast to bool to fix windows compile problem
2005-07-11 04:33:19 -06:00
kent@mysql.com
8295cec7bc sql_insert.cc:
Use the test() macro instead of assigning a pointer to a bool
2005-07-08 14:59:02 +02:00
jimw@mysql.com
8e731bbede Fix typos that crept into ChangeSet for fix for Bug #11045. 2005-07-06 18:56:10 -07:00
jimw@mysql.com
f1ac600a7e Merge jwinstead@production.mysql.com:my/mysql-5.0-11045
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-06 16:49:04 -07:00
monty@mysql.com
75ff7d8085 After merge fixes
Better fix for ON DUPLICATE KEY UPDATE
2005-07-04 03:24:25 +03:00
monty@mysql.com
86d7b02199 Merge with 4.1 2005-07-03 14:17:52 +03:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
monty@mysql.com
10c4678def Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms
2005-06-28 15:06:16 +03:00
monty@mishka.local
83f90e060e Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part
2005-06-27 16:46:41 +03:00
evgen@moonbone.local
473d7d59a7 Fix for bug #10886 merge 2005-06-22 21:07:28 +04:00
svoj@mysql.com
a8bcb25eda Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/svoj/devel/mysql/yassl-mysql-5.0
2005-06-22 14:11:23 +05:00
svoj@mysql.com
74373e7d54 WL#2286 - Compile MySQL w/YASSL support
Fix GCC 4.0 link failure.
Better CXX_VERSION guessing.
2005-06-22 14:08:28 +05:00
evgen@moonbone.local
b625e43485 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  moonbone.local:/work/mysql-4.1-bug-10886
2005-06-21 22:25:49 +04:00
evgen@moonbone.local
dc381ea960 Fix bug #10886 - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produces bad results
Temporary field wasn't restored to default values after ON DUPLICATE KEY
 UPDATE event, which results in wrong data being inserted in new record.
2005-06-21 22:24:58 +04:00
dlenev@mysql.com
e28264d29f Manual merge of patch for bug#11060 "Server crashes on calling stored
procedure with INSERT SELECT UNION SELECT" aka "Server crashes on
re-execution of prepared INSERT ... SELECT with UNION" into 5.0 tree.
2005-06-20 16:58:02 +04:00
dlenev@brandersnatch.localdomain
d07843efd9 Fix for bug #11060 "Server crashes on re-execution of prepared
INSERT ... SELECT with UNION" (reviewed version).

Altough bug manifest itself only starting from 5.0 it is better to
apply fix to 4.1 to keep some assumptions true and make code more
future-proof.
2005-06-20 16:07:00 +04:00
svoj@mysql.com
7660f609e6 WL#2286 - Compile MySQL w/YASSL support
Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++.
These compilers have problem with implicit template instantiation in archives
(libyassl.a, libtaocrypt.a). Instantiate templates explicitly.

Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines
__cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined.
2005-06-19 21:46:44 +05:00
jimw@mysql.com
f2b0874f80 Clean up warnings and build problems on Windows. (Bug #11045) 2005-06-18 01:55:42 +02:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
monty@mysql.com
dec2607e1d Ensure that we reset auto-increment cache if we have to do an UPDATE becasue of REPLACE
This fixes bug #11080: Multi-row REPLACE fails on a duplicate key error
2005-06-06 20:41:52 +03:00
monty@mysql.com
4b7882dc73 merge 2005-06-05 17:19:50 +03:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
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
2005-06-03 23:46:03 +03:00
brian@zim.(none)
113a99626d Merge of 4.1->5.0. This contained the fixes for GCC 4.0 2005-06-01 21:56:30 -07:00
brian@zim.(none)
efb5ed5bab Merge 2005-06-01 18:48:29 -07:00
brian@zim.(none)
ba9b9f8993 Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina. 2005-06-01 17:34:10 -07:00
monty@mysql.com
a69f432115 Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge
2005-06-01 16:35:09 +03:00
ingo@mysql.com
0a1e38b7ed Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Manual merge from 4.1.
2005-06-01 11:15:21 +02:00
ingo@mysql.com
c420599581 Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Hand merged from 4.0.
2005-05-31 19:37:24 +02:00
ingo@mysql.com
51d80960ea Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
Used the new option in create_table_from_items().
It is necessary to prevent the SELECT table from being reopend.
It would get new storage assigned for its fields, while the
SELECT part of the command would still use the old (freed) storage.
2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
against a global read lock. This prevents a deadlock in
CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
and avoids the creation of new tables during a global read lock.
3.) Replaced set_protect_against_global_read_lock() and
unset_protect_against_global_read_lock() by
wait_if_global_read_lock() and start_waiting_global_read_lock()
in the INSERT DELAYED handling.
2005-05-31 11:08:14 +02:00
konstantin@mysql.com
e315f903d0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-new
2005-05-30 20:56:11 +04:00
konstantin@mysql.com
2d6a70c42a Preparatory (and the most problematic) patch for Bug#7306
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.
2005-05-30 20:54:37 +04:00