Commit graph

406 commits

Author SHA1 Message Date
heikki@hundin.mysql.fi
9bf1be457a sql_table.cc:
Fix bug #3749: if there were several indexs that made an automatically generated FOREIGN KEY index redundant, then MySQL miscalculated the number of keys, and the AUTO_INCREMENT flag was forgotten by MySQL from a PRIMARY KEY. There were probably a multitude of other errors caused by this.
2004-05-14 09:02:06 +03:00
monty@mysql.com
116f61c656 Don't automaticly generate a new key for a foreign key constraint if there is already a usable key.
Prefer not automatic keys before automatic keys. If there is two conf
2004-05-12 00:29:52 +03:00
marko@hundin.mysql.fi
1c407e4391 Merge marko@build.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/j/mysql-4.1
2004-05-07 16:01:47 +03:00
marko@hundin.mysql.fi
11f9ec1dc5 Merge marko@build.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/j/mysql-4.1
2004-05-07 12:48:01 +03:00
ingo@mysql.com
5c4f83bbd9 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-wl1687
2004-05-07 11:13:58 +02:00
monty@mysql.com
523c2935c9 Portablity fix for system with case insenstive table names. (Without this ALTER TABLE can fail for InnoDB) 2004-05-07 06:34:44 +03:00
ingo@mysql.com
784c9526ec WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
HEAP: Copies the key count to a backup variable and sets the key count to zero.
That way, no HEAP function will ever try to touch any index.
Re-enabling is done by copying back the backup variable.
To avoid memory leak at table close, disable deletes all index trees.
Re-enabling must be done with empty indexes and data anyway. Otherwise,
the indexes would need to be repaired, wich HEAP is not capable of.
MyISAM: Only the key_map is cleared and set.
Re-enabling must be done with empty indexes and data. Otherwise, repair needs
to be done which will enable all keys persistently.
The former implementation disabled only non-unique keys and maked this persistent.
The new implementation additionally can disable all keys, but only without
making this persistent. Re-enabling all keys can be done without repair,
if data file and indexes are empty.
2004-05-06 15:53:01 +02:00
marko@hundin.mysql.fi
6a6fa5b388 Merge marko@build.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/j/mysql-4.1
2004-05-05 14:21:42 +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
marko@hundin.mysql.fi
df5336a3cc Introduce keys in child tables corresponding to FOREIGN KEYs
Remove redundant keys in CREATE TABLE and ALTER TABLE
2004-04-21 13:15:43 +03:00
magnus@neptunus.(none)
7c2c408cb8 Added NDB storage engine 2004-04-15 09:14:14 +02:00
monty@mysql.com
62fa4013ce Don't enable HA_EXTRA_WRITE_CACHE if too few rows
Revert main parts of patch for online index builds. Should be done differently
Added support for %lx in my_snprintf()
2004-04-08 17:56:45 +03:00
serg@serg.mylan
1c0d4c4a46 merged 2004-04-07 17:14:38 +02:00
serg@serg.mylan
6ebf869b40 merged 2004-04-07 16:20:46 +02:00
ingo@mysql.com
06bca26041 Fix for Hand-Merge 2004-04-07 16:06:09 +02:00
serg@serg.mylan
6fc74e13e7 post-review fixes
HA_EXTRA_WRITE_CACHE now part of start_bulk_insert()
test cleanups
2004-04-07 16:04:28 +02:00
ingo@mysql.com
4de7e18b81 Hand-resolved auto merge 2004-04-07 14:56:24 +02:00
ingo@mysql.com
ce816b351c Worklog#1563 - Support of on-line CREATE/DROP INDEX.
Corrected minor problems of the preceding changeset 1.1705.
2004-04-07 13:12:05 +02:00
serg@serg.mylan
e8eda8129f ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert()
Field::val_str simplification, comment
2004-04-06 21:35:26 +02:00
monty@mysql.com
7ca9a70583 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-04-06 17:17:15 +03:00
vva@eagle.mysql.r18.ru
0cc998a466 fixed the tests mysql-test/t/synchronization.test
for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination table
2004-04-06 19:17:13 +05:00
monty@mysql.com
49330f61da Fixed warnings from valgrind (not a bug)
Don't add -debug to server version if MYSQL_SERVER_PREFIX is used
Indentation cleanups
2004-04-06 12:13:43 +03:00
vva@eagle.mysql.r18.ru
5f2d73ed96 Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2385/mysql-4.1
2004-04-03 02:46:12 +05:00
vva@eagle.mysql.r18.ru
8cc3b3cfdc made some optimization of last patch for
Bug #2385 "CREATE TABLE LIKE lacks locking on source and destination table" 
(in sql_table.cc and mysql-test/t/synchronization.test)
2004-04-03 02:44:38 +05: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
vva@eagle.mysql.r18.ru
15cd52c6cb added synchronization in mysql_create_like_table
(
fixed BUG #2385 CREATE TABLE LIKE lacks locking on source and destination table
and added tests for it
)
2004-04-01 23:13:25 +05:00
ingo@mysql.com
85ec87a094 Worklog#1563 - Support of on-line CREATE/DROP INDEX.
This is to enable table handlers to implement online create/drop index.
It consists of some parts:
- New default handler methods in handler.h
- Split of mysql_alter_table. It decides if only one kind of
  alteration is to be done (e.g. only create indexes or only drop
  indexes etc.) It then calls the specialized new handler method if
  the handler implements it. Otherwise it calls real_alter_table.
