Commit graph

664 commits

Author SHA1 Message Date
ingo@mysql.com
ef52a59418 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug5390
2005-12-27 10:31:00 +01:00
ingo@mysql.com
a04c5adb0b BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.1.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
2005-12-22 13:48:00 +01:00
lars@mysql.com
ad126d90e0 WL#1012: All changes as one single changeset.
This includes both code and test cases.
2005-12-22 06:39:02 +01:00
ingo@mysql.com
b0e84cb999 BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
2005-12-20 16:35:05 +01:00
jimw@mysql.com
00d29cd259 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-12-12 11:57:07 -08:00
jimw@mysql.com
e18679c7ff Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-12-12 10:11:56 -08:00
jimw@mysql.com
f7ff3d653a Fix calls to free_underlaid_joins() in INSERT, DELETE, and UPDATE
handling so that indexes are closed before trying to commit the
transaction. (Bug #15536)
2005-12-08 12:33:33 -08:00
ingo@mysql.com
5aa315e23a BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables() 
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
2005-12-07 19:52:26 +01:00
igor@rurik.mysql.com
09e6597015 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-12-02 20:42:36 -08:00
evgen@moonbone.local
f2559fbcc3 Merge moonbone.local:/work/15028-bug-5.0-mysql
into moonbone.local:/work/15028-bug-5.1-new-mysql
2005-12-02 22:07:10 +03:00
evgen@moonbone.local
00b902b065 Manually merged 2005-12-02 19:42:14 +03:00
evgen@moonbone.local
3f72e7645f Fix bug#15028 Multitable update returns different numbers of matched rows
depending on table order

multi_update::send_data() was counting updates, not updated rows. Thus if one 
record have several updates it will be counted several times in 'rows matched'
but updated only once.

multi_update::send_data() now counts only unique rows.
2005-12-01 23:22:20 +03:00
pem@mysql.com
b2a9961abf Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new
2005-11-28 20:14:12 +01:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
pem@mysql.com
0411412403 Fixed BUG#13729 Stored procedures: packet error after exception handled
Don't set thd->is_fatal_error in sql_update for duplicate key errors.
2005-11-23 11:56:53 +01:00
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
igor@rurik.mysql.com
8e8a2d79cc Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-11-04 17:54:47 -08:00
monty@mysql.com
a6f5375cb0 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-05 01:32:55 +02:00
monty@mysql.com
164b469660 Fixed wrong merge
Optimize new pushed code
2005-11-02 14:43:25 +02:00
evgen@moonbone.local
6d3bd1e0ee sql_update.cc:
After merge fix
2005-11-01 20:53:27 +03:00
evgen@moonbone.local
bbe58c7e26 Manually merged 2005-11-01 19:47:53 +03:00
igor@rurik.mysql.com
6a1c8d48f6 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-10-29 09:41:18 -07:00
sergefp@mysql.com
eb57f520ba Merge 2005-10-28 22:31:41 +04:00
bell@sanja.is.com.ua
b5d2e34572 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner7-5.0
2005-10-28 10:12:36 +03:00
igor@rurik.mysql.com
30a7c28603 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-10-27 21:37:52 -07:00
evgen@moonbone.local
77723c2438 Fix bug#14186 select datefield is null not updated
Date field was declared as not null, thus expression 'datefield is null'
was always false. For SELECT special handling of such cases is used. 
There 'datefield is null' converted to 'datefield eq "0000-00-00"'.

In mysql_update() before creation of select added remove_eq_conds() call.
It makes some optimization of conds and in particular performs conversion
from 'is null' to 'eq'. 
Also remove_eq_conds() makes some evaluation of conds and if it founds that
conds is always false then update statement is not processed further.
All this allows to perform some update statements process faster due to
optimized conds, and not wasting resources if conds known to be false.
2005-10-28 01:24:11 +04:00
bell@sanja.is.com.ua
1b164c7b83 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
jani@ua141d10.elisa.omakaista.fi
cbe21a8eb6 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
2005-10-27 23:43:20 +03:00
sergefp@mysql.com
56aeee44d3 Fix for BUG#14272: Don't run index scan when we should use quick select.
This could cause failures because there are table handlers (like federated)
that support quick select scanning but do not support index scanning.
2005-10-25 16:34:03 +04:00
monty@mysql.com
3e653fb922 Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization 2005-10-25 02:27:40 +03:00
igor@rurik.mysql.com
a236acce10 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
2005-10-22 19:35:37 -07:00
sergefp@mysql.com
e7065d355c BUG#121915: Merge 4.1->5.0 2005-10-19 01:52:06 +04:00
sergefp@mysql.com
d6903c4566 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug12915-r2
2005-10-18 14:08:50 +04:00
igor@rurik.mysql.com
c136e9c43b Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
2005-10-15 14:32:37 -07:00
bell@sanja.is.com.ua
6d6e107f12 - set 'updating' in both tables list if we have two of them (because of subquery) (BUG#13236)
- fixed test
2005-10-14 00:02:38 +03:00
lars@mysql.com
57f36732ca Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-5.0
2005-10-10 17:50:19 +02:00
lars@mysql.com
998380521f BUG#12618: Removing fake locking 2005-10-10 15:10:14 +02:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
sergefp@mysql.com
e9f2f9437a BUG#12915: Added single-table UPDATE/DELTE ... ORDER BY ... LIMIT
optimization: now can use index to find records to update/delete
when there is no WHERE clause.
2005-09-30 15:21:37 +04:00
msvensson@neptunus.(none)
fbf4a5e079 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-28 11:34:53 +02:00
monty@mysql.com
ea6d5f9ec3 Fixed error found during review of new pushed code 2005-09-25 21:22:23 +03:00
guilhem@mysql.com
388cf622ee Fix fur BUG#13348: "multi-table updates and deletes are not logged if no rows were affected".
Not fixed in 4.1 as not critical. Also I'm correcting error checking of multi-UPDATE/DELETE
when it comes to binlogging, to make it consistent with when we rollback the statement.
2005-09-20 17:41:47 +02:00
ndbdev@dl145c.mysql.com
dc595c9b1d merge 2005-09-15 07:36:47 +02:00
dlenev@mysql.com
2a96aa110f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg12704-2
2005-09-15 03:57:59 +04: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
tulin@dl145c.mysql.com
80da104ea5 merge 2005-09-14 13:37:52 +02:00
gluh@eagle.intranet.mysql.r18.ru
cc395fc0c2 Bug#9683 INFORMATION_SCH: Creation of temporary table allowed in
Information_schema DB 
Bug#9846 Inappropriate error displayed while
         dropping table from 'INFORMATION_SCHEMA'
Bug#10734 Grant of privileges other than 'select' and 
         'create view' should fail on schema 
Bug#10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA

 cumulative fix for bugs above(after review, 2nd version)
 added privilege check for information schema db & tables
2005-09-13 16:07:38 +05:00
ndbdev@dl145c.mysql.com
f40c1576b0 Merge 2005-09-06 09:20:15 +02:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
02056f8e3a Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-25 13:11:38 -04: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
1a6f16edd9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-08-15 18:35:48 +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
monty@mysql.com
4c0d23e156 Fixes during review of new pushed code
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
2005-08-12 13:54:42 +03:00
dlenev@mysql.com
0f75d64734 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11973-2
2005-08-11 10:39:33 +04:00
dlenev@mysql.com
60511c3df2 Clumsy but working fix for bug #11973 "SELECT .. INTO var_name; in trigger
cause crash on update".

Let us update "thd" pointer in LEX, all its units and in LEX::result before
executing statement in trigger body, since triggers are associated with TABLE
object and because of this can be used in different threads.
2005-08-10 00:23:56 +04:00
dlenev@mysql.com
615baa9f23 Fix for bug #10055 "Using stored function with information_schema causes empty
result set".

To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
2005-08-08 17:46:06 +04: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
mronstrom@mysql.com
67087e2aa7 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
tomas@poseidon.ndb.mysql.com
911d878ca9 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1
2005-07-15 15:08:38 +02:00
marko@hundin.mysql.fi
bf7b47d92e sql_update.cc:
mysql_update(): Call handler::unlock_row()
  also in the first while loop.
  This patch is from Heikki,
  and it was approved by Sergei Golubchik.
2005-07-13 16:13:36 +03:00
tomas@poseidon.ndb.mysql.com
674b6bb151 Merge 2005-07-12 20:01:22 +02:00
bell@sanja.is.com.ua
d3905f3d0e Name resolution context added (BUG#6443) 2005-07-01 07:05:42 +03:00
ndbdev@dl145b.mysql.com
161a58ab4b merge 2005-06-06 23:39:19 +02: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
tomas@poseidon.ndb.mysql.com
5088b28d09 Merge 2005-05-31 14:37:47 +02: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
tulin@dl145c.mysql.com
03590c20bd merge 2005-05-18 22:26:23 +02:00
monty@mysql.com
79909808d8 After merge fix 2005-05-17 23:52:36 +03:00
tulin@dl145c.mysql.com
23f79bd1f2 merge 2005-05-17 10:17:53 +02:00
mronstrom@mysql.com
c33a0673a6 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/Users/mikron/wl1682
2005-05-12 12:01:01 +02: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
mronstrom@mysql.com
aedc92ab39 After review fixes 2005-05-09 10:30:25 +02:00
mronstrom@mysql.com[mikron]
4bfdc6c9c3 wl2445.patch 2005-05-07 14:06:07 +02:00
mronstrom@mysql.com
b4ab00df62 WL 1682: Bitvector for updated/read fields in handler interface
Fixed clear issues of bitvector and memory allocation issues
2005-05-07 10:00:25 +02:00
mronstrom@mysql.com
f7cd6b8aa1 WL 1682: After review fixes + update bitvector class + bitvector test
cases + bug fixes
2005-05-02 15:45:33 +02:00
mronstrom@mysql.com
21347433cf WL 1682: Use bitvector instead of query_id to tell handler which fields
to read and write
Changed Server code, added new interface to handler and changed the
NDB handler, InnoDB handler and Federated handler that previously used
query_id
Bug#10202 fix (one-liner fix for memory leak)
2005-04-28 14:45:27 +02: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
mats@mysql.com
2bbdf2403d Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the
  database created when checking conditions for replication.
  CREATE/DROP/ALTER DATABASE statements are now replicated based on
  the manipulated database.
2004-12-03 12:13:51 +01:00
mskold@mysql.com
065184dac3 Fix for Bug #6794 Wrong outcome of update operation of ndb table 2004-11-28 22:28:36 +01:00
bell@sanja.is.com.ua
a1cac9687e spelling fixed/comments added (postreview fixes) 2004-11-25 09:28:32 +02:00
bell@sanja.is.com.ua
1e3d8b0839 post-merge fix 2004-11-25 02:23:13 +02:00
bell@sanja.is.com.ua
072d38eb12 merge 2004-11-21 20:08:12 +02:00
bell@sanja.is.com.ua
21eb2e2eae post merge 2004-11-21 19:33:49 +02:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
konstantin@mysql.com
1d32e06be9 Few more places with thd->lex replaced with lex (mysql_update,
check_simple_select). This change was inspired by Monty in December 2003
when thd->lex became a pointer in 4.1.
2004-11-11 22:37:48 +03:00
bell@sanja.is.com.ua
0ef0b030a5 merge 2004-11-11 21:18:10 +02:00
bell@sanja.is.com.ua
a41ef77b7b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0
2004-11-08 03:33:52 +02:00
bell@sanja.is.com.ua
9d0bb7426a postreview fixes 2004-11-08 01:54:23 +02:00
bell@sanja.is.com.ua
7eae926e26 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0
2004-11-06 12:46:46 +02:00
bell@sanja.is.com.ua
064b02203f new lock for multiupdate:
- open and create derived tables
- detect which tables should be locked for write
- lock and fill derived tables
some unitialized variables fixed
2004-11-05 17:29:47 +02:00
monty@mysql.com
47bbf768d4 Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
2004-11-03 12:39:38 +02:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bell@sanja.is.com.ua
3d389a038e fixed detection of updating table on which we select (BUG#6032) 2004-10-25 17:32:28 +03:00
bell@sanja.is.com.ua
4714a6e744 errors without code removed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
2004-10-20 04:04:37 +03:00
bell@sanja.is.com.ua
c287345cb8 fixed incorrect type custing (fixed problem with runing tests with --debug (thanks, Sergei Gluhov spoted it)) 2004-10-09 18:51:19 +03:00
bell@sanja.is.com.ua
c8d5f8991d merge 2004-10-07 11:36:46 +03:00
monty@mysql.com
6239edc1d1 After merge fixes
Some bigger code changes was necessary becasue of the multi-table-update and the new HANDLER code
2004-10-07 10:50:13 +03:00
bell@sanja.is.com.ua
3ef0b19cd3 fixed & added comments (according to Igor's review and a bit more) 2004-10-07 01:45:06 +03:00
monty@mysql.com
62f3cd6a31 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
2004-10-06 19:14:33 +03:00
monty@mysql.com
c27d22b44e Reverted patch for new usage of open_count as it caused more problems than it solved
Cleaned up patch for checking locks for multi-table updates
2004-10-06 01:24:21 +03:00
bell@sanja.is.com.ua
a78f817d20 merge 2004-10-05 13:41:51 +03:00
monty@mishka.local
5eca078b19 merge 2004-10-05 01:10:23 +03:00
monty@mishka.local
0fa62b691b Fixed bug in strict mode (A state was not properly cleared on successful insert/update's) 2004-10-05 01:05:15 +03:00
bell@sanja.is.com.ua
9062e99ee6 merge 2004-10-04 13:56:48 +03:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
2973a047ea Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced.
2004-10-03 00:20:47 +01:00
monty@mishka.local
be4ca46fbe More fixes for strict mode:
More tests.
Better error messages.
Fixed bug when checking if we updated all needed columns for INSERT.
Give an error if we encounter a wrong float value during parsing.
Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS.
Fixed UPDATE IGNORE when using STRICT mode.
2004-10-02 22:20:08 +03:00
dlenev@brandersnatch.localdomain
2511990c97 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
2004-10-01 18:54:06 +04:00
bell@sanja.is.com.ua
013512abab merge 2004-09-29 17:10:17 +03:00
bell@sanja.is.com.ua
392292a46b post review changes:
CHECK OPTION moved to one function
view name added to error messages
2004-09-29 16:35:01 +03:00
monty@mishka.local
1fc7e6af85 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
2004-09-28 20:19:03 +03:00
monty@mishka.local
f2941380c4 Strict mode & better warnings
Under strict mode MySQL will generate an error message if there was any conversion when assigning data to a field.
Added checking of date/datetime fields.
If strict mode, give error if we have not given value to field without a default value (for INSERT)
2004-09-28 20:08:00 +03:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
0b6dc49388 Bug#5553 - Multi table UPDATE IGNORE fails on dup key
We don't want the update to abort when IGNORE is specified
2004-09-17 12:07:59 +01:00
bell@sanja.is.com.ua
09b316f051 updateability of field with collation support (BUG#5506) 2004-09-16 23:45:20 +03:00
bell@sanja.is.com.ua
67fcac7a87 support of join view updateability (WL#1809) 2004-09-15 23:42:56 +03:00
bell@sanja.is.com.ua
f797298fc5 fixed merged view fields names (BUG#5147)
support of merged VIEW over several tables added (WL#1809)
2004-09-14 19:28:29 +03:00
bell@sanja.is.com.ua
763c57d41f Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-show-5.0
2004-09-10 02:26:09 +03:00
bell@sanja.is.com.ua
0badc913bb check that table used in multi-update is unique added (BUG#5455) 2004-09-08 13:39:15 +03:00
dlenev@mysql.com
9b1bc6a4d5 Merge of changes from the main tree to tree for WL#1218 "Triggers". 2004-09-08 13:29:21 +04:00
bell@sanja.is.com.ua
425857f5b2 test of updating and fetching from the same table check (BUG##5157) 2004-09-08 10:18:04 +03:00
dlenev@brandersnatch.localdomain
9ed038dd6f WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.
2004-09-07 16:29:46 +04:00
bell@sanja.is.com.ua
ee03178f01 merge 2004-09-06 15:56:38 +03:00
bell@sanja.is.com.ua
6d8e178523 merge 2004-09-05 22:14:27 +03:00
bell@sanja.is.com.ua
161662ba4c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-5.0
2004-09-04 15:32:13 +03:00
monty@mysql.com
46ff90738b Merge with pulled code 2004-09-03 22:38:45 +03:00
monty@mysql.com
cbd67f49e1 Cleanup of new code pushed into 5.0 since last pull
Merged the different find_xxxx_table_in_list functions to one + some inline functions
2004-09-03 21:43:04 +03:00
bell@sanja.is.com.ua
bd2c119176 CHECK OPTIONs added (WL#1983) 2004-09-03 15:18:40 +03:00
bell@sanja.is.com.ua
392c306969 fixed open_and_lock_tables result processing (all open_and_lock_tables revision)
fixed printing of COLLATE operation
(BUG#5155)
2004-08-31 10:06:38 +03:00
bell@sanja.is.com.ua
a27b1e54d5 fixed using VIEW fields (BUG#4617) 2004-07-23 09:20:58 +03:00
miguel@hegel.txg
b3b598d19c Fixes for bug #4571 (Windows compabilities) 2004-07-16 03:47:17 -03:00
bell@sanja.is.com.ua
9336d36cf8 VIEW
two TABLE_LIST copy eliminated
2004-07-16 01:15:55 +03:00
monty@mysql.com
31fe2837f9 Merge with 4.1 2004-07-12 08:20:24 +03:00
monty@mysql.com
db7efa2780 New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
Added key part to optimize_range() to fix problems when using fields in key parts.
2004-07-08 15:45:25 +03:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
serg@serg.mylan
c03addab79 merged 2004-06-23 12:36:07 +02:00
serg@serg.mylan
3f1c4ba745 handler interface cleanups:
more logical table/index_flags
  return  HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
  max_keys and other limits renamed to max_supported_keys/etc
  max_keys/etc are now wrappers to max_supported_keys/etc 
  ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
2004-06-23 12:29:05 +02:00
guilhem@mysql.com
2b20e84ff8 Making DROP TABLE IF EXISTS, DROP DATABASE IF EXISTS, DELETE FROM, UPDATE be logged to
binlog even if they changed nothing, and a test for this.
This is useful when users use these commands to clean up their master and slave by issuing
one command on master (assume master and slave have slightly different data for some
reason and you want to clean up both).
Note that I have not changed multi-table DELETE and multi-table UPDATE because their
error-reporting mechanism is more complicated.
2004-06-09 16:07:01 +02:00
sergefp@mysql.com
2e93dfaf42 More code cleanup, debug prints removed
Fixed an incorrect optimizer choice for ror-intersect(key, clustered_primary)
Typo bug fixed in multitable update
2004-06-01 15:31:58 +04:00
sergefp@mysql.com
5843eec521 Manual merge 2004-05-29 20:55:46 +04:00
bell@sanja.is.com.ua
c7396f8d20 PS and SP made compatible in mechanism used for preparing query for rexecutions (Bug #2266) 2004-05-20 02:02:49 +03:00
sergefp@mysql.com
3b29cad05c Manual merge 2004-05-13 01:49:47 +04:00
sergefp@mysql.com
a46d7542c9 This is first cset for WL#1394 "Optimize index merge when all involved index ranges include only values with equal keys"
The main idea is to exploit the fact that key scans for "key=const" return ordered sequences of rowids.
2004-05-13 01:38:40 +04:00
pem@mysql.com
bf45960eef Merge 4.1 -> 5.0 2004-05-07 18:52:06 +02:00
bell@sanja.is.com.ua
62fca61bc4 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ndb-4.1
2004-05-05 21:24:13 +03:00
bell@sanja.is.com.ua
c5c35c667e caching of queries with isammerge tables forbiden using general way
SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause
correct table list passed to class constructor of select_update
2004-05-05 21:21:41 +03:00
monty@mysql.com
104fdf607d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-05-05 12:40:59 +03:00
Sinisa@sinisa.nasamreza.org
68cb444c62 Fix for a multi table updates when one of the tables is not updated
but used in a nested query.
2004-05-04 23:04:05 +03:00
monty@mysql.com
59ddd8c738 Fix to handle unsigned data in prepared statements (Bug #3447)
Fixed security problem that password was temporarly reset when someone changed GRANT for a user. (Bug #3404)
Fixed problem with PROCEDURE analyse() and impossible WHERE (Bug #2238)
Don't auto-repair tables in mysqlcheck if table type doesn't support 'check' command.
2004-05-04 15:02:38 +03:00
pem@mysql.comhem.se
296ba0ea57 WL#1567: Add ROW_COUNT() Function to retrieve count of rows updated/inserted/deleted 2004-05-04 13:45:20 +02:00
bell@sanja.is.com.ua
a535342d57 after review PS fixes 2004-04-10 01:14:32 +03:00
bell@sanja.is.com.ua
5e37c41fae new error for unsupported command in PS
fixed IN subselect with basic constant left expression
SQLCOM_CREATE_TABLE, SQLCOM_UPDATE_MULTI, SQLCOM_REPLACE_SELECT, SQLCOM_INSERT_SELECT, QLCOM_DELETE_MULTI fixed to be compatible with PS (BUG#3398, BUG#3406)
fixed multiupdate privelege check (BUG#3408)
fixed multiupdate tables check (BUG#3411)
unchecked commands now is rejected by PS protocol to avoid serever crash
fixed cleunup procedure to be compatible sith DO/SET (BUG#3393)
2004-04-08 00:16:17 +03:00
pem@mysql.com
dfd59e296e Merge 4.1 -> 5.0. 2004-04-07 19:07:44 +02:00
dlenev@jabberwock.localdomain
f6bff2e6c6 WL#1266 "Separate auto-set logic from TIMESTAMP type."
Final version of patch.

Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW()
clauses for TIMESTAMP field definition.
Current implementation allows only one such field per table and
uses several unireg types for storing info about this properties of
field. It should be replaced with better implementation when new
.frm format is introduced.
2004-04-02 10:12:53 +04:00
bell@sanja.is.com.ua
d095d4753e after review changes 2004-03-20 13:36:26 +02:00
bell@sanja.is.com.ua
613104ad25 merge 2004-03-18 15:21:06 +02:00
bell@sanja.is.com.ua
2b45b53066 DBUG_ASSERT(fixed == 1); added to val*
small optimisation in signed_literal
2004-03-18 15:14:36 +02:00
monty@mysql.com
350b433569 merge with 4.0 2004-03-16 22:41:30 +02:00
sergefp@mysql.com
3d2794ae9a Fix for Bug#3183 2004-03-15 23:11:58 +03:00
monty@mysql.com
e27960a44e Ensure that install_test_db.sh script works with both 'make install' and 'make_binary_distribution' layouts
Abort if we can't allocate memory for table cache
Fix bug with multi-update-tables and BDB tables.
2004-03-12 01:10:22 +02:00
monty@mysql.com
b9c4ee353d Rollback UPDATE/DELETE statements on kill
nsure that rows in a multi-row INSERT DELAYED are inserted atomicly
2004-03-04 18:16:10 +02:00
bell@sanja.is.com.ua
f4d1ee971b merge 2004-02-17 01:52:33 +02:00
bell@sanja.is.com.ua
3f86f10a57 ulternative bugfix for BUG#2508 and fix for BUG#2809 - every table has its own TABLE structure 2004-02-17 01:14:51 +02:00
monty@mysql.com
f43093ec0e After merge fixes
Added more DBUG statements
Ensure that we are comparing end space with BINARY strings
Use 'any_db' instead of '' to mean any database. (For HANDLER command)
Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
2004-02-16 10:03:25 +02:00
monty@mysql.com
ce14578909 Merge with 4.0.18 2004-02-11 00:06:46 +01:00
pem@mysql.com
c8585f3283 Merge 4.1 into 5.0. 2004-02-10 18:44:02 +01:00
bell@sanja.is.com.ua
ff0a6e9686 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1
2004-02-09 15:01:51 +02:00
monty@mysql.com
06432eac36 Added --compact to mysqlbinlog
Fixed output from mysqlbinlog when using --skip-comments
Fixed warnings from valgrind
Fixed ref_length when used with HEAP tables
More efficent need_conversion()
Fixed error handling in UPDATE with not updateable tables
Fixed bug in null handling in CAST to signed/unsigned
2004-02-09 12:31:03 +01:00
bell@sanja.is.com.ua
b99d13582b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1
2004-02-09 12:10:12 +02:00
monty@mysql.com
d51263b6e5 Ensure that privileges are tested properly for multi-table-updates.
Now one need only SELECT privilege for tables that are only read in
UPDATE statements with many tables. (Bug #2377).
2004-02-03 19:17:23 +01:00
ram@gw.mysql.r18.ru
f231d9826b just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
bell@sanja.is.com.ua
2a9cd37cd6 now all tables of query are locked in one place (including derived tables)
fixed BUG#2120 and other problem with EXPLAINing derived tables
2004-02-01 15:30:32 +02:00
bell@sanja.is.com.ua
03d7217f77 Merge 2004-01-20 19:23:28 +02:00
bell@sanja.is.com.ua
501ae0bc52 allow UPDATE and DELETE stetements with tables derived from subquery if they are not updated (BUG#2117)
allow delete table by alias in multi-delete statement
2004-01-04 23:44:33 +02:00
bell@sanja.is.com.ua
e5fa5585f0 removed droping field->query_id for reinitialization tables for subquery.
(BUG#2089)
2004-01-03 00:12:07 +02:00
monty@mysql.com
c6ed2a625b Update for VC++
(Fixed project files, compiler warnings etc..)
2003-12-21 02:07:45 +02:00
konstantin@oak.local
d37da004f6 THD::lex now points to THD::main_lex like in 5.0
All tests pass (client_test included)
2003-12-19 20:52:13 +03:00
pem@mysql.com
99e0ae85c7 Merge 4.1 to 5.0. 2003-12-19 18:03:27 +01:00
monty@mysql.com
031390a9a4 Fixes after merge with 4.0
Cleaned up embedded library access and query cache handling
Changed min stack size to 128K (to allow longer MyISAM keys)
Fixed wrong priority for XOR (should be less than NEG to get -1^1 to work)
2003-12-19 16:25:50 +02:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
guilhem@mysql.com
e56c8c61d8 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-12-16 11:12:40 +01:00
guilhem@mysql.com
db2d812d1b Fix for BUG#2083
"EE_ error codes (EE_DELETE, EE_WRITE) end up in the binlog, making slave stop".
The problem was that during execution of the command on the master, an error
can occur (for example, not space left on device, then mysqld waits and when
there is space it completes successfully: so finally it worked but the error
EE_WRITE remains in thd->net.last_errno and thd->net.last_error).
To know if finally the command succeeded, we test the 'error' variable in
every place, and if it shows no failure we reset thd->net.last_err* using
the function THD::clear_error() which is backported from 4.1.
A new test to see if now only real errors get to the binlog (note: the test
uses "rm").

Also a bit of memory free/alloc saving in log_event.cc (do not free the whole
mem_root after every query in the slave SQL thread: we can keep the initial
block of it; which will be freed when the thread terminates).
2003-12-16 11:10:50 +01:00
monty@mysql.com
427ce41c3c Fixed bug in last push found by valgrind 2003-12-14 08:12:07 -05:00
monty@mysql.com
6ac169c815 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/my/mysql-4.0
2003-12-13 04:05:54 +02:00
monty@mysql.com
bd92d9b9ae Merge 2003-12-13 04:04:38 +02:00
igor@rurik.mysql.com
15e70c5480 sql_delete.cc, sql_update.cc, sql_class.h:
Simplification of the previous fix for multi-update/delete.
2003-12-12 13:14:59 -08:00
monty@mysql.com
f995a5f4aa Fix autoincrement for signed columns (Bug #1366)
Fixed problem with char > 128 in QUOTE() function. (Bug #1868)
Disable creation of symlinks if my_disable_symlink is set
Fixed searching of TEXT with end space. (Bug #1651)
Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711)
Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998)
Fixed timestamp.test
2003-12-12 22:26:58 +02:00
igor@rurik.mysql.com
54628879fc Many files:
Fixed a bug causing a crash for multi-update/multi-delete
  with impossible where (bug #1860).
2003-12-11 14:55:48 -08:00
pem@mysql.com
24a2ae44a3 Merged 4.1 -> 5.0 2003-12-09 19:00:34 +01:00
serg@serg.mylan
6d0703ab5b QUERY_NO_GOOD_INDEX_USED and QUERY_NO_INDEX_USED moved from thd->lex.select_lex->options to thd->server_status 2003-12-06 23:21:09 +01:00
pem@mysql.com
6e717133c5 Merge 4.1 to 5.0 2003-12-01 16:14:40 +01:00
monty@mysql.com
ede8169d24 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log
2003-11-28 12:18:13 +02:00
bell@sanja.is.com.ua
7191ea0ae3 Fixed UNION fields type/length detecting 2003-11-23 02:01:15 +02:00
sergefp@mysql.com
30b3c3bf1b Merged, most likely needs post-merge fix 2003-11-21 00:27:54 +03:00
pem@mysql.com
28a2c6a96b Merging 4.1->5.0. 2003-11-19 15:19:46 +01:00
psergey@psergey.(none)
4894565432 merging in index_merge (in progress, not yet working) 2003-11-13 22:14:37 +03:00
psergey@psergey.(none)
ca6c4cc30b Added index_merge access method 2003-11-13 17:52:02 +03:00
pem@mysql.com
337238b78a Merging 4.1->5.0 2003-10-22 16:10:22 +02:00
serg@serg.mylan
f944fd4a65 merged 2003-10-21 11:58:43 +02:00
serg@serg.mylan
50d9b95b77 merged 2003-10-15 12:25:44 +02:00
monty@mashka.mysql.fi
461d1627b3 merge with 4.0 for more memory allocation variables. 2003-10-13 15:50:30 +03:00
monty@mashka.mysql.fi
c60a75e9ba Add warnings for single line inserts. To do this I had to convert count_cuted_fields to an enum (to be able to detect setting a NOT NULL field to NULL) 2003-10-11 23:26:39 +03:00
monty@mashka.mysql.fi
c95d142f8f Add new user variables for tuning memory usage:
query_alloc_block_size, query_prealloc_size, range_alloc_block_size,transaction_alloc_block_size and transaction_prealloc_size
Add more checks for "out of memory" detection in range optimization
2003-10-11 22:00:24 +03:00
serg@serg.mylan
8cc3951c8f key_map with more that 64 bits width 2003-10-11 13:06:55 +02:00
heikki@hundin.mysql.fi
6112853cda Many files:
Multiple tablespaces for InnoDB
sql_table.cc:
  Tell explicitly that InnoDB should retrieve all columns in CHECKSUM TABLE
sql_update.cc, sql_select.cc, my_base.h:
  More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS
2003-10-07 17:28:59 +03:00
serg@serg.mylan
9be83de693 minor error messages cleanup 2003-10-02 23:41:10 +02:00
hf@deer.(none)
ba8fa76fa2 SCRUM:
WL#604 Privileges in embedded library
code added to check privileges in embedded library
NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude
access-checking parts. Actually we now can exclude these parts from
standalone server as well. Do we need it?
Access checks are disabled in embedded server by default. One should
edit libmysqld/Makefile manually to get this working.
We definitely need the separate configure for embedded server
2003-09-26 15:33:13 +05:00
pem@mysql.com
8d884c02bb Merging 4.1 -> 5.0 2003-09-24 11:29:38 +02:00
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
pem@mysql.telia.com
08e5a7e135 Post-merge fixes. 2003-08-26 17:41:40 +02:00
pem@mysql.com
7f158dd12a Merge 4.1 into 5.0 2003-08-26 11:51:09 +02:00
bell@laptop.sanja.is.com.ua
811ed77e5f quick fix for found row counter
code cleunup
2003-08-20 21:57:37 +03:00
Sinisa@sinisa.nasamreza.org
fb774125e8 item_func.h:
Fix for a bug with LEAST() in WHERE clause
ha_innodb.cc:
  Fix for a configure bug
multi_update.result, multi_update.test:
  Fix for the update with NULL's in the result set
sql_update.cc:
  Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set
   Fix for the update with NULL's in the result set
2003-08-20 15:33:21 +03:00
bell@laptop.sanja.is.com.ua
dd9cbce47b merge 2003-08-19 20:14:35 +03:00
monty@mashka.mysql.fi
10c4acfb4f merge 2003-08-19 00:10:21 +03:00
bell@laptop.sanja.is.com.ua
85f397781b Code cleanup 2003-08-16 13:26:48 +03:00
bell@sanja.is.com.ua
b6a8d68ae4 fixed problem with reference on derived table fields (BUG#1031) 2003-08-12 15:04:49 +03:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
ram@mysql.r18.ru
0f47087e22 Fix for the bug #841: wrong number of warnings 2003-07-14 15:32:31 +05:00
monty@mashka.mysql.fi
e1aa90a9bf Safety and speedup fixes:
Changed is_open() to work as before.
Added back inited argument to LOG
2003-07-14 10:12:05 +03:00
guilhem@mysql.com
fbebac9a48 Fix for BUG#791:
a safer way of initing the mutexes in MYSQL_LOG.
is_open() is now always thread-safe.
See each file for details.
2003-07-11 14:26:44 +02:00
pem@mysql.telia.com
a8a29a39d2 Merging 4.1 into 5.0 (second pass; post-merge fixes).
One test in subselect.test still wrong.
Had to reconstruct all errmsg.txt files completely, since auto-merge made
a mess of the lot. :-(
2003-07-09 17:07:12 +02:00
pem@mysql.telia.com
9c3a7a6ba3 Merge 4.1 into 5.0 (first pass). 2003-07-08 17:50:23 +02:00
hf@deer.(none)
faa2b41114 Bug #570 fixed 2003-06-19 22:06:51 +05:00
monty@narttu.mysql.fi
40109c574a Merge with 4.0.13 2003-06-04 19:21:51 +03:00
monty@mashka.mysql.fi
e436736d29 ixed wrong unlock of tables (new bug) 2003-05-26 20:48:40 +03:00
heikki@hundin.mysql.fi
b8e5b65f88 ha_innodb.cc:
Remove accidenatlly committed debug printfs when query cache is used
sql_update.cc, sql_load.cc, sql_insert.cc, sql_delete.cc:
  For the transactional query cache algorithm to work we must invalidate the query cache in INSERT/DELETE/UPDATE before writing to the binlog or calling ha_autocommit_... Note that binlog writing may also call commit. The crucial thing is that the transaction which modified data must not be committed BEFORE the query cache is invalidated.
2003-05-26 19:10:43 +03:00
monty@narttu.mysql.fi
102c477760 Added testing of LOAD DATA ... STARTING BY
Added read_only variable
2003-05-26 11:47:03 +03:00
monty@mashka.mysql.fi
cb7061ebe4 merge 2003-05-22 02:57:27 +03:00
monty@mashka.mysql.fi
6aa8929cf3 After merge fixes
Added initialization of all important global variables
2003-05-21 21:39:58 +03:00
venu@myvenu.com
39cbb547d4 Resolve merge colflict 2003-05-21 00:12:09 -07:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
monty@narttu.mysql.fi
41d2103e26 Fixed 'Unknown error' when using 'UPDATE ... LIMIT'. Bug 373 2003-05-13 20:07:43 +03:00
monty@narttu.mysql.fi
13530887cb Fix for UNION and LEFT JOIN (Bug #386)
Fixed wrong logging of Access denied error (Bug #398)
2003-05-13 18:58:26 +03:00
vva@eagle.mysql.r18.ru
afd581edd3 made lex a pointer in THD 2003-05-05 14:54:37 -04:00
monty@narttu.mysql.fi
5f028be2e6 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-05-03 16:22:56 +03:00
monty@narttu.mysql.fi
7410b6cbdf Fix problem where key_read was not cleaned up properly, which caused assert in innodb test. 2003-05-03 16:21:43 +03:00
serg@serg.mylan
784fb81426 INSERT ... UPDATE ... VALUES() 2003-05-03 01:16:56 +02:00
venu@myvenu.com
eb137c063c Support of warnings for all DML statements (Insert, Update and Alter)
Fix LOAD DATA INFILE warnings to have a better meanigful messages
Fix to make the mysql command line to automatically show the warnings count for all basic commands
2003-04-30 00:02:28 -07:00
pem@mysql.com
35c82164f6 Merged 4.1 to 5.0. 2003-04-29 12:06:04 +02:00
Sinisa@sinisa.nasamreza.org
5d3df7610f merge fix 2003-04-26 16:44:42 +03:00
igor@hundin.mysql.fi
80615fade2 Many files:
Added the MAX_LENGTH_FOR_SORT_DATA option
filesort.cc:
  Added the MAX_LENGTH_FOR_SORT_DATA option
2003-04-24 14:33:33 +03:00
monty@narttu.mysql.fi
f6a43bd567 Fixes for valgrind
Added optimzation for clustered index
Fixed bug in UPDATE ... ORDER BY
Fixed handling of UPDATE ... LIMIT
2003-04-23 21:52:16 +03:00
Sinisa@sinisa.nasamreza.org
d91d6d5e2e Three bug fixes and one fix being undone. 2003-04-19 23:18:35 +03:00
pem@mysql.com
64da2fff67 Post post-merge fix. 2003-04-17 00:34:15 +02:00
pem@mysql.com
386b0b91b2 Merged 4.1 into 5.0. 2003-04-16 23:23:23 +02:00
Sinisa@sinisa.nasamreza.org
c3db30b5f1 Two bug fixes 2003-04-11 20:09:24 +03:00
hf@deer.mysql.r18.ru
5d4e9f95f2 Merging 2003-04-08 19:43:24 +05:00
hf@deer.mysql.r18.ru
0428d08606 SCRUM
two KILL versions
code trimming with headquarter's suggestions
2003-04-08 19:18:33 +05:00
bell@sanja.is.com.ua
7bd0d02bda fixed st_select_lex initialization
fixed mustiupdate subselect compatibility

(bug 217)
2003-04-05 09:29:28 +03:00
Sinisa@sinisa.nasamreza.org
c588cf6889 A fix for a bug in multi-table updates which was always caused
whenever a temporary MyISAM table had to be created from HEAP table.
2003-04-02 17:05:34 +03:00
guilhem@mysql.com
654410a3d3 Deprecated the update log (Sprint task #792). Now --log-update
just turns on --log-bin and prints a warning. SQL_LOG_UPDATE
is handled in two ways (see mysqld.cc for comments).
2003-04-02 00:15:20 +02:00
hf@genie.(none)
0ee0589e93 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into genie.(none):/home/hf/work/mysql-5.0.kil
2003-03-31 13:42:37 +05:00
hf@genie.(none)
f8f0b70380 SCRUM
two KILL commands implementation (version 2)
2003-03-31 13:39:46 +05:00
serg@serg.mysql.com
ce016df883 another bad merge fixed 2003-03-20 12:09:20 +01:00