Commit graph

401 commits

Author SHA1 Message Date
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
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
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
monty@mysql.com
dab33061ff Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-25 18:38:29 +03:00
monty@mysql.com
5f8f947f34 Cleanup's during review
Added ASSERT() to detect wrongly packed fields
2005-05-25 18:33:32 +03:00
dlenev@mysql.com
1449d44e1c Manual merge of patch fixing several trigger related bugs with main tree. 2005-05-24 22:35:41 +04:00
dlenev@brandersnatch.localdomain
007a205918 Fix for bugs:
#5860 "Multi-table UPDATE does not activate update triggers"
 #6812 "Triggers are not activated for INSERT ... SELECT"
 #8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. 
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.

I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.
2005-05-24 22:19:33 +04:00
jimw@mysql.com
d5ee234917 Fixes to merge from 4.1 2005-05-18 15:40:34 -07:00
jimw@mysql.com
b7079ed027 Resolve merge from 4.1 2005-05-18 13:54:36 -07:00
ingo@mysql.com
26f2e57ecb Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
After review version.
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().
2005-05-18 19:40:39 +02:00
ramil@mysql.com
86538b338b Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/ram/work/5.0.b6267
2005-05-18 12:41:36 +05:00
ramil@ram-book.(none)
d85e052d71 a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
the behavior of enum changed to be consistent.
2005-05-13 16:44:14 +05:00
igor@rurik.mysql.com
3351233349 Manual merge 2005-05-10 16:41:47 -07:00
igor@rurik.mysql.com
9d4b228b61 Many files:
Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
view.test:
  Added test case for bug #8528.
view.result:
  Added test case for bug #8528. Fixed other test cases.
2005-05-10 16:31:13 -07:00
antony@ltantony.mysql.com
4fe845e8d0 Merge 2005-05-07 16:50:22 +01:00
antony@ltantony.mysql.com
1ebc9e37ea Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
INSERT IGNORE...UPDATE causes break in protocol or unknown error message.
  Fix so that protocol doesn't break by properly ignoring dups.
2005-05-07 13:31:37 +01:00
monty@mysql.com
28a5491d3d Merge with 4.1 2005-04-30 09:46:08 +03:00
monty@mysql.com
b40756c27e Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2005-04-28 00:41:39 +03:00
ingo@mysql.com
731c8da030 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
After merge fix.
2005-04-27 22:58:11 +02:00
ingo@mysql.com
15f9556ca2 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
Merge from 4.1
2005-04-27 21:02:38 +02:00
ingo@mysql.com
1df110057c Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
After merge fix.
2005-04-27 20:54:19 +02:00
ingo@mysql.com
0998abc831 Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock
Added protection against global read lock while creating and
initializing a delayed insert handler.
Allowed to ignore a global read lock when locking the table
inside the delayed insert handler.
Added some minor improvements.
2005-04-27 12:40:37 +02:00
monty@mysql.com
972f86f1ee Cleanups during review 2005-04-26 23:24:59 +03:00
ingo@mysql.com
d859eafa83 Bug#7806 - insert on duplicate key and auto-update of timestamp
Merged fix for bugfix to 5.0.
2005-04-22 17:13:18 +02:00
ingo@mysql.com
0e7f6a601f Bug#7806 - insert on duplicate key and auto-update of timestamp
A fix of the original patch.
Correctly clear a bit from an enum value.
2005-04-22 12:30:09 +02:00
msvensson@neptunus.(none)
0c23f81dcb C99 Portability fix 2005-04-21 21:47:58 +02:00