Commit graph

687 commits

Author SHA1 Message Date
mskold/marty@mysql.com/linux.site
625a2629f0 Bug #26242 UPDATE with subquery and triggers failing with cluster tables
In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced
subject table didn't see the results of operation which caused invocation
of those triggers. In other words AFTER trigger invoked as result of update
(or deletion) of particular row saw version of this row before update (or
deletion).

The problem occured because NDB handler in those cases postponed actual
update/delete operations to be able to perform them later as one batch.

This fix solves the problem by disabling this optimization for particular
operation if subject table has AFTER trigger for this operation defined.
To achieve this we introduce two new flags for handler::extra() method:
HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH.
These are called if there exists AFTER DELETE/UPDATE triggers during a
statement that potentially can generate calls to delete_row()/update_row().
This includes multi_delete/multi_update statements as well as insert statements
that do delete/update as part of an ON DUPLICATE statement.
2007-04-04 12:50:39 +02:00
mskold/marty@mysql.com/linux.site
6ac9a28ef0 bug #26225 Engine condition pushdown doesn't work with prepare statements (ps_7ndb): ensure that query plan for prepared statement is analyzed correctly 2007-02-09 16:31:12 +01:00
mskold/marty@mysql.com/linux.site
2d0bd82a06 NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc:
bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
ha_ndbcluster.h:
  Removed stray mthod declaration
2007-02-07 11:36:34 +01:00
mskold/marty@mysql.com/linux.site
0446aa9cbd Fix for bug#25821 Excessive partition pruning for multi-range index scan in NDB API: don't set distribution key if multi_range 2007-02-06 23:06:58 +01:00
mskold/marty@mysql.com/linux.site
c16251ad7c Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: moved back assignment 2007-02-01 09:48:45 +01:00
mskold/marty@mysql.com/linux.site
5cd40ad30b Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: in start_stmt, only change query_state if starting a new transactions, in read_multi_range_next, change query state when end is reached 2007-01-31 22:38:06 +01:00
mskold/marty@mysql.com/linux.site
db0107b801 bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index: Added error checking 2007-01-08 10:38:53 +01:00
mskold/marty@mysql.com/linux.site
8d8d063f91 Removed check for impossible error return 2006-12-14 16:27:14 +01:00
mskold/marty@mysql.com/linux.site
aa03fbcac9 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: only check pk if it is updated 2006-11-30 22:52:23 +01:00
mskold/marty@mysql.com/linux.site
e71c09b482 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: handle INSERT ... ON DUPLICATE KEY UPDATE 2006-11-30 17:22:04 +01:00
mskold/marty@mysql.com/linux.site
af324d9cf0 #18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: call peek_index_rows 2006-11-30 15:02:33 +01:00
mskold/marty@mysql.com/linux.site
f293350725 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values 2006-11-07 16:38:37 +01:00
jonas@perch.ndb.mysql.com
6e4a0ec042 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-10-25 08:28:30 +02:00
stewart@willster.(none)
dc38d0249a fix ndb_cache_multi2
util thread wasn't behaving correctly after 241 error due to get_table_statistics
not properly returning an error code
2006-10-24 23:26:58 +10:00
mskold/marty@mysql.com/linux.site
8da80dd39d Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-10-24 08:29:37 +02:00
stewart@willster.(none)
826628c99b post merge fix 2006-10-24 00:18:57 +10:00
stewart@willster.(none)
3c2eeb2c15 Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2-merge2
into  willster.(none):/home/stewart/Documents/MySQL/5.0/ndb
2006-10-23 23:57:28 +10:00
stewart@willster.(none)
5926602aa7 Bug #19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
fixes for ndb_* tests broken by previous fix

