Commit graph

893 commits

Author SHA1 Message Date
bell@sanja.is.com.ua
dcfdf011c6 backported from 5.0 patch initialization of main select for commands where subqueries are possible 2005-01-17 19:52:07 +02:00
dlenev@mysql.com
8be6787640 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-dtbug
2005-01-14 10:09:01 +03:00
dlenev@brandersnatch.localdomain
2f32115092 Fix for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB
mode".

Changed grammar rule for "type" token. Now we have one branch with 
optional length specification for TIMESTAMP type instead of two separate
branches.
2005-01-11 14:26:40 +03: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
acurtis@pcgem.rdg.cyberkinetica.com
9818cadd1b WL#2274 - INSERT..SELECT..UPDATE
UPDATE clause conflicts with SELECT for use of item_list field.
  Alter UPDATE clause to use new lex field update_list
  Tests included
2004-12-13 12:26:28 +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
gluh@gluh.mysql.r18.ru
0282d03215 Syntax extention: 'ALTER DATABASE' without db name (after review) 2004-12-06 19:01:51 +03:00
bar@mysql.com
a09a603d83 Bug #6379: ENUM values are incorrectly converted
- add_field_to_list() now uses <List>String
instead of TYPELIB to be able to distinguish
literals 'aaa' and hex literals 0xaabbcc.
- move some code from add_field_to_list() where
  we don't know column charset yet, to 
  mysql_prepare_table(), where we do.
