Commit graph

387 commits

Author SHA1 Message Date
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
acurtis@xiphis.org
310c360465 C99 Portability fix 2005-04-21 18:38:34 +01:00
ingo@mysql.com
eeda9b3f8c After merge fix. 2005-04-21 10:29:05 +02:00
ingo@mysql.com
692093c041 Hand merge, which needs fixes. 2005-04-20 15:50:29 +02:00
ingo@mysql.com
792b816b1b Bug#7806 - insert on duplicate key and auto-update of timestamp
Modified the check for the timestamp field so that the flags for
the automatic for inserts and updates are cleared independently.
2005-04-19 15:12:32 +02:00
jimw@mysql.com
b95cb4e654 Merge 2005-04-05 19:45:34 -07:00
jimw@mysql.com
ee2b4ec959 Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
2005-03-18 16:12:25 -08:00
dlenev@brandersnatch.localdomain
3b6aeddc11 Fix for sp.test failure in --ps-protocol mode (2nd attempt).
Now we should call open_and_lock_tables() even if table list is empty -
to cache stored routines used by query and open and lock tables required
for their execution.
2005-03-10 16:05:48 +03:00
monty@mysql.com
3839e443a4 merge with 4.1 2005-02-28 12:18:39 +02:00
monty@mysql.com
253bfcf783 Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)
2005-02-28 11:59:46 +02:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
serg@serg.mylan
c0dda01f76 Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa
2005-02-18 12:02:46 +01:00
acurtis@pcgem.rdg.cyberkinetica.com
647eaaea1d Bug#8147
Merge from 4.1
2005-02-17 17:38:13 +00:00
serg@serg.mylan
fd828e5b4d manually merged 2005-02-14 21:50:09 +01:00
monty@mysql.com
209190d3df Review fixed 2005-02-02 22:39:21 +02:00