Commit graph

164 commits

Author SHA1 Message Date
tomas@poseidon.(none)
caf79dacfe renamed ha_recovery_logging to ha_enable_transaction
added tests to alter table for "large" alter tables and truncates in ndbcluster
added debug printout in restart() in ndbcluster
added flag THD::transaction.on to enable/disable transaction
2004-09-03 15:11:09 +00:00
serg@serg.mylan
8f2d92c56a manually merged 2004-08-24 17:24:23 +02:00
guilhem@mysql.com
252ebd2b30 Fix for BUG#5033 "When using temporary tables truncate does NOT reset the auto_increment counter"
(ok'd by CTO to fix it in 4.0).
Fix to make mysql-test-run work with all Valgrind versions.
2004-08-23 16:15:57 +02: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
monty@mysql.com
7d9a9fd93a Added missing return statement 2004-04-12 03:26:32 +03:00
bell@sanja.is.com.ua
a535342d57 after review PS fixes 2004-04-10 01:14:32 +03:00
monty@mysql.com
350b433569 merge with 4.0 2004-03-16 22:41:30 +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
monty@mashka.mysql.fi
3b83cce5eb merge with 4.0 2004-02-22 09:50:59 +02:00
monty@mashka.mysql.fi
e74182fe52 Cleanups 2004-02-22 08:54:06 +02:00
Sinisa@sinisa.nasamreza.org
cd0562158a Fix for a bug #2799.
Multi-table delete's with tables having foreign key constraints
did not return the error.

Also added tests for multi-table updates.
2004-02-19 19:43:46 +02: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
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
monty@mysql.com
0448a3f4c0 Add cast of integer/longlong to (ulong) to make printf/sprintf 64 bit safe
A after merge fix for last merge
2003-12-20 03:41:04 +02:00
monty@mysql.com
fcbee7eb1a merge with lex pointer change patch 2003-12-19 20:18:18 +02:00
monty@mysql.com
1b7f67d65b Fixed memory overrun bug in DELETE ... ORDER BY 2003-12-19 19:16:26 +01: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
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
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
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
monty@mysql.com
7e92336b1d Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061)
mysql_server_init() now returns error code if something went wrong (Bug #2062)
Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened.
Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062)
Fixed bug in UNION statement with alias '*'. (Bug #1249)
Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024).
FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition.
HOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385)
2003-12-11 06:24:08 +02: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
bell@sanja.is.com.ua
d96b3aa939 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-delete-4.1
2003-11-18 17:48:45 +02:00
monty@mashka.mysql.fi
cab1dc628c CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTS
New multi-key-cache handling. This was needed becasue the old one didn't work reliable with MERGE tables.
ALTER TABLE table_name ... CHARACTER SET  ... now changes all char/varchar/text columns to the given character set
(One must use ALTER TABLE ... DEFAULT CHARACTER SET ... to change the default character set)
Fixed that have_compress is detected properly (fixes problems with func_compress.test on platforms without zlib)
New syntax for CACHE INDEX ('keys' is optional if no index name is given and one mentions the key cache name only ones)
Removed compiler warnings
Added mysql_set_server_option() to allow clients like PHP to easaily set/reset the multi-statement flag.
2003-11-18 13:47:27 +02:00
bell@sanja.is.com.ua
5327ec1d09 IGNORE option was added for DELETE statement (WL#1334) 2003-11-17 22:45:07 +02:00
serg@serg.mylan
f944fd4a65 merged 2003-10-21 11:58:43 +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
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
bell@laptop.sanja.is.com.ua
dd9cbce47b merge 2003-08-19 20:14:35 +03:00
bell@laptop.sanja.is.com.ua
85f397781b Code cleanup 2003-08-16 13:26:48 +03:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03: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
monty@mashka.mysql.fi
d495656ac5 Cleanups 2003-07-09 00:55:07 +03:00
heikki@hundin.mysql.fi
ea8ed30f03 sql_delete.cc:
Fix bug: if a DELETE failed in a FOREIGN KEY error and it had already deleted some rows, then MySQL did not roll back the failed SQL statement, and also wrote it to the binlog
2003-07-07 16:39:53 +03:00
bell@sanja.is.com.ua
28207ede02 (SCRUM)
It looks like samll revolution in SELECT_LEX tree, but it was only natural way to solve problem with name resolution of external fields inside subselect which belongs to global order of union
also it have following advantages:
 - removed mess with current_select type conversion
   - type checking/converting
   - a lot of virtual methods
 - fake select for union execution allocated only once (it was allocated for every subselect with union executing)

changes:
fixed bug with outer fields name resolution of subqueries which belong to global ORDER BY clause
remuved select_lex() function, now thd->lex.current_select always have type SELECT_LEX
new SELECT_LEX (fake_select_lex) will be allocated in case of UNION for using in UNION processing
fake_select_lex allocated for union hold global ORDER BY & LIMIT clauses and have linkage equal to GLOBAL_OPTIONS_TYPE 
new description of SELECT_LEX tree

(SCRUM)
2003-07-03 02:30:52 +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
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
serg@serg.mylan
6db5e7f428 "delete from table where const" bug fixed 2003-05-03 18:08:11 +02:00
Sinisa@sinisa.nasamreza.org
6fd764a662 Post-merge fix. 2003-04-26 15:58:39 +03:00
Sinisa@sinisa.nasamreza.org
a81dc6d9f3 A fix for DELETE with ORDER BY and LIMIT.
How come we do not have a test case for this ??
2003-04-09 18:22:17 +03:00
monty@mashka.mysql.fi
90bf074438 Merge with 4.0.11 tree to get latest bug fixes 2003-02-17 05:43:37 +02:00
monty@mashka.mysql.fi
6051b2f998 Fixed multi-table-delete for InnoDB tables
Novell patches
2003-02-17 02:14:37 +02:00