be more careful in ndb about setting errors on failure of info call (especially
in open)
2006-10-23 23:46:35 +10:00
jonas@perch.ndb.mysql.com
470e4daa14 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-10-19 09:38:37 +02:00
jonas@perch.ndb.mysql.com
2b04fb22be ndb - bug#23200
this changes lock taken during peek, to decrease likelyhood of transaction abort
2006-10-19 09:27:58 +02:00
mskold/marty@mysql.com/linux.site
0522b11066 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-10-18 16:41:17 +02:00
mskold/marty@mysql.com/linux.site
b381ed95d9 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2006-10-18 14:28:18 +02:00
mskold/marty@mysql.com/linux.site
e7f69b424a Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-10-16 10:07:19 +02:00
stewart@willster.(none)
c1903d967a Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
into  willster.(none):/home/stewart/Documents/MySQL/5.0/bug19914-mk2-merge
2006-10-16 17:39:38 +10:00
mskold/marty@mysql.com/linux.site
aafe6e4663 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-10-16 08:33:22 +02:00
jonas@perch.ndb.mysql.com
ca4e9be98f Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-10-11 14:02:43 +02:00
mskold/marty@mysql.com/linux.site
42d64e4275 Bug #21072 Duplicate key error in NDB references wrong key: use MAX_KEY to signal unknown key 2006-09-21 16:49:07 +02:00
stewart@willster.(none)
0f3874dffa Merge willster.(none):/home/stewart/Documents/MySQL/4.1/ndb
into  willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
2006-09-20 17:09:53 +10:00
svoj@april.(none)
f21eadfc74 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.0-engines
2006-09-18 16:23:45 +05:00
mskold/marty@mysql.com/linux.site
528e8b4c0e Bug #21056 ndb pushdown equal/setValue error on datetime: post review fixes, use my_bitmap 2006-09-15 15:51:05 +02:00
mskold/marty@mysql.com/linux.site
9ff78327b9 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-09-13 18:50:47 +02:00
mskold/marty@mysql.com/linux.site
4979d1526c Bug #21378 Alter table from X storage engine to NDB could cause data loss: skip autodiscover of local tables 2006-09-13 18:49:05 +02:00
mskold/marty@mysql.com/linux.site
bf52d20b4b Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-09-12 16:24:39 +02:00
mskold/marty@mysql.com/linux.site
125df80e9b Bug #21378 Alter table from X storage engine to NDB could cause data loss: Added warning if local table shadows ndb table 2006-09-12 16:04:52 +02:00
mskold/marty@mysql.com/linux.site
6752861d1b Bug #21056 ndb pushdown equal/setValue error on datetime: only pushdown like of string type fields 2006-09-05 17:07:00 +02:00
guilhem@gbichot3.local
e4d3595b18 Fix for BUG#11151 "LOAD DATA INFILE commits transaction in 5.0".
In 5.0 we made LOAD DATA INFILE autocommit in all engines, while
only NDB wanted that. Users and trainers complained that it affected
InnoDB and was a change compared to 4.1 where only NDB autocommitted.
To revert to the behaviour of 4.1, we move the autocommit logic out of mysql_load() into
ha_ndbcluster::external_lock().
The result is that LOAD DATA INFILE commits all uncommitted changes
of NDB if this is an NDB table, its own changes if this is an NDB
table, but does not affect other engines.
Note: even though there is no "commit the full transaction at end"
anymore, LOAD DATA INFILE stays disabled in routines (re-entrency
problems per a comment of Pem).
Note: ha_ndbcluster::has_transactions() does not give reliable results
because it says "yes" even if transactions are disabled in this engine...
2006-09-05 16:52:05 +02:00
acurtis/antony@xiphis.org/ltantony.xiphis.org
678e15174e Bug#20573
"strict mode: inserts autogenerated auto_increment value bigger than max"
  Strict mode should fail if autoincrement value is out of range
2006-08-30 13:20:39 -07:00
lzhou/root@dev3-138.dev.cn.tlan
3140881459 Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  dev3-138.dev.cn.tlan:/home/zhl/mysql/mysql-5.0/mysql-5.0-ndb-bj
2006-08-28 16:18:48 +00:00
jonas@perch.ndb.mysql.com
4cab70171e Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-08-23 11:00:29 +02:00
pekka@orca.ndb.mysql.com
9dc6087d4d ndb - post-merge fix 5.0 to 5.0-ndb: number of frags if --without-big-tables 2006-08-22 14:26:56 +02:00
mskold/marty@mysql.com/linux.site
c8b93da355 Fix for bug #21059 Server crashes on join query with large dataset with NDB tables: do not release operation records for on-going read_multi_range 2006-08-15 14:31:21 +02:00
jonas@perch.ndb.mysql.com
3cd1826ef0 ndb - bug#20708
init ndb_cache_check_time and honor value in my.cnf
2006-08-15 14:22:47 +02:00
mskold/marty@mysql.com/linux.site
66e8255491 Merge mysql.com:/windows/Linux_space/MySQL/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0
2006-08-15 13:37:39 +02:00
mskold/marty@mysql.com/linux.site
6a3143e2a0 ndb_lock.test, ndb_lock.result:
bug #18184  SELECT ... FOR UPDATE does not work..: New test case
ha_ndbcluster.h, ha_ndbcluster.cc, NdbConnection.hpp:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
2006-08-15 13:12:27 +02:00
justin.he@qa3-104.qa.cn.tlan
265b9cf6cd BUG#20848 SHOW STATUS LIKE 'NDB%' should be data nodes not storage nodes
use correct termninology
2006-08-11 15:10:08 +08:00
stewart@willster.(none)
9d2e6b8d23 BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
allow handler::info to return an error code (that will be returned to the user)
2006-08-10 22:55:20 +08:00
kostja@bodhi.local
7bf73ac3e5 Merge bodhi.local:/opt/local/work/mysql-5.0-root
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2006-07-07 22:09:43 +04:00
dlenev@mysql.com
b429748fab Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/home/dlenev/mysql-5.0-bg18437-3
2006-07-06 14:31:32 +04:00
tomas@poseidon.ndb.mysql.com
0b2024ac88 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
2006-07-04 12:47:07 +02:00
tomas@poseidon.ndb.mysql.com
98874725e0 Bug #20784 Uninitialized memory in update on table with PK not on first column
- partial backport of code from 5.1, do cot compare_record for engines that do not read all columns during update
2006-07-04 11:43:06 +02:00