2004-12-02 12:48:43 +04:00
ram@gw.mysql.r18.ru
dde88ea82b A fix (bug #6449: DO server-crashing bug). 2004-11-16 14:36:25 +04:00
bar@mysql.com
629f1bb616 Bug #6552 CHAR column w/o length is legal, BINARY w/o length is not 2004-11-16 12:05:13 +04:00
acurtis@pcgem.rdg.cyberkinetica.com
6f39bf2b9c Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/bug6469
2004-11-11 17:12:25 +00:00
acurtis@pcgem.rdg.cyberkinetica.com
e0527b1750 Merge pcgem.rdg.cyberkinetica.com:/mnt/staff/repositories/mysql-4.1
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/bug6469
2004-11-11 17:07:57 +00:00
ram@gw.mysql.r18.ru
582f9a8900 Added ending ';' for the start_transaction_opts: 2004-11-11 10:50:46 +04:00
acurtis@pcgem.rdg.cyberkinetica.com
b6272b85fd Bug#6469 - REVOKE ALL synonymy bug 2004-11-10 18:53:16 +00:00
guilhem@mysql.com
600b965f32 Merge 2004-11-10 18:02:00 +01:00
guilhem@mysql.com
6cd218cc56 WL#1596 "make mysqldump --master-data --single-transaction able to do online dump of InnoDB AND report reliable
binlog coordinates corresponding to the dump".
The good news is that now mysqldump can be used to get an online backup of InnoDB *which works for
point-in-time recovery and replication slave creation*. Formerly, mysqldump --master-data --single-transaction
used to call in fact mysqldump --master-data, so the dump was not an online dump (took big lock all time of dump).
The only lock which is now taken in this patch is at the beginning of the dump: mysqldump does:
FLUSH TABLES WITH READ LOCK; START TRANSACTION WITH CONSISTENT SNAPSHOT; SHOW MASTER STATUS; UNLOCK TABLES;
so the lock time is in fact the time FLUSH TABLES WITH READ LOCK takes to return (can be 0 or very long, if
a table is undergoing a huge update).
I have done some more minor changes listed in the paragraph of mysqldump.c.
WL#2237 "WITH CONSISTENT SNAPSHOT clause for START TRANSACTION":
it's a START TRANSACTION which additionally starts a consistent read on all
capable storage engine (i.e. InnoDB). So, can serve as a replacement for
BEGIN; SELECT * FROM some_innodb_table LIMIT 1; which starts a consistent read too.
2004-11-10 17:56:45 +01:00
monty@mysql.com
b903a129e2 Simpler arena swapping code
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
2004-11-08 01:13:54 +02:00
bar@mysql.com
2fc0d7e422 An extra "separator" class member was removed from Item_func_concat_ws.
args[0] is now used instead.
2004-10-28 11:43:31 +05:00
gluh@gluh.mysql.r18.ru
044b6e56c9 Typo fix 2004-10-26 13:18:35 +04:00
gluh@gluh.mysql.r18.ru
27a658b2d9 Fix for bug #6166: index prefix length of 0 not rejected 2004-10-26 12:16:35 +04:00
dlenev@mysql.com
a10ce662b4 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-secfix
2004-10-20 17:02:15 +04:00
dlenev@brandersnatch.localdomain
75d816627c Fix for bug #6173 "One can circumvent missing UPDATE privilege if
he has SELECT and INSERT privileges for table with primary key"

Now we set lex->duplicates= DUP_UPDATE right in parser if INSERT has
ON DUPLICATE KEY UPDATE clause, this simplifies insert_precheck()
function (this also fixes a bug) and some other code.
2004-10-20 16:04:43 +04:00
monty@mishka.local
57a85986ac Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.local:/home/my/mysql-4.1
2004-10-14 18:06:38 +03:00
monty@mishka.local
719c88e38f true,false -> TRUE, FALSE
Simple fixes/optimization of things discovered during review of new pushed code
2004-10-14 18:03:46 +03:00
ram@gw.mysql.r18.ru
0962ac560f clean-up, indentation fixes. 2004-10-10 15:29:06 +05:00
ram@gw.mysql.r18.ru
48305dcd69 A fix (bug #5382: Server crashes after writing INTO OUTFILE) 2004-10-10 14:40:24 +05:00
konstantin@mysql.com
234c80b689 Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism.
2004-10-08 19:13:09 +04: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
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
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
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
serg@serg.mylan
4a9defa31e un-reserving "RETURNS" 2004-09-13 11:19:38 +02:00
monty@mysql.com
9d8555c0f0 Merge with 4.0 to get latest bug fixes 2004-09-04 15:59:49 +03:00
paul@kite-hub.kitebird.com
38f462ae6f sql_yacc.yy:
Allow FROM or IN in SHOW KEYS, as in other SHOW statements.
2004-09-03 10:56:55 -05:00
bell@sanja.is.com.ua
b02451c5bd Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-not-4.1
2004-08-31 21:11:54 +03:00
bell@sanja.is.com.ua
2cf1234ba2 after review patch 2004-08-31 21:10:57 +03:00
bar@mysql.com
34688d710c Better easier to call error message format. 2004-08-31 18:53:27 +05:00
bell@sanja.is.com.ua
18366c930c NOT elimination moved in parsing (suggested by Monty) 2004-08-29 23:14:46 +03:00
bar@mysql.com
b604164599 Bug#2451 ALTER doesn't result in an error on CHARACTER SET and COLLATION conflict 2004-08-27 20:48:19 +05:00
bar@mysql.com
87537752e2 "SELECT BINARY x" now means "SELECT CAST(x AS BINARY)". 2004-08-26 16:31:37 +05:00
bell@sanja.is.com.ua
3ca433e332 merge 2004-08-23 15:50:59 +03:00
serg@serg.mylan
3f2210c064 after merge fixes 2004-08-19 03:02:09 +02:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
bell@sanja.is.com.ua
0ce931947e skip resolving field in table list if table list is not accessable due to groupping (BUG#4814) 2004-08-13 10:01:30 +03:00
serg@serg.mylan
902518ae48 allow get_format(TIMESTAMP, ...) syntax 2004-08-11 10:27:19 +02:00
dlenev@brandersnatch.localdomain
f49d4f5350 Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of 
statement's table (so we should add them to global table list) and after that use such 
pre-opened tables for loading info about time zones.
2004-08-10 12:42:31 +04:00
serg@serg.mylan
b9512a55aa BUG#4717 - check for valid table names in ALTER TABLE ... RENAME 2004-07-26 10:52:40 +02:00
bar@mysql.com
a5025f4ca6 WL#807 Optimize loading database options in load_db_opt
also known as
BUG#2326 Charset of table is determined by charset of db only if "USE db;"
2004-07-08 15:03:01 +05:00
bar@mysql.com
6fdafa5635 Don't allow badly formed UTF8 identitiers 2004-07-07 16:39:43 +05:00