Commit graph

342 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03: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
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
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
monty@mysql.com
79909808d8 After merge fix 2005-05-17 23:52:36 +03: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
dlenev@brandersnatch.localdomain
6b0b4734d9 Fix for bug #9486 "Can't perform multi-update in stored procedure".
New more SP-locking friendly approach to handling locks in multi-update.
Now we mark all tables of multi-update as needing write lock at parsing
stage and if possible downgrade lock at execution stage (For its work
SP-locking mechanism needs to know all lock types right after parsing
stage).
2005-04-15 20:31:47 +04:00
bell@sanja.is.com.ua
1659dacab1 fixed mechanism of detection selection from table wich we update
(BUG##9398, BUG#8703)
fixed wrong join view detection in multi-delete which lead to server crash
2005-03-28 15:13:31 +03: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
jani@a193-229-222-105.elisa-laajakaista.fi
1fbb61754b Fixed two bugs in MySQL ACL.
First one is related to Bug#7905. One should not be allowed to
create new user with password without UPDATE privilege to
MySQL database. Furthermore, executing the same GRANT statement
twice would actually crash the server and corrupt privilege database.

Other bug was that one could update a column, using the existing
value as basis to calculate the new value (e.g. UPDATE t1 SET a=a+1)
without SELECT privilege to the field (a in the above example)

Fixed tests grant.pl and grant2, which were wrong.
2005-03-17 08:16:56 +02:00
monty@mysql.com
594ef41b2d Cleanup during reviews
Removed some optional arguments
Fixed portability problem in federated tests
2005-03-16 16:11:01 +02:00
dlenev@mysql.com
5b16dbf960 Manual merge SP-locking improvements patch with current tree. 2005-03-04 17:46:45 +03:00
dlenev@brandersnatch.localdomain
5a6c7027f0 Better approach for prelocking of tables for stored routines execution
and some SP-related cleanups.

- We don't have separate stage for calculation of list of tables
  to be prelocked and doing implicit LOCK/UNLOCK any more.
  Instead we calculate this list at open_tables() and do implicit
  LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
  Also now we support cases when same table (with same alias) is
  used several times in the same query in SP.

- Cleaned up execution of SP. Moved all common code which handles
  LEX and does preparations before statement execution or complex
  expression evaluation to auxilary sp_lex_keeper class. Now 
  all statements in SP (and corresponding instructions) that
  evaluate expression which can contain subquery have their
  own LEX.
2005-03-04 16:35:28 +03: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
monty@mysql.com
e2ea35ec67 Merge with 4.1 2005-02-22 15:47:00 +02:00
mats@mysql.com
0ad02a920c Merge from 4.0 2005-02-18 14:19:08 +01:00
mats@mysql.com
d0f1b5f3fd Merge mysql.com:/home/bkroot/mysql-4.0
into mysql.com:/home/bk/b7879-mysql-4.0
2005-02-18 13:50:19 +01:00
serg@serg.mylan
530eecbd99 Merge serg.mylan:/usr/home/serg/Abk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa
2005-02-17 14:00:44 +01:00
monty@mysql.com
410e51c854 Fixed failing test cases 'row.test' when running with --ps-protocol
Simple optimzations done while reviewing code
2005-02-15 16:45:00 +02:00
mats@mysql.com
625f7f0d55 Bug#7879: Using TL_READ_NO_INSERT locks instead of TL_READ locks when
reading tables in "complex" SQL statements. If inserts happen in a
table being read, the statements have no serialization order and the
change can therefore not be reproduced on the slave.
2005-02-15 11:02:01 +01:00
serg@serg.mylan
fd828e5b4d manually merged 2005-02-14 21:50:09 +01:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
422c2eb868 4.1 -> 5.0 merge 2005-02-03 13:18:30 +02:00
monty@mysql.com
3936edd7fa Fixed during review of new pulled code 2005-02-02 20:28:01 +02:00
serg@serg.mylan
33fc4b10b6 configure.in
don't define UNIV_DEBUG in CFLAGS/CXXFLAGS anymore
sql/mysqld.cc
    hide from the user options that do nothing
sql/sql_update.cc
    better fix for uninitialized used_index
2005-02-02 12:08:20 +01:00
acurtis@pcgem.rdg.cyberkinetica.com
6a354b1b04 Bug#7011
Merge from 4.0
2005-01-31 12:48:00 +00:00
acurtis@pcgem.rdg.cyberkinetica.com
500fbf5c0f Bug#7011
Fix replication for multi-update
  new test - rpl_multi_update2
2005-01-30 10:24:03 +00:00
serg@serg.mylan
3c5060981f query_id and my_xid -> ulonglong
fix for binlog+autocommit+tclog
comments, style fixes
2005-01-27 22:38:56 +01:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
monty@mysql.com
314cf993c6 Fixed memory reference errors found by valgrind 2005-01-12 03:38:53 +02:00
monty@mysql.com
bda0a78184 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-01-06 13:31:31 +02:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
bell@sanja.is.com.ua
a8a5f3590c fixed bugs in view code with prepared statemnts 2005-01-04 18:04:16 +02:00
monty@mysql.com
7cf8285b3f After merge fixes
Add support for warnings for prepare of prepared statements
Fixed test to work with --ps-protocol
Fixed some test results
2005-01-04 13:46:53 +02:00
monty@mysql.com
309b1a2b6c Merge with 4.1 tree to get fix for INSERT IGNORE ... ON DUPLICATE KEY 2005-01-03 23:04:52 +02:00
monty@mysql.com
2299e1eca4 Better handling of ensuring that setup_tables() are not called twice
This fixed a bug in prepared statements when used with outher joins
Fixed a bug in SUM(DISTINCT) when used with prepared statements.
Some safety fixes in test scripts to ensure that previous test failures shouldn't affect other tests
2005-01-03 21:04:33 +02:00
monty@mysql.com
1bd22faa05 Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
This allows use to use INSERT IGNORE ... ON DUPLICATE ...
2004-12-31 12:04:35 +02:00
monty@mysql.com
d71c030587 After merge fixes 2004-12-31 00:44:00 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
1be319a708 Merge Bug#7391 from 4.0 2004-12-18 15:12:10 +00:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
1e07c1a6c1 Remove bogus lines 2004-12-18 02:34:11 +00:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
3047649845 Bug#7391 - Multi-table UPDATE security regression
Add in missing privilege checks. 
  Tests for the privileges.
2004-12-18 02:07:32 +00:00
dlenev@mysql.com
62a6d9749b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
2004-12-09 13:33:12 +03:00
dlenev@brandersnatch.localdomain
4b0882e0a6 Fix for bug #6765 "Implicit access to time zone description
tables requires privileges for them if some table or column level grants
present" (with after-review fixes).

We should set SELECT_ACL for implicitly opened tables in 
my_tz_check_n_skip_implicit_tables() to be able to bypass privilege
checking in check_grant(). Also we should exclude those tables from
privilege checking in multi-update.
2004-12-09 13:31:46 +03:00
monty@mysql.com
75d0958dc3 After merge fixes
Fixed compiler warnings
Fix core dump when sending SIGHUP to mysqld
2004-12-06 17:15:54 +02:00
mskold@mysql.com
f6209be015 New fix for bug#6796 Wrong outcome of update operation of ndb table 2004-12-06 14:34:02 +01:00
mskold@mysql.com
75da2fb3f4 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1
2004-12-06 14:15:52 +01:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00