Commit graph

702 commits

Author SHA1 Message Date
heikki@hundin.mysql.fi
d2d1e6f726 row0mysql.c:
Fix crash in InnoDB RENAME TABLE if 'databasename/tablename' is shorter than 5 characters (Bug #2689); reported by Sergey Petrunia
2004-02-09 18:56:39 +02:00
heikki@hundin.mysql.fi
836e0b057a Many files:
Fix bug #2167: generate foreign key id's locally for each table, in the form databasename/tablename_ibfk_number; if the user gives the constraint name explicitly remember it; these changes should ensure that foreign key id's in a slave are the same as in the master, and DROP FOREIGN KEY does not break replication
sync0sync.c:
  UNIV_SYNC_DEBUG caused assertion in the creation of the doublewrite buffer, if we do not allow thousands of latches per thread
2004-02-09 01:32:00 +02:00
monty@mysql.com
7df839e757 Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461)
DROP DATABASE now assumes RAID directories are in hex. (Bug #2627)
Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506)
Test in configure if pthread_key_delete() exists (to fix compile problem on SCO) (Bug #2461)
2004-02-05 09:12:23 +01:00
heikki@hundin.mysql.fi
7e19a8ee65 dict0dict.c:
Change print format of FOREIGN KEY constraints spanning multiple databases to <backquote>databasename<backquote>.<backquote>tablename<backquote>; but when parsing them we must also accept <backquote>databasename.tablename<backquote>, because that was the output format in < 4.0.18
2004-02-02 01:05:53 +02:00
heikki@hundin.mysql.fi
b382ee2cb1 dict0dict.c:
Change print format of FOREIGN KEY constraints spanning multiple databases to: .; but we when parsing them we must also accept , because that was the output format in < 4.0.18
2004-02-02 01:03:05 +02:00
heikki@hundin.mysql.fi
7533b0cfff dict0dict.c:
Remove redundant code; parse both the database name and the table name in a FOREIGN KEY constraint with quotes in mind
row0mysql.c, ha_innodb.cc, sql_table.cc:
  Return error message Cannot delete or update a parent row... if we try to drop a table which is referenced by a FOREIGN KEY constraint, and the user has not set foreign_key_checks=0
2004-02-02 00:10:45 +02:00
heikki@hundin.mysql.fi
0216948c5b dict0dict.c:
Cleanup
2004-02-01 19:20:16 +02:00
monty@mysql.com
ed44e769ba Fixed parsing of column names and foreign key constraints in Innobase to handle quoted identifiers and identifiers with space. (Bug #1725)
Fix optimizer tuning bug when first used key part was a constant. (Bug #1679)
2004-01-30 10:46:30 +01:00
heikki@hundin.mysql.fi
49587c4244 ibuf0ibuf.c:
Correct the comment about the ibuf record format in >= 4.1.1
2004-01-29 15:08:22 +02:00
heikki@hundin.mysql.fi
8c49856f24 btr0cur.c:
Fix bug: InnoDB row count and index cardinality estimates wrapped over at 512 million in 32-bit computers
2004-01-29 14:41:49 +02:00
heikki@hundin.mysql.fi
9b04e7b9bb data0data.ic, data0data.h, row0sel.c:
Fix bug #2483 with InnoDB, UNIQUE secondary index, and NULL values in that unique index; with the IS NULL predicate, InnoDB returned only the first matching row, though there can be many
2004-01-27 20:10:04 +02:00
heikki@hundin.mysql.fi
d9ef69e7a1 row0sel.c:
Remove extra mtr_start()
2004-01-20 17:35:51 +02:00
heikki@hundin.mysql.fi
15e64c3591 row0ins.c:
Fix bug: FOREIGN KEY ... ON UPDATE/DELETE NO ACTION must check the foreign key constraint, not ignore it. Peter Gulutzan said that NO ACTION should check the constraint as deferred, at the end of the SQL statement, while RESTRICT should check it immediately. Since we do not have defered constraints in InnoDB, this bug fix makes InnoDB to check NO ACTION constraints immediately, like it checks RESTRICT constraints.
2004-01-14 16:21:54 +02:00
heikki@hundin.mysql.fi
8f6f7502d1 srv0start.c, srv0srv.c:
If UNIV_SYNC_DEBUG was switched on, the error monitor thread could reserve a mutex BEFORE the sync debug system was initialized, and that caused a sync debug assertion in startup: move the 2 sec. sleep to a safer place; note that this is only heuristics, and in theory it can assert still
2004-01-13 17:13:03 +02:00
heikki@hundin.mysql.fi
c6c2478f8c row0sel.c:
Improve previous push: save 1000 bytes of thread stack in non-error cases
2004-01-13 04:10:20 +02:00
heikki@hundin.mysql.fi
bd37416e09 row0sel.c:
If MySQL tries to do SELECT from an InnoDB table, but has set no table locks at all in ::external_lock(), print a descriptive error message and assert; some subquery bugs were of this type
2004-01-13 04:05:38 +02:00
heikki@hundin.mysql.fi
1bd4091470 row0mysql.c:
Fix typo
2004-01-08 18:56:21 +02:00
heikki@hundin.mysql.fi
18036f98ac buf0lru.c:
Start InnoDB Monitor if 80 % of the buffer pool occupied by adaptive has or lock heaps; do not print the same warning more than 1 time
2004-01-07 18:15:17 +02:00
heikki@hundin.mysql.fi
4c0ad9ccb6 trx0sys.c:
DO NOT MERGE TO 4.1: forgot to change this in the previous push
2004-01-06 20:06:07 +02:00
heikki@hundin.mysql.fi
41d0719cc3 srv0start.c:
More instructions about a downgrade 4.1.1 -> 4.0.18
2004-01-06 20:03:06 +02:00
heikki@hundin.mysql.fi
51c0fa2935 trx0sys.c:
DO NOT MERGE TO 4.1: charset changes can cause problems in a downgrade 4.1.1 -> 4.0.18
2004-01-06 19:50:50 +02:00
heikki@hundin.mysql.fi
4fa54c1dca trx0sys.c, srv0start.c, ibuf0ibuf.c, trx0sys.h, srv0srv.h:
DO NOT MERGE TO 4.1: add code for automatic downgrade 4.1.1 -> 4.0 if the user has not created multiple tablespaces yet
2004-01-06 13:40:14 +02:00
heikki@hundin.mysql.fi
fe6250488e srv0start.c:
Add comment that the insert buffer format changed between 4.0 and 4.1.1, but the undo log format did not
2004-01-06 13:10:57 +02:00
heikki@hundin.mysql.fi
7bb74b6592 log0recv.h, log0recv.c:
Merge a log replay change required by ibbackup
2004-01-02 16:21:58 +02:00
heikki@hundin.mysql.fi
1c74cd9bf5 row0purge.c:
Fix bug: if purge of a table was not possible because its .ibd file was missing, trx->dict_operation_lock_mode was left to a wrong value, causing an assertion failure
2004-01-01 01:51:36 +02:00
heikki@hundin.mysql.fi
b5d9ecad52 log0log.c:
Do not assert in log0log.c, line 856 if ib_logfiles are too small for innodb_thread_concurrency. Instead, print instructions how to adjust my.cnf and call exit(1).
2003-12-23 22:55:38 +02:00
heikki@hundin.mysql.fi
947057e771 univ.i, srv0srv.c:
Define macro ULINTPF which can be used in printf statements as the print format of ulint both on Win64 and other platforms
2003-12-20 13:48:35 +02:00
heikki@hundin.mysql.fi
734870d0ce srv0start.c, univ.i, configure.in:
Check at compilation time on Unix that InnoDB ulint is the same size as void*, and also check it at runtime
2003-12-20 13:13:55 +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
heikki@hundin.mysql.fi
df73dc7828 univ.i, ut0ut.h, ut0ut.c:
On 64-bit Windows use InnoDB's own printf function where %lu is converted to %I64u; this eliminates Intel compiler warnings on IA64
2003-12-19 20:39:19 +02:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
heikki@hundin.mysql.fi
6d9aca5069 btr0cur.c, row0umod.c:
Fix bug: if one updated a secondary index column so that its alphabetical value did not change (e.g., abc -> aBc) and rolled back the update, InnoDB failed to return the value in the secondary index to its original value
row0upd.h:
  Correct typing error
sync0sync.ic:
  Remove inadvertently pushed sync debug code
2003-12-13 01:31:59 +02:00
heikki@hundin.mysql.fi
75a662fb3c row0upd.h, row0upd.c:
Remove wrong debug assertion and comment
2003-12-12 08:09:25 +02:00
heikki@hundin.mysql.fi
d3d9b727eb Many files:
Fix assertion failure on line 713 of row0upd.c if there is a column prefix index and the last characters in the prefix are spaces: do not assume that the length of alphabetically equal strings is the same; fix a buglet which could cause InnoDB to think that a secondary index record was not locked though it had been updated in a way which did not alpahabetically change its value, e.g., abc -> aBc
2003-12-12 07:51:21 +02: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
heikki@hundin.mysql.fi
dc95a025d6 fil0fil.h, fil0fil.c:
ibbackup --apply-log must be able to rename a table based only on the space id
2003-11-25 21:52:22 +02:00
heikki@hundin.mysql.fi
e82a7e2fd2 os0file.h, os0file.c:
Changes needed for ibbackup directory scanning fault tolerance
2003-11-25 20:39:06 +02:00
heikki@hundin.mysql.fi
5e6f94f422 dict0boot.c:
Marko's patch: check the position of some system table columns already at C compile time
2003-11-25 15:11:01 +02:00
monty@mysql.com
7c725b2486 Fixed compiler warnings from Intel compiler in Win64
Added option --max-record-length=# to myisamchk
Don't try repair twice if doing myisamchk --repair --force
Shared memory handler didn't clean up things on errors or shutdown
2003-11-23 14:36:41 +02:00
heikki@hundin.mysql.fi
f8e9f31e93 os0file.c:
Fix the OS error 2 reported by Miguel and Mark in Windows crash recovery: a * had been forgotten from the path in directory scanning
ha_innodb.cc:
  Set default directory in fil0fil.c right if we are running the Embedded Server Library, where the default dir of the process is not necessarily the MySQL datadir
2003-11-21 17:01:35 +02:00
monty@mashka.mysql.fi
ac76198330 Portability fixes for AIX43 2003-11-20 02:48:09 +02:00
monty@mashka.mysql.fi
e5d75fb984 merge 2003-11-18 13:51:48 +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
heikki@hundin.mysql.fi
91451f6488 fil0fil.c:
Do renames based on space id in log replay of ibbackup
2003-11-05 17:44:46 +02:00
heikki@hundin.mysql.fi
721692f33f ut0dbg.h, ut0dbg.c:
Marko's patch to ut_a() fputs
2003-11-04 16:59:50 +02:00
monty@narttu.mysql.fi
4e4725377d Merge with 4.0 2003-11-04 09:40:36 +02:00
heikki@hundin.mysql.fi
1796d50df3 Many files:
Merge with ibbackup; bug fix: .ibd files were extended 2 x the required amount; InnoDB does not create the small file inno_arch_log... any more at database creation
2003-11-03 19:11:09 +02:00
heikki@hundin.mysql.fi
de6cc5f018 row0sel.c:
If innodb_force_recovery >= 5, do not try to fetch an old version of a clustered index record: this reduces crashes when dumping tables from a corrupt database
2003-10-28 15:55:18 +02:00
heikki@hundin.mysql.fi
e52a2f1ace os0file.c:
Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced
2003-10-19 20:31:32 +03:00
heikki@hundin.mysql.fi
18995bb1c6 os0file.c:
Check that writes to data files always happen in to addresses divisible by 16 kB, and the chunk size is also divisible by 16 kB; a user reported 2 corrupt pages from Linux-2.4.20 where an index page seemed displaced
2003-10-19 20:28:03 +03:00
heikki@hundin.mysql.fi
91f5c5e337 thr0loc.c, srv0start.c, srv0srv.c, srv0srv.h, os0thread.h, ha_innodb.cc:
Backport from 4.1: reduce InnoDB memory consumption if buf pool < 8 MB
2003-10-17 23:44:34 +03:00
heikki@hundin.mysql.fi
3fffea42b9 thr0loc.c, srv0start.c, srv0srv.c, srv0srv.h, os0thread.h:
Reduce InnoDB memory allocation if buffer pool < 8 MB
2003-10-17 20:31:17 +03:00
heikki@hundin.mysql.fi
396f7ac834 fil0fil.c:
Visual C++ apparently does not know what -1LL (= -1 in longlong type) means
2003-10-15 09:55:26 +03:00
heikki@hundin.mysql.fi
9ed99782e4 os0file.c:
Fix Visual C++ compilation errors reported by Miguel
2003-10-14 23:33:09 +03:00
heikki@hundin.mysql.fi
d3827c1b22 row0purge.c, row0mysql.c, os0file.c, os0file.h, fil0fil.h, fil0fil.c:
IMPORT TABLESPACE must reset lsns if they are too high
ha_innodb.cc:
  DISCARD/IMPORT TABLESPACE must have a TL_WRITE lock on the table
2003-10-14 14:53:16 +03:00
heikki@hundin.mysql.fi
5ec87f2449 Many files:
ALTER TABLE ... DISCARD/IMPORT TABLESPACE
  Track crash in buf_LRU_block_remove_hashed_page + 1807 reported in MySQL-3.23.5x
2003-10-13 11:20:19 +03:00
heikki@hundin.mysql.fi
677a0dbebb os0file.h:
Fix the Windows compilation error reported by Miguel 1.5 hours ago
2003-10-09 08:54:15 +03:00
monty@narttu.mysql.fi
359d40f2f5 merge 2003-10-07 21:41:07 +03: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
monty@narttu.mysql.fi
6056cfadfc Merge with 4.0.16 2003-10-07 15:42:26 +03:00
heikki@hundin.mysql.fi
216c0a90cd row0mysql.c:
Remove unintentional changes in previous push
2003-10-06 10:50:12 +03:00
heikki@hundin.mysql.fi
da57c25159 row0mysql.c:
Fix bug: if one used the rename trick of ibman section 15.1 to recover a temp table, InnoDB asserted because it tried to lock the data dictionary twice
2003-10-06 10:46:22 +03:00
heikki@hundin.mysql.fi
3b7140aed0 row0sel.c:
Fix buglets in previous push
2003-09-12 01:35:32 +03:00
heikki@hundin.mysql.fi
be05042bae row0sel.c:
Fix bug: if a primary key contains more than one column, then MySQL seems to do fetch next even for a unique search condition: this in turn caused unnecessary locking which did not agree what the InnoDB manual promised
2003-09-12 00:31:43 +03:00
monty@mashka.mysql.fi
7538242e4f merge with 4.1 tree 2003-09-11 20:31:40 +03:00
monty@mashka.mysql.fi
73f66f68fd merge with 4.0.15 2003-09-11 20:24:14 +03:00
serg@serg.mylan
503e7c930c Merge 2003-09-08 16:55:30 +02:00
greg@mysql.com
088406deb9 Windows fix to avoid VC++ 6.0 compiler bug, which prevents compilation when function calls are present inside an expanded inline function 2003-09-04 16:00:05 -04:00
serg@serg.mylan
3d3f11f832 making InnoDB to return the row exactly the same (bytewise) as it was written to it 2003-09-03 11:37:59 +02:00
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
heikki@hundin.mysql.fi
5c4c294a42 btr0btr.c:
Fix bug: if the user created a prefix column key on a fixed length char column, then InnoDB claimed in CHECK TABLE that the table is corrupt
dict0dict.c:
  Fix bug 1151: if the user created a prefix column primary key on a fixed length char column, then InnoDB crashed in a simple SELECT
2003-08-28 02:00:46 +03:00
heikki@hundin.mysql.fi
ea5f464d20 os0file.c:
strerror() does not work in Windows
2003-08-24 03:44:16 +03:00
monty@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
heikki@hundin.mysql.fi
14f2fc28b6 log0log.c:
Fix assertion failure reported by Alex Kiernan when we compile with the SUN Forte Developer 7 C 5.4 compiler
2003-08-01 12:13:52 +03:00
heikki@hundin.mysql.fi
d7ea863d6b dict0dict.c:
Fix bug introduced in 4.0.13 and reported by Emic: if a CREATE TABLE ended in a comment, a memory overrun could happen
2003-07-30 01:12:33 +03:00
heikki@hundin.mysql.fi
c1b62170a7 srv0srv.c, os0file.c, log0recv.h, log0log.h, fil0fil.h, fsp0fsp.c, fil0fil.c:
Merge
trx0trx.c:
  Print more info about a trx in SHOW INNODB status; try to find the bug reported by Plaxo
buf0buf.c:
  Check that page log sequence numbers are not in the future
log0recv.c, log0log.c:
  Fixed a bug: if you used big BLOBs, and your log files were relatively small, InnoDB could in a big BLOB operation temporarily write over the log produced AFTER the latest checkpoint. If InnoDB would crash at that moment, then the crash recovery would fail, because InnoDB would not be able to scan the log even up to the latest checkpoint. Starting from this version, InnoDB tries to ensure the latest checkpoint is young enough. If that is not possible, InnoDB prints a warning to the .err log
2003-07-25 22:26:39 +03:00
heikki@hundin.mysql.fi
3711f4e985 btr0cur.c:
Fix bug: if there was a 'record too long' error in an insert, InnoDB forgot to free reserved file space extents; they were only freed in mysqld restart
2003-07-22 10:14:43 +03:00
heikki@hundin.mysql.fi
52706fd316 btr0cur.c:
Fix an error in the previous push
2003-07-22 03:23:02 +03:00
heikki@hundin.mysql.fi
8e96f02983 btr0cur.c:
Fix bug reported by Dyego Souza do Carmo: if a row becomes too long, > 8000 bytes, in an update, then InnoDB simply removes the clustered index record and does not report of table handler error 139
2003-07-22 02:44:55 +03:00
heikki@hundin.mysql.fi
38595b1f28 srv0srv.c:
Put back a 50 millisecond sleep in too high concurrency situations which I removed in the previous push; count also such sleeping threads to the InnoDB queue in SHOW INNODB STATUS
2003-07-13 18:50:43 +03:00
heikki@hundin.mysql.fi
b46400b23e srv0srv.c:
Fix a benign bug introduced in 4.0.14: InnoDB could complain 'Error: trying to declare trx to enter InnoDB' if several threads tried to init the auto-inc counter for the same table at the same time; in theory, the bug could even lead to a hang of the server, but that shuld be extremely improbable
2003-07-13 17:18:06 +03:00
heikki@hundin.mysql.fi
2340cff77a srv0start.c, srv0srv.h, os0file.h, os0file.c:
Allow also O_DIRECT as innodb_flush_method; it only affects writing to data files
2003-07-13 00:17:02 +03:00
heikki@hundin.mysql.fi
99d224420d trx0trx.c:
A cosmetic change: set trx id to zero at creation so that SHOW INNODB STATUS does not print a random value for the id of a transaction object for which the transaction has never been started yet (for example, running SHOW INNODB STATUS as the first command from a mysql prompt printed a random id for the trx object associated with the session itself running the SHOW INNODB STATUS command)
2003-07-08 14:16:27 +03:00
heikki@hundin.mysql.fi
7be1beb2d3 row0mysql.c:
Fix performance bug: if there were thousands of tables, DROP TABLE could take as much as a second CPU time
2003-07-06 18:01:51 +03:00
heikki@hundin.mysql.fi
e387dac042 srv0srv.c:
In background loop run purge to completion before doing other background operations: it does not make sense to flush buffer pool pages if they are soon modified again by purge
trx0purge.c:
  Increase purge_sys->n_pages_handled for every undo log we purge, even if that log would be only a hundred bytes: that way we get the purge batches of 20 pages to set a fresh purge view (limit) more often, and we can reduce the number of old row versions purge has to look at when it decides if it can remove some delete-marked index record
2003-07-06 16:17:02 +03:00
heikki@hundin.mysql.fi
2a1f87ff72 Many files:
Remove potential starvation of a full log buffer flush: only flush up to the lsn which was the largest at the time when we requested the full log buffer flush
os0sync.h, os0sync.c:
  Fix a bug in os_event on Unix: even though we signaled the event, some threads could continue waiting if the event became nonsignaled quickly again; this made group commit less efficient than it should be
2003-07-03 21:25:55 +03:00
heikki@hundin.mysql.fi
b2769e2792 trx0trx.c:
Fix bug: group commit still did not work when we had MySQL binlogging on
2003-07-03 17:36:33 +03:00
heikki@hundin.mysql.fi
67b6ba21c3 lock0lock.c:
Remove outdated comment and the corresponding assertion in debug version code
2003-07-03 03:34:20 +03:00
heikki@hundin.mysql.fi
00c557b9c4 sync0sync.c:
Make execution with UNIV_SYNC_DEBUG faster
2003-07-02 13:03:59 +03:00
heikki@hundin.mysql.fi
785b17db96 lock0lock.c:
Fix a latching order violation in the previous (2003-06-15) push: could lead to a hang on the btr0sea.c semaphore
2003-07-02 04:57:31 +03:00
heikki@hundin.mysql.fi
e2efb08c50 dict0dict.h, dict0dict.c, ha_innodb.cc:
In ORDER BY MySQL seems to set the key read flag also in the case where the primary key contains only a prefix of a column - not the whole column; to prevent potential bugs retrieve the whole column if the index contains a prefix of it
2003-06-22 16:20:06 +03:00
heikki@hundin.mysql.fi
eb0a4977ca page0page.c:
Track an assertion failure reported on the mailing list June 18th, 2003
2003-06-19 01:05:24 +03:00
heikki@hundin.mysql.fi
b8cc47797a row0vers.c:
Add forgotten mutex_enter()
2003-06-18 03:53:18 +03:00
heikki@hundin.mysql.fi
6d4fe0280f row0vers.c:
Add forgotten mtr_commit()
2003-06-18 03:49:34 +03:00
heikki@hundin.mysql.fi
d970e339dd row0sel.c, row0ins.c:
Fix error in previous push
2003-06-18 03:38:09 +03:00
heikki@hundin.mysql.fi
01eb3d1e62 row0vers.c, row0sel.c, row0ins.c:
Fix bug: InnoDB could print that it cannot find a clustered index record if an update undo, purge, and a consistent read coincided, in rare cases it might also have returned a wrong row in a query
2003-06-18 02:18:19 +03:00
heikki@hundin.mysql.fi
29796e6240 row0mysql.c, dict0dict.ic:
Cleanup
ha_innodb.cc, data0type.h:
  Make sure non-latin1 users can downgrade from 4.0.14 to an earlier version if they have not created DATA_BLOB column prefix indexes
2003-06-16 00:39:46 +03:00
heikki@hundin.mysql.fi
4da7f485b7 Many files:
Merge InnoDB-4.0.14: SAVEPOINT now implemented; InnoDB now accepts also column prefix keys; crashing bug in ON UPDATE CASCADE fixed; page checksum formula fixed
2003-06-15 01:04:28 +03:00
monty@narttu.mysql.fi
7a54334443 Merge with 4.0.13 2003-06-05 17:33:38 +03:00
monty@narttu.mysql.fi
8ad4a240d2 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-06-04 23:17:45 +03:00
monty@narttu.mysql.fi
40109c574a Merge with 4.0.13 2003-06-04 19:21:51 +03:00
monty@narttu.mysql.fi
100a66e6cb Added [mysqld-base-version] as a default group for the mysqld server
Portability fix for Windows 64
2003-06-04 16:05:27 +03:00
heikki@hundin.mysql.fi
ce8e0aa0c4 os0sync.c:
Do not try to reserve os_sync_mutex in shutdown after it has been freed
2003-06-02 17:58:18 +03:00
heikki@hundin.mysql.fi
5eaa3c4e34 com0shm.c:
Removed auto event creation because it is not needed in any MySQL/InnoDB code
2003-06-02 16:11:06 +03:00
heikki@hundin.mysql.fi
eebdcd0c5f os0file.c:
Put back Monty's patch which the previous push accidentally erased: print also operation type in os_file_handle_error()
2003-06-02 13:45:45 +03:00
heikki@hundin.mysql.fi
e8e98d05f9 os0thread.h, os0sync.ic, os0sync.h, os0thread.c, os0sync.c, os0file.c:
Release all event semaphores at shutdown also in Windows
srv0start.c, srv0srv.c:
  make test sometimes failed because lock timeout thread exited without decrementing the InnoDB thread counter
2003-06-02 13:11:20 +03:00
monty@narttu.mysql.fi
f6a365a532 Small fixes (nothing nameworthy) 2003-06-01 23:40:01 +03:00
heikki@hundin.mysql.fi
dcdc6ffadc os0thread.c, os0thread.h, os0sync.h:
Cleanup
os0sync.c:
  Free all OS sync primitives and allocated memory in InnoDB shutdown
2003-05-31 03:23:42 +03:00
heikki@hundin.mysql.fi
42671d18ae Many files:
Free all OS sync primitives and allocated memory in InnoDB shutdown
2003-05-31 03:12:03 +03:00
heikki@hundin.mysql.fi
cfda0a16ff srv0start.c:
Cleanup
2003-05-30 23:00:37 +03:00
heikki@hundin.mysql.fi
d1759530d3 Many files:
Exit all threads created by innoDB at shutdown
2003-05-30 22:44:37 +03:00
heikki@hundin.mysql.fi
4ac8d7b963 row0ins.c:
Disable UNIQU KEY error reporting in SHOW INNODB STATUS until we know if it slows down REPLACE significantly
2003-05-22 00:05:33 +03:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
heikki@hundin.mysql.fi
6ba4c68728 srv0start.c:
Better instructions for the user if adding of new ibdata files fails
2003-05-18 21:46:19 +03:00
heikki@hundin.mysql.fi
526bb7dc7b buf0buf.c:
When calculating the buf pool dirty pages ratio, add also free pages to the LRU list length: no need to active flushing if there are lots of free pages in the buffer pool
2003-05-17 16:23:46 +03:00
heikki@hundin.mysql.fi
5359d04608 buf0lru.c, buf0flu.c, buf0buf.c, buf0lru.h:
Search first only 10 % of the LRU list for a replaceable block before doing an LRU flush; enable again flushing of close pages also in a flush list (checkpointing) flush
trx0trx.c:
  Add forgotten return value (it was not used anywhere, fortunately)
ha_innodb.h, mysql_priv.h:
  Move declaration of srv_buf_pool_max_modified_pct to ha_innodb.h and enclose it to denote it is a C variable, not C++
2003-05-16 16:27:50 +03:00
heikki@hundin.mysql.fi
53b7eaf9ca os0sync.c:
Check return value of pthread_cond_...
2003-05-14 20:22:55 +03:00
heikki@hundin.mysql.fi
cef5df827a os0sync.c:
Check that pthread_mutex_init and pthread_mutex_destroy return 0
2003-05-14 20:17:01 +03:00
heikki@hundin.mysql.fi
75e49549a5 os0sync.c:
We had forgotten to call pthread_mutex_destroy when we free an OS mutex in Unix
2003-05-14 19:00:17 +03:00
heikki@hundin.mysql.fi
9ec42178e9 srv0start.c, trx0sys.c:
Let InnoDB to skip writing of pages from the doublewrite buffer if innodb_force_recovery=6; normally, if the page is corrupt AND the corresponding page in the doublewrite buffer is also corrupt, InnoDB calls exit(1)
2003-05-12 17:33:42 +03:00
heikki@hundin.mysql.fi
fa08fdfaef buf0lru.c, buf0flu.c:
Better warning message if more than 4 / 5 of the buffer pool is consumed by locks of adaptive hash index
2003-05-05 10:54:56 +03:00
heikki@hundin.mysql.fi
aa92b8ecd1 row0ins.c, dict0dict.c, dict0dict.h, srv0srv.c:
Let SHOW INNODB STATUS print detailed info of the latest unique key violation, note that REPLACE and INSERT IGNORE mask the error from the user
2003-05-04 23:24:23 +03:00
heikki@hundin.mysql.fi
9dd21162bb os0file.c:
Print progress information if at startup InnoDB creates and writes bigger than 100 MB data file or log file
2003-05-04 15:42:47 +03:00
heikki@hundin.mysql.fi
eab9a5e005 srv0srv.c:
Do not let the main thread sleep the 1 second if we had to do a bug pool flush batch trying to establish srv_max_buf_pool_modified_pct
2003-05-04 15:14:33 +03:00
heikki@hundin.mysql.fi
33e1b9398a srv0srv.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
2003-05-03 19:46:03 +03:00
heikki@hundin.mysql.fi
971f770946 buf0buf.c, srv0srv.h, buf0buf.h, srv0srv.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
2003-05-03 19:44:46 +03:00
heikki@hundin.mysql.fi
35fd869e51 Many files:
Eliminate the LOCK_log bottleneck in group commit in binlogging: flush InnoDB log files only after it has been released
2003-05-03 02:29:40 +03:00
heikki@hundin.mysql.fi
a1861ddb22 trx0trx.h, trx0trx.c, ha_innodb.cc:
Remove code never actually used in IGNORE; InnoDB just rolls back the latest row insert or update on a duplicate key error and leaves it for MySQL to decide whether to ignore the error
2003-04-27 17:25:39 +03:00
heikki@hundin.mysql.fi
4cca7b5b50 srv0start.c:
fflush stderr after startup
2003-04-26 20:57:13 +03:00
heikki@hundin.mysql.fi
4393bab73c ut0dbg.h:
Print the failing assertion if it fails; helps to analyze bug reports
2003-04-25 21:12:44 +03:00
heikki@hundin.mysql.fi
8a1eeca9be srv0srv.c:
Make sure we do not do insert buffer merge in fast shutdown even if there is some buglet which increments srv_activity_counter during a shutdown
2003-04-24 23:03:00 +03:00
heikki@hundin.mysql.fi
3866d38057 srv0srv.c:
Make buffer pool flush batches bigger as that may save some time if fsync is very inefficient
2003-04-24 21:51:00 +03:00
heikki@hundin.mysql.fi
32a987834f row0mysql.c:
Give sensible advice to the user if InnoDB notices index corruption
2003-04-23 02:51:25 +03:00
heikki@hundin.mysql.fi
ea0dbedcb1 buf0buf.c:
No buffer pool activity in SHOW INNODB STATUS actually meant no page gets
2003-04-21 12:56:54 +03:00
heikki@hundin.mysql.fi
4f77f6a4d8 univ.i:
If HAVE_purify is defined, define UNIV_SET_MEM_TO_ZERO to eliminate Purify warnings
2003-04-20 19:36:09 +03:00
heikki@hundin.mysql.fi
90e23ebe94 buf0buf.c:
Do not set buffer pool to zero when we start up: that takes too much time for big buffer pools; Purify users must define UNIV_SET_MEM_TO_ZERO in univ.i to eliminate spurious (?) Purify warnings
2003-04-19 20:09:01 +03:00
heikki@hundin.mysql.fi
b914d2e3cc ha_innodb.h, ha_innodb.cc:
Make InnoDB to restore old active_index value after a table scan: MySQL may assume that a scan does NOT change active_index; this partially fixes bug 241 of UPDATE ... ORDER BY ... but it still remains that MySQL actually ignores the ORDER BY for both MyISAM and InnoDB tables
log0recv.c:
  Use fflush to make sure report of a corrupt log record is printed to .err log before mysqld crashes
2003-04-18 18:42:43 +03:00
heikki@hundin.mysql.fi
f787cb1434 row0sel.c:
Do not allow InnoDB to cache result set in HANDLER because user can use PREV and NEXT and scroll the cursor
2003-04-17 02:51:50 +03:00
heikki@hundin.mysql.fi
3a77f47a04 ha_innodb.cc, row0sel.c, row0mysql.c, row0mysql.h:
Allow HANDLER PREV and NEXT also after positioning the cursor with a unique search on the primary key
2003-04-17 02:28:40 +03:00
heikki@hundin.mysql.fi
5112674d70 row0ins.c:
Better fix for the ON DELETE SET NULL problem
2003-04-16 23:05:22 +03:00
heikki@hundin.mysql.fi
609c8d9c62 row0ins.c:
Fix bug: we did not allow ON DELETE SET NULL to modify the same table where the delete was made; we can allow it because that cannot produce infinite loops cascaded operations
2003-04-16 22:50:12 +03:00
heikki@hundin.mysql.fi
c60ca95e06 row0sel.c:
Fix crash in HANDLER PREV or NEXT if the cursor was positioned using a unique search condition on the primary key: in that case InnoDB does NOT store the cursor position for later fetch prev or next
2003-04-16 21:36:42 +03:00
heikki@hundin.mysql.fi
f841b4ae23 Many files:
Merge InnoDB-4.0.13; DROP FOREIGN KEY now works
2003-04-16 16:45:01 +03:00
lenz@mysql.com
dbe145f015 - Fixed bug in "make DESTDIR=<dir> install" - the InnoDB static
libraries always ended up in "dir..", even though they were not supposed
   to be installed anyway (they are only required at link time). Fixed it by
   replacing libs_LIBRARIES with noinst_LIBRARIES for all InnoDB Makefile.am 
   files and by removing "libsdir = " from innobase/include/Makefile.i .
2003-04-10 20:03:52 +02:00
monty@narttu.mysql.fi
112dfa5900 Fixes for fill_help_tables.sql 2003-03-21 18:53:55 +02:00
monty@narttu.mysql.fi
b883a9c01c Merge with 4.0.12 2003-03-19 22:25:44 +02:00
monty@narttu.mysql.fi
c2fa342d53 Merge with 3.23 to get fix for halloween problem on Update of InnoDB tables 2003-03-18 03:19:20 +02:00
monty@narttu.mysql.fi
a434bca704 Merge with 4.0 2003-03-16 19:17:54 +02:00
heikki@hundin.mysql.fi
852b1b3dc5 row0mysql.c:
Test if merging from 3.23 to 4.0 succeeds
2003-03-16 14:40:41 +02:00
heikki@hundin.mysql.fi
1573226e69 trx0roll.c:
Fix compiler warning in Windows about ib_longlong to ulint conversion
2003-03-16 09:01:47 +02:00
heikki@hundin.mysql.fi
008e1d29a3 row0sel.c:
Fix bug number 154: GROUP BY and DISTINCT could treat NULL values inequal
2003-03-15 20:05:55 +02:00
heikki@hundin.mysql.fi
c4370278a0 row0sel.c:
Fix bug number 154: GROUP BY and DISTINCT could treat NULL values inequal
2003-03-15 20:05:03 +02:00
serg@serg.mysql.com
6b016eb5fa .del-stamp-h.in~4a5d6676232516c5:
Delete: innobase/stamp-h.in
2003-03-10 00:21:04 +01:00
heikki@hundin.mysql.fi
2f81f083d1 os0file.c:
Fix bug in previous push
2003-03-07 10:20:44 +02:00
heikki@hundin.mysql.fi
184c7fee8d os0file.c:
Print and error message also if a read from file results in the Linux error EEXIST; may happen if the disk is broken
2003-03-07 10:07:06 +02:00
heikki@hundin.mysql.fi
ac5135860d buf0buf.c:
Do not try to resolve the table name of a corrupt page if the code is in ibbackup, i.e., the dict system is not initialized
2003-03-04 14:05:23 +02:00
heikki@hundin.mysql.fi
177f584f90 srv0start.c:
Print a more precise error message if log files or data files are of a size different from what is specified in my.cnf
2003-03-03 16:29:16 +02:00
heikki@hundin.mysql.fi
a70dcd404c trx0sys.c, trx0roll.c, srv0start.h:
Print trx rollback progress info in crash recovery
2003-03-02 22:34:09 +02:00
monty@narttu.mysql.fi
9a46698e1e Merge with 4.0.11 2003-02-26 01:03:47 +02:00
monty@narttu.mysql.fi
326b8abc89 merge with 3.23 to get corrected error message files and rename of files in mysql-test 2003-02-26 00:22:35 +02:00
heikki@hundin.mysql.fi
c9cb735f58 ut0mem.c:
Correct printf format
2003-02-24 16:13:17 +02:00
heikki@hundin.mysql.fi
babd0e87e6 ut0mem.c:
Print correct OS error number also on Windows if we run out of memory
2003-02-24 16:05:54 +02:00
heikki@hundin.mysql.fi
5e7796c070 ibuf0ibuf.c:
Add diagnostic prints if insert buffer merge is tried to a page whose type is not an index page, try to recover from the situation by discarding the insert buffer records
2003-02-21 23:11:31 +02:00
heikki@hundin.mysql.fi
61ccb631bb row0sel.c:
Print a warning if MySQL uses a partial-field key value prefix in a search; that would not work if the search flag would happen to be HA_READ_PREFIX_LAST
2003-02-19 19:38:38 +02:00
heikki@hundin.mysql.fi
e690ea09f7 page0cur.c:
Prepare for 5.x where HA_READ_PREFIX_LAST may pass only a few first bytes of the last field in a key value
ha_innodb.cc:
  In 4.0 always assume HA_READ_PREFIX_LAST passes a complete-field prefix of a key value; LIKE queries use a padding trick
2003-02-18 19:43:41 +02:00
monty@mashka.mysql.fi
7388c5f161 merge 2003-02-08 01:12:58 +02:00
heikki@hundin.mysql.fi
a1a63f2d95 page0cur.c:
Disable PAGE_CUR_LE_OR_EXTENDS because it does not work for non-latin1 char sets now
2003-02-07 17:44:09 +02:00
monty@mashka.mysql.fi
b14b246d38 Merge with 4.0 to get fix for MIN/MAX 2003-02-07 16:38:37 +02:00
heikki@hundin.mysql.fi
d2ef0ed85f page0cur.c:
Sinisas patch to InnoDB ORDER BY DESC bug, push it now so that Jani has it available
2003-02-07 00:44:32 +02:00
monty@mashka.mysql.fi
023d6dd39b Merge with 4.0.11 2003-02-04 21:52:14 +02:00
heikki@hundin.mysql.fi
0da4275063 config-win.h, os0proc.h, os0proc.c, srv0start.c:
Make AWE compilation depend on __WIN2000__
2003-01-30 18:52:45 +02:00
monty@mashka.mysql.fi
152f0603e7 Merge with 3.23.56 (Replace manual with 'empty' document)
Fix for bug when using auto_increment column and LAST_INSERT_ID()
2003-01-28 08:51:03 +02:00
monty@mashka.mysql.fi
689578a099 Fixes for Netware
Call pthread_mutex_destroy() on not used mutex.
Changed comments in .h and .c files from // -> /* */
Added detection of mutex on which one didn't call pthread_mutex_destroy()
Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression"
Added optimisation for ORDER BY NULL
2003-01-28 08:38:28 +02:00
heikki@hundin.mysql.fi
2162408b26 btr0cur.c:
Backport from 4.0: Fix a major bug in InnoDB query estimator for queries of type SELECT ... WHERE col < x and SELECT ... WHERE col > x; MySQL could pick a table scan though the result set was only a few rows in a big table
2003-01-28 01:14:06 +02:00
monty@mashka.mysql.fi
1bdd1d0626 Merge with 3.23.55 2003-01-25 15:31:07 +02:00
monty@mashka.mysql.fi
25c393a12e Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster.
2003-01-21 21:07:59 +02:00
heikki@hundin.mysql.fi
ed62ee1c74 os0file.c:
The problem yesterday in ERROR_LOCK_VIOLATION was not InnoDB Hot Backup, but some file system backup tool: add to file writes 100 retries with 1 second waits
2003-01-21 13:37:41 +02:00
heikki@hundin.mysql.fi
3e6bfd724f os0file.c:
Fix an assertion about ERROR_LOCK_VIOLATION 33 in file write if InnoDB Hot Backup is run concurrently with mysqld in Windows
2003-01-21 00:18:48 +02:00
monty@mashka.mysql.fi
12ab0651c6 merge with 4.0 to get bug fix for SHOW PROCESSLIST + connected slave 2003-01-19 02:28:07 +02:00
heikki@hundin.mysql.fi
375fcfa580 btr0sea.c:
Backport from 4.0: fix bug in adaptive hash index search
2003-01-18 15:16:26 +02:00
heikki@hundin.mysql.fi
8fc51bb427 btr0sea.h, btr0sea.c:
Fix a crash in page_dir_find_owner_slot if an adaptive hash index search coincides with purge or an insert
2003-01-18 15:01:56 +02:00
monty@mashka.mysql.fi
76f146a175 Merge with 4.0.9 2003-01-18 03:13:37 +02:00
heikki@hundin.mysql.fi
7c63696a42 page0cur.c:
Fix bug in PAGE_CUR_LE_OR_EXTENDS search
2003-01-17 15:26:13 +02:00
heikki@hundin.mysql.fi
eb22615ec7 lock0lock.c:
Fix a bug in the query cache algorithm for the AUTOCOMMIT=0 case
2003-01-16 18:35:04 +02:00
heikki@hundin.mysql.fi
91ba134512 btr0btr.h, btr0btr.c, row0purge.c:
Backport from 4.0: fix the BLOB hang if the index tree is of height 1
2003-01-16 01:21:13 +02:00
heikki@hundin.mysql.fi
244b378b47 srv0srv.c:
Make SHOW INNODB STATUS aware which trx's are waiting because of innodb_thread_concurrency exceeded
2003-01-15 22:48:02 +02:00
heikki@hundin.mysql.fi
97279ea8de trx0trx.c:
Print also the thread ids in SHOW INNODB STATUS also in Linux
2003-01-15 21:26:45 +02:00
heikki@hundin.mysql.fi
7424bf2ea9 btr0cur.h, btr0btr.h, btr0btr.c, btr0cur.c, row0purge.c:
Fix a hang associated with an index tree of height 1 and purging of BLOB fields from it
2003-01-13 15:52:39 +02:00
heikki@hundin.mysql.fi
40689f64e7 srv0srv.c:
Add another diagnostic print to determine why the 'queries inside InnoDB' counter might drift upwards
2003-01-13 00:44:42 +02:00
heikki@hundin.mysql.fi
8e6a4c6201 ut0mem.c, row0sel.c, row0mysql.c, ut0mem.h, row0sel.h, row0mysql.h:
Test allocation of memory beforehand if we are trying to return a > 2 MB BLOB; normally InnoDB asserts if memory allocation fails
ha_innodb.cc:
  Do not fetch all columns if change_active_index() is called during a query; a sum(a), max(a) query seemed to do that, doing unnecessary copying (the change actually made in the previous bk ci)
  Free BLOB heap of handle when MySQL calls some ::extra()'s
2003-01-12 23:58:56 +02:00
heikki@hundin.mysql.fi
c314981049 trx0trx.c:
Add diagnostic prints to determine why the 'queries inside InnoDB' might drift upwards
ha_innodb.cc:
  Add more print space to SHOW INNODB STATUS; remove possible memory leak in case there is an error
2003-01-12 22:31:16 +02:00
heikki@hundin.mysql.fi
091bc7f56a buf0buf.c:
Add a sanity check awe mem >= buf pool size
2003-01-09 00:29:49 +02:00
heikki@hundin.mysql.fi
d5a1ddd46e os0proc.c:
Fix typos
2003-01-09 00:13:47 +02:00
heikki@hundin.mysql.fi
be03863425 srv0srv.c, mem0pool.c, mem0pool.h, buf0buf.h, buf0buf.c:
Make smaller buffer headers and the lock table; fix AWE high_end bug
2003-01-09 00:10:36 +02:00
heikki@hundin.mysql.fi
d1396cc047 mem0pool.c:
Remove the warning message that mem allocation spills from the additional mem pool to the OS; this does not hit performance with modern malloc libraries
2003-01-07 21:20:43 +02:00
heikki@hundin.mysql.fi
b1b47e93b1 buf0buf.c, buf0buf.ic, buf0buf.h:
Reduce memory usage of the buffer headers
Many files:
  Merge InnoDB-4.1 with AWE support
2003-01-06 22:07:25 +02:00
heikki@hundin.mysql.fi
42095544ea log0log.c:
Backport bugfix from 4.0: combined log file size >= 2 GB could cause log to be written in wrong place
btr0pcur.c:
  Backport bugfix from 4.0: index cursor restoration could theoretically fail
2003-01-05 22:15:03 +02:00
heikki@hundin.mysql.fi
7d33418bcd btr0pcur.c:
Fix bug: an index cursor can theoretically be restored in a wrong place
log0log.c:
  Fix bug: if combined log file size is >= 2 GB in a 32-bit computer InnoDB can write log to a wrong position
2003-01-05 21:58:06 +02:00
monty@mashka.mysql.fi
9ecf9645eb A lot of portability fixes.
Added rename table for BDB. This fixes a bug in ALTER TABLE with BDB tables.
2003-01-05 20:18:49 +02:00
heikki@hundin.mysql.fi
843e1d8e9c Many files:
Merge InnoDB-4.0.7. Support for ON UPDATE CASCADE
sql_select.cc:
  Remove superfluous prints to .err log when a locking SELECT fails to a deadlock or a lock wait timeout
2002-12-22 01:54:29 +02:00