Commit graph

1272 commits

Author SHA1 Message Date
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
71e4859389 After merge fixes 2005-02-15 19:25:42 +02:00
monty@mysql.com
38d1a42481 Merge with 4.1 2005-02-15 17:12:13 +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
acurtis@pcgem.rdg.cyberkinetica.com
4957c4850d Bug#2435
Alter handling for UNION syntax
  Tests for UNION and parentheses
2005-02-13 22:35:52 +00:00
hf@deer.(none)
2f7f2dfe5d Fix for NCHAR bug appeared during the merging 2005-02-09 16:32:43 +04:00
hf@deer.(none)
96558f6ad3 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-02-09 02:54:08 +04:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
pem@mysql.comhem.se
2c26ebe359 WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.
2005-02-08 20:52:50 +01:00
gluh@gluh.mysql.r18.ru
15273035ce Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0
2005-02-07 11:57:14 +03:00
mysqldev@mysql.com
abf7837fbb resolved merge conflict 2005-02-04 14:27:09 +01:00
gluh@gluh.mysql.r18.ru
11435fdfad Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0
2005-02-04 12:37:18 +03:00
acurtis@pcgem.rdg.cyberkinetica.com
d794406f64 Bug#6726 - failure to parse NOT BETWEEN
Fix and test for parse bug
2005-02-03 23:08:43 +00:00
gluh@gluh.mysql.r18.ru
cacb8d74b4 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0
2005-02-03 11:12:01 +03:00
timour@mysql.com
52e904c25c Fix for BUG#8023.
Allow LIMIT clause after DUAL.
2005-02-02 08:38:24 +02:00
acurtis@pcgem.rdg.cyberkinetica.com
a67924ecbc WL#1967
Support for COMMIT/ROLLBACK optional arguments
2005-02-01 19:48:05 +00:00
serg@serg.mylan
fb78bfebe4 open binlog index file *before* tc_log->open() and binlog itself *after* 2005-02-01 15:36:48 +01:00
igor@rurik.mysql.com
34fa69a194 order_by.result, order_by.test:
Added a test case for bug #7672.
sql_yacc.yy:
  Fixed bug #7672.
  Made queries of the form (SELECT ...) ORDER BY ... to
  be equivalent to SELECT ... ORDER BY ...
2005-01-25 14:30:38 -08:00
gluh@gluh.mysql.r18.ru
e492c1b44e Additional fix for WL#1629: SHOW with WHERE(discussed with PeterG)
- Do not allow a column list as part of SHOW WITH WHERE task.
 - The WHERE clause must accept field names which are
   valid in SHOW, not INFORMATION_SCHEMA names.
2005-01-24 18:44:54 +03:00
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
serg@serg.mylan
1034677f94 XA (not completely polished out yet) 2005-01-16 13:16:23 +01:00
monty@mysql.com
0a1076a25f Merge with 4.1 2005-01-15 14:09:45 +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
marko@hundin.mysql.fi
52ebc04fc5 Introduce ROW_TYPE=REDUNDANT and ROW_TYPE=COMPACT for InnoDB table formats 2005-01-07 16:43:27 +02:00
bell@sanja.is.com.ua
dffac28b76 fixed views with PS protocol 2005-01-05 16:48:23 +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
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
dlenev@mysql.com
536cb92195 Manual merge. 2004-12-31 12:48:27 +03:00
vtkachenko@intelp4d.mysql.com
ae1b969c8f Merge bk-internal:/home/bk/mysql-5.0
into intelp4d.mysql.com:/users/vtkachenko/bk/mysql-5.0
2004-12-31 09:00:34 +01:00
monty@mysql.com
34d5331cee Merge with global tree 2004-12-31 00:50:30 +02:00
monty@mysql.com
d71c030587 After merge fixes 2004-12-31 00:44:00 +02:00
gluh@gluh.mysql.r18.ru
50266af38c wl#1629 SHOW with WHERE(final part, after review)
added syntax:
  'show variables where', 'show status where', 'show open tables where'