- The parser sets flags for each alter operation detected in a
  command. These are used by mysql_alter_table for the decision.
- mysql_prepare_table is pulled out of mysql_create_table. This is
  also used by mysql_create_index to prepare the key structure array
  for the handler. It is also used by mysql_create_index and
  mysql_drop_index to prepare a call to mysql_create_frm.
- mysql_create_frm is pulled out of rea_create_table for use by
  mysql_create_index and mysql_drop_index after the index is
  created/dropped.
Thanks to Antony who supplied most of the changes.
2004-03-30 19:22:14 +02:00
monty@mysql.com
4bc6b551f8 false/true -> FALSE/TRUE
Fixes after last merge
2004-03-30 02:32:41 +03:00
monty@mysql.com
dc2f606fb8 Merge with 4.0 to get lastest bug fixes 2004-03-29 19:21:53 +03:00
vva@eagle.mysql.r18.ru
8a66c13b34 fixed bug #2342
"Running ANALYZE TABLE on bdb table inside a transaction hangs server thread"
2004-03-27 02:29:31 +04:00
vva@eagle.mysql.r18.ru
23d30c397d fixed bug #2342
"Running ANALYZE TABLE on bdb table inside a transaction hangs server thread"

1. added new status HA_ADMIN_REJECT and processing of it in mysql_admin_table
2. got ha_berkley::analyze to return HA_ADMIN_REJECT if there are any 
 transactions with the table..
2004-03-27 00:35:45 +04:00
bar@bar.intranet.mysql.r18.ru
3aea3e92ce 1. New data types, from the user point of view:
BINARY(N) and VARBIBARY(N)
2. More 4.0 compatibility and more BINARY keyword consistency:
2a. CREATE TABLE a (a CHAR(N) BINARY) 
    is now synonym for
    CREATE TABLE a (a CHAR(N) COLLATE xxxx_bin)
2b. SELECT BINARY x
    is still synonin for
    SELECT x COLLATE xxxxx_bin.
2004-03-26 16:11:46 +04:00
bell@sanja.is.com.ua
f90e7c24e8 fixed debug information 2004-03-23 19:28:18 +02:00
bar@bar.intranet.mysql.r18.ru
f897144c4e Bug #2821 Table default character set affects LONGBLOB fields 2004-03-19 11:37:49 +04:00
monty@mysql.com
350b433569 merge with 4.0 2004-03-16 22:41:30 +02:00
monty@mysql.com
56af3931e0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
2004-03-16 00:04:07 +02:00
serg@serg.mylan
3351b01d83 cleanup 2004-03-15 22:02:47 +01:00
monty@mysql.com
cf66e187e2 Optimizations 2004-03-15 12:53:27 +02:00
vva@eagle.mysql.r18.ru
283d455711 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_856/mysql-4.1
2004-03-14 01:33:16 +04:00
vva@eagle.mysql.r18.ru
b3cb4dace5 fixed bug #856 'Naming a key "Primary" causes trouble' 2004-03-14 01:31:30 +04:00
vva@eagle.mysql.r18.ru
5bada5ee99 fixed bug #1427 "enum allows duplicate values in the list" 2004-03-13 23:13:31 +04:00
monty@mysql.com
4ee44751d9 Fixed memory leak in DROP DATABASE when using RAID tables (Bug #2882) 2004-03-10 13:46:11 +02:00
serg@serg.mylan
6af8a93052 Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-02-17 17:07:14 +01:00
serg@serg.mylan
b8e161be4b if a key length exceeds the supported maximum and it is safe to auto-decrease it, do it. 2004-02-17 16:57:39 +01:00
monty@mysql.com
e9315f984d Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
2004-02-17 01:35:17 +02:00
monty@mysql.com
050af89dd8 Merge with public tree 2004-02-16 10:31:05 +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
Sinisa@sinisa.nasamreza.org
eb83bb374a Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2004-02-14 15:08:32 +02:00
bar@bar.intranet.mysql.r18.ru
3bdb96d33e Bug #2699 UTF8 breaks primary keys for cols > 85 characters 2004-02-13 17:58:02 +04:00
Sinisa@sinisa.nasamreza.org
125fb04b87 merge fixes 2004-02-11 19:15:02 +02:00