2004-12-30 15:20:40 +03:00
dlenev@mysql.com
a8deefa3dd Manual merge of patch implementing WL#1339 with main tree. 2004-12-29 22:35:16 +03:00
dlenev@brandersnatch.localdomain
ffa7393330 WL#1339 "Add per account max_user_connections limit (maximum number
of concurrent connections for the same account)"

Added support of account specific max_user_connections limit. Made all
user limits to be counted per account instead of the old behavior,
which was per user/host accounting. Added option which enables the old
behavior. Added testing of these to the test suite.

(After review version).
2004-12-29 20:30:37 +03:00
serg@serg.mylan
19e3c001f4 revert "LOCK TABLES ... WHERE ENGINE=INNODB" 2004-12-27 12:08:22 +01:00
vtkachenko@intelp4d.mysql.com
f1dfafe721 Many files:
tabs replaced
ha_innodb.cc:
  Comments removed
2004-12-24 13:31:21 +01:00
vtkachenko@intelp4d.mysql.com
78846b2923 logging_ok:
Logging to logging@openlogging.org accepted
sql_yacc.yy, sql_parse.cc, sql_lex.h, lex.h:
  Implements the SHOW MUTEX STATUS command
set_var.cc, mysqld.cc, mysql_priv.h:
  Added new GLOBAL variable timed_mutexes
ha_innodb.h:
  New function innodb_mutex_show_status
ha_innodb.cc:
  Added new innodb variables in SHOW STATUS
  Implements the SHOW MUTEX STATUS command
innodb.test, innodb.result:
  Added new row_lock_waits status variables tests.
variables.test, variables.result:
  test new variable timed_mutexes
ut0ut.c:
  New function ut_usectime.
sync0sync.c:
  Mutex counting.
sync0rw.c:
  New mutex parameters initialization.
srv0srv.c:
  Counting row lock waits
row0sel.c, row0mysql.c:
  Setting row_lock or table_lock state to thd.
que0que.c:
  Added default no_lock_state to thd.
univ.i:
  Added UNIV_SRV_PRINT_LATCH_WAITS debug define
sync0sync.ic:
  Count mutex using.
sync0sync.h:
  Added new parameters to mutex structure for counting.
sync0rw.h:
  Added new parameters to rw_create_func.
srv0srv.h:
  Added new innodb varuables to SHOW STATUS.
que0que.h:
  Added thread lock states.
2004-12-24 12:13:32 +01:00
acurtis@pcgem.rdg.cyberkinetica.com
b1e30904d5 WL#925 - Privileges for stored routines
Implement fine-grained control over access to stored procedures
  Privileges are cached (same way as existing table/column privs)
2004-12-23 10:46:24 +00:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
dlenev@mysql.com
0ef4413f36 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-tzbug
2004-12-21 15:42:19 +03:00
jan@hundin.mysql.fi
198dc7a8ec Content merge. 2004-12-21 07:49:38 +02:00
dlenev@mysql.com
ca8373f49d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-tzbug
2004-12-19 11:32:21 +03:00
gluh@gluh.mysql.r18.ru
bf0104045d Fix for bug #7210: information_schema: can't access when table-name = reserved word 2004-12-18 12:48:01 +03:00
ram@gw.mysql.r18.ru
92f89369ae bit type 2004-12-17 18:06:05 +04:00
dlenev@brandersnatch.localdomain
c834a49b66 Fix for bug #6849 "Crash while preparing query containing const expr with
IN and CONVERT_TZ()" (with after review changes).

Now we add implicitly used time zone tables to global table list right
at the parsing stage instead of doing it later in mysql_execute_command()
or in check_prepared_statement().

No special test-case needed since this bug also manifests itself as
timezone2.test failure if one runs it with --ps-protocol option.
2004-12-17 15:34:48 +03: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
jan@hundin.mysql.fi
1d3a32c719 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into hundin.mysql.fi:/home/jan/mysql-5.0
2004-12-13 08:59:52 +02:00
gluh@gluh.mysql.r18.ru
2e912bbbe8 Don't display 'usage' privilege in TABLE_PRIVILEGES if we have columns privileges
mysqldump skips information_schema db
'use' now can use information_schema db
changed value of column 'Null' to 'NO' if column is not nullable
2004-12-10 12:07:11 +03: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
jan@hundin.mysql.fi
49c0044a2f Content merge. 2004-12-09 11:20:50 +02:00
jan@hundin.mysql.fi
d6effde5d0 Added support for a LOCK TABLES...WHERE ENGINE = InnoDB query which sets
transactional table locks to tables mentioned in the query. These locks
are released at the end of the transaction automatically.
This is fix for bugs #5655, #5998 and issue #3762.
2004-12-09 11:10:45 +02:00
monty@mysql.com
77207d19f2 Merge with new VARCHAR code 2004-12-06 19:18:35 +02:00
gluh@gluh.mysql.r18.ru
0282d03215 Syntax extention: 'ALTER DATABASE' without db name (after review) 2004-12-06 19:01:51 +03:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
monty@mysql.com
67ce247965 Add support for up to VARCHAR (size up to 65535)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
2004-12-06 02:00:37 +02: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
ingo@mysql.com
0eca0e0a68 Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-wl2050-new
2004-11-25 21:58:28 +01:00
ingo@mysql.com
cb53411b47 WL#2050 - CREATE USER and DROP USER and RENAME USER
Added new commands CREATE USER and RENAME USER.
Changed behaviour of DROP USER.
Changed an error messages for the new commands.
2004-11-25 21:55:49 +01:00
pem@mysql.comhem.se
a1e0e96e2d Fixed BUG#6807: Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
...and for PURGE BEFORE too. (Don't fix_fields in the parser!)
2004-11-25 16:13:06 +01:00
bell@sanja.is.com.ua
69ec6a4592 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0
2004-11-25 02:27:02 +02:00
dlenev@brandersnatch.localdomain
d201074611 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).
2004-11-24 12:24:02 +03:00
bell@sanja.is.com.ua
072d38eb12 merge 2004-11-21 20:08:12 +02:00
serg@serg.mylan
e68bd85b77 merged 2004-11-17 18:04:36 +01:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
2074aeecb8 Use negate_expression() instead of new Item_func_not() 2004-11-17 15:49:12 +00:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
8c0d21d186 WL#638 - Fix precedence for parsing NOT ... LIKE expression s
Rework parser expression rules
  Rework handling for "||" concat/or
  Eliminate some shift/reduce conflicts
  Add support for "xxx IS [ NOT ] truth_value"
2004-11-17 15:49:10 +00: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
bell@sanja.is.com.ua
d76db8b999 marge 2004-11-13 19:45:36 +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
gluh@gluh.mysql.r18.ru
321f803784 WL#1629: SHOW with WHERE(partially) &
WL#173:  Create Data Dictionary Tables for SHOW Commands
2004-11-13 13:56:39 +03: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
brian@avenger.(none)
3e4ca194f8 Mainly resolving Guilhem's 4.1 patch to 5.0 2004-11-11 19:01:46 -08:00
bell@sanja.is.com.ua
0ef0b030a5 merge 2004-11-11 21:18:10 +02: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
2bba55b57f After merge fixes
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
2004-11-09 03:58:44 +02:00
monty@mysql.com
1087186657 Merge with 4.1 to get new thd->mem_root handling 2004-11-08 17:53:32 +02: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
monty@mysql.com
60691a637a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2004-11-03 18:52:03 +02:00
pem@mysql.comhem.se
327eb9bbff Various syntax fixes in sql/sql_yacc.yy for stored procedures:
- No RESTICT|CASCADE in DROP SP (since it's not implemented)
  - Added optional "noise" to FETCH: [[NEXT] FROM]
  - At least one statement required in all block constructs except BEGIN-END
    (where zero is allowed)
2004-11-03 13:49:54 +01:00
monty@mysql.com
7d3be517a4 Merge on pull 2004-11-03 13:01:38 +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
serg@serg.mylan
4375e59901 Merge bk-internal:/home/bk/mysql-5.0/
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2004-10-28 21:22:15 +02:00
bell@sanja.is.com.ua
dff05eb951 merge 2004-10-28 11:02:48 +03: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
pem@mysql.comhem.se
2c428ca09d Fixed BUG#6030: Stored procedure has no appropriate DROP privilege.
...and no ALTER privilege either.
  For now, only the definer and root can drop or alter an SP.
2004-10-22 20:29:06 +02:00
pem@mysql.comhem.se
ebf8dc0da6 Fixed BUG#6027: Stored procedures can be renamed.
Removed the support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
2004-10-22 19:05:17 +02:00
serg@serg.mylan
318fe9db96 smarter ALTER TABLE - don't copy the table if only comment or default values are changed 2004-10-21 18:10:58 +02:00
bell@sanja.is.com.ua
05af0c26c1 fixed default behaviour of WITH CHECK OPTIONS according to standard (BUG#5989) 2004-10-21 13:39:17 +03:00
bell@sanja.is.com.ua
42d6d6765a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
2004-10-20 16:11:16 +03: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
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
pem@mysql.comhem.se
4043c0f3db Implemented the stored procedure data access characteristics:
NO SQL
CONTAINS SQL (default)
READS SQL DATA
MODIFIES SQL DATA

These are needed as hints for the replication.
(Before this, we did have the default in the mysql.proc table, but no support in the parser.)
2004-10-14 18:07:09 +02: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
bell@sanja.is.com.ua
29593da2f6 showing table type now is controled by new parameter 'FULL' of SHOW TABLES command (SHOW FULL TABLES) (as it was decided on last dev conf) 2004-10-10 13:15:14 +03: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
bell@sanja.is.com.ua
78acfbb740 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
2004-10-07 23:00:33 +03:00
pem@mysql.comhem.se
8b1a6d377f Revised BUG#5000: SPs can be created with no default database.
Now simply give an error if no database. (The "global SP feature" will be
done using PATH instead.)
2004-10-07 15:32:36 +02:00
bell@sanja.is.com.ua
d73ba9660d test of DELETE privilege and cyclic reference added in case of altering view (BUG#5148)
fixed ALTER VIEW syntax
fixed WITH CHECK OPTION clause printing in SHOW CREATE VIEW
2004-10-07 15:43:04 +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
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
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
pem@mysql.comhem.se
5b10e3e5b5 Fixed BUG#3583: query cache doesn't work for stored procedures. 2004-09-17 15:40:38 +02: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
jani@rhols221.adsl.netsonic.fi
0b3d778691 Merge. 2004-09-13 18:12:44 +03:00
jani@rhols221.adsl.netsonic.fi
fe23df1a2b Added per thread status variables, after review, patch v1.1. 2004-09-13 16:48:01 +03:00
serg@serg.mylan
4a9defa31e un-reserving "RETURNS" 2004-09-13 11:19:38 +02:00
paul@kite-hub.kitebird.com
c61da73ce7 sql_yacc.yy:
Make "FRAC_SECOND"/"SQL_TSI_FRAC_SECOND" non-reserved words,
  must like "SECOND"/"SQL_TSI_SECOND", "MINUTE"/"SQL_TSI_MINUTE",
  etc.
  Will wait for okay to push. (It doesn't break any tests.)
2004-09-10 13:56:06 -05:00
pem@mysql.comhem.se
624cf0e537 Fixed BUG#3294: Stored procedure crash if table dropped before use.
Dropping the table was not the real problem, the problem was with errors
  occuring within error handlers.
2004-09-10 11:11:52 +02:00
dlenev@mysql.com
c46e640009 Yet another manual merge with main tree for patch for WL#1218 "Triggers" 2004-09-09 19:52:10 +04:00
monty@mysql.com
49cd04b510 Merge on pull 2004-09-09 07:26:28 +03:00
dlenev@brandersnatch.localdomain
6dc933b730 WL#1218 "Triggers"
After review and after merge fixes.
2004-09-09 00:46:01 +04:00
pem@mysql.comhem.se
b83af8607a Fixed BUG#5000: SPs can be created with no default database.
Easy to prevent crash, but the question was how to treat this case?
  We ended up implementing the "global" SPs (i.e. with no associated
  db), which were planned but left unresolved when SPs moved into dbs.
  So now things like "call .p()" work too.
2004-09-08 14:23:14 +02: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
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
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
bell@sanja.is.com.ua
6d8e178523 merge 2004-09-05 22:14:27 +03:00
monty@mysql.com
9d8555c0f0 Merge with 4.0 to get latest bug fixes 2004-09-04 15:59:49 +03:00
monty@mysql.com
32594c9989 Print value of Item_param if it has a value (when debugging) 2004-09-04 15:02:57 +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
bd2c119176 CHECK OPTIONs added (WL#1983) 2004-09-03 15:18:40 +03: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
acurtis@pcgem.rdg.cyberkinetica.com
7ee2f2c6bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/mysql-5.0
2004-08-30 22:11:14 +01:00
acurtis@pcgem.rdg.cyberkinetica.com
203debc666 Fix column name where it starts with a backtick 2004-08-30 22:08:51 +01: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
pem@mysql.comhem.se
c81b848d20 Major rehacking and cleanup of sp_pcontext.
This finishes (almost) WL#2002: Implement stored procedure GOTO.
Only the syntax issue for free labels remains ("label L;" vs "L:").
2004-08-26 12:54:30 +02:00
pem@mysql.comhem.se
6b5a6cdf99 Fixed BUG#3157: Crash if stored procedure contains IF EXISTS,
and BUG#336: Subselects with tables does not work as values for
local SP variables (which was closed before with a temp. fix, but not
actually fixed).
2004-08-24 16:07:39 +02:00
pem@mysql.comhem.se
c2e06f58a1 Fixed a valgrind warning when creating stored procedures containing complex
unions (crashed randomly), and made "label" not a reserved word.
2004-08-24 12:59:06 +02: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
pem@mysql.comhem.se
38b4cbbbd5 WL#2002: Implement stored procedure GOTO.
Mostly done, it works, but the temporary LABEL syntax still to be fixed.
2004-08-17 20:20:58 +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
igor@rurik.mysql.com
ff433d570b Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-1
2004-08-06 10:31:45 -07:00
igor@rurik.mysql.com
b805d12587 join_nested.result, join_nested.test:
Added a test case for bug #4922.
sql_select.cc:
  Blocked an optimization performed by join_read_const_table when
  applied to an inner table of a nested outer join.
  It was done to fix bug #4922.
sql_yacc.yy:
  Fixed a typo bug in the rule for join_table.
2004-08-06 10:22:20 -07:00
pem@mysql.comhem.se
015b4145da Fixed BUG#4902: Stored procedure with SHOW WARNINGS leads to packet error,
and tried to do it properly this time, digging out all show commands that
  need the multi results flag set.
2004-08-06 13:47:01 +02:00
pem@mysql.comhem.se
7e6bade23b Fixed BUG#434: Stored procedure which drops itself causes crash.
Simply disallow it, just as we disallow creation of routines from within
other SPs.
2004-07-29 17:33:45 +02:00
pem@mysql.comhem.se
714c3c0942 Fixed BUG#4318: Stored Procedure packet error if HANDLER statement,
at least partially. It doesn't crash or give packets out of order
any more, but it's unclear why it doesn't actually return anything
from within an SP. This should be investigated at some point, but
for the moment this will have to do. (It is a rather obscure feature... :)
2004-07-29 16:52:17 +02:00
serg@serg.mylan
b9512a55aa BUG#4717 - check for valid table names in ALTER TABLE ... RENAME 2004-07-26 10:52:40 +02:00
bell@sanja.is.com.ua
5be6861f41 fixed SP variables detecting (BUG#4604)
fixed error handling
2004-07-22 16:04:30 +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
b97ef911c5 Merge 2004-07-15 04:28:42 +03:00
monty@mysql.com
31fe2837f9 Merge with 4.1 2004-07-12 08:20:24 +03: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
vva@eagle.mysql.r18.ru
e9e5b3547e patch for task WL 1941 "NO_C_ESCAPE sql_mode" 2004-07-07 17:26:43 +05:00
bar@mysql.com
6fdafa5635 Don't allow badly formed UTF8 identitiers 2004-07-07 16:39:43 +05:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00
bar@mysql.com
4df5a14a6f Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection 2004-07-02 16:52:02 +05:00
serg@serg.mylan
3236093b8b removed using lex->select_lex.options is SHOW TABLE [STATUS] commands (BUG#4288) 2004-06-27 00:34:05 +02:00
serg@serg.mylan
450e5b0119 after merge fixed 2004-06-26 14:21:32 +02:00
monty@mysql.com
c3eb936040 Merge mysql.com:/home/my/mysql-3.23 into mysql.com:/home/my/mysql-4.0 2004-06-25 18:55:03 +03:00
igor@rurik.mysql.com
29f616205a af 2004-06-25 06:54:01 -07:00
bell@sanja.is.com.ua
5db861c3e4 parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) 2004-06-24 22:15:15 +03:00
bell@sanja.is.com.ua
c6e2f6ac13 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-innodb-4.1
2004-06-24 19:43:47 +03:00
konstantin@mysql.com
29b88ff539 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-4030
2004-06-24 19:09:31 +04:00
konstantin@mysql.com
a30fcdc690 Fix for Bug#4030 "Client side conversion string -> date type doesn't
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
  MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.
2004-06-24 19:08:36 +04:00
sergefp@mysql.com
e4270dd595 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-root
2004-06-24 15:52:52 +04:00
bell@sanja.is.com.ua
7483b3cf96 parameter of my_yyoverflow made independed from YYSIZE_T (BUG#4204) 2004-06-24 02:57:57 +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
sergefp@mysql.com
9c2a961a63 Fix and test case for BUG#3899 2004-06-23 11:40:42 +04:00
dlenev@brandersnatch.localdomain
b20dca925d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into brandersnatch.localdomain:/home/dlenev/src/mysql-4.1-bg4200
2004-06-22 19:28:01 +04:00
dlenev@brandersnatch.localdomain
eea19e5235 Fix for Bug# 4200 "Parse error on LIKE ESCAPE with parameter binding"
Now ESCAPE in LIKE will accept not only string literal but constant 
delimited expression.
2004-06-22 19:27:16 +04:00
monty@mysql.com
fd0153304d Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)
Fixed problem with NULL and derived tables (Bug #4097)
Cleanup of new pushed code
2004-06-18 03:02:29 +03:00
pem@mysql.comhem.se
ad19125447 Fixed BUG#3843: ANALYZE TABLE inside stored procedure causes 'Packets out of order' error. 2004-06-14 12:38:54 +02:00
sergefp@mysql.com
916579e3fd Merged 2004-06-07 12:21:26 +04:00
sergefp@mysql.com
1e05e6cb82 Post review fixes for "SQL Syntax for Prepared Statements". 2004-06-07 12:09:10 +04:00
paul@kite-hub.kitebird.com
d77a3f6db1 Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into kite-hub.kitebird.com:/src/extern/MySQL/bk/mysql-4.1
2004-06-04 10:35:57 -05:00
sergefp@mysql.com
bec20d1fd7 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-04 05:37:14 +04:00
guilhem@mysql.com
86e8ecc965 Implementation of WL#1824 "Add replication of character set variables in 4.1",
by binlogging some SET ONE_SHOT CHARACTER_SETetc,
which will be enough until we have it more compact and more complete in 5.0. With the present patch,
replication will work ok between 4.1.3 master and slaves, as long as:
- master and slave have the same GLOBAL.COLLATION_SERVER
- COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
- application does not use the fact that table is created with charset of the USEd db (BUG#2326).
all of which are not too hard to fulfill. 
ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
so we give error if used for non-charset vars.
Fix for BUG#3875 "mysqlbinlog produces wrong ouput  if query uses
 variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
 properly after SET NAMES".
Detecting that master and slave have different global charsets or server ids.
2004-06-03 23:17:18 +02:00
paul@kite-hub.kitebird.com
2f0ca1ce42 Fix skipp -> skip once and for all.
(Note: This affects only comments, not variable names.)
2004-06-03 11:52:54 -05:00
sergefp@mysql.com
dc38512390 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
2004-06-01 17:29:13 +04:00