Commit graph

1307 commits

Author SHA1 Message Date
pem@mysql.com
b01e7393bf Fixed BUG#14719: Views DEFINER grammar is incorrect
Corrected the syntax for the current_user() case.
  (It's "definer = current_user[()]", not just "current_user[()]".)
2005-11-09 16:51:00 +01:00
pem@mysql.com
d201f2443d Fixed BUG#14256: definer in view definition is not fully qualified
Changed the parser test for wildcards in hostname to checking for empty
  strings instead (analogous with the test in default_view_definer()),
  since wildcards do appear in the definer's host-part sometimes.
2005-10-28 12:11:32 +02:00
hf@deer.(none)
526315ebfa Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.12267
2005-10-25 22:04:20 +05:00
acurtis@zim.(none)
cd19a1481e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/acurtis/mysql-5.0-noraid.2
2005-10-25 08:18:32 -07:00
acurtis@zim.(none)
1d860c2dbe Deprecate RAID create options 2005-10-25 08:15:37 -07:00
hf@deer.(none)
86e358f1c8 Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.12267
2005-10-25 19:08:33 +05:00
timour@mysql.com
d24027fa79 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-13832
2005-10-25 09:01:47 +03:00
timour@mysql.com
f5354eba90 Fix for BUG#13832 - Unknown column t1.a in 'on clause'.
The cause for the bug is that the priorities of all rules/terminals
that process the FROM clause are not fully specified, and the
parser generator produces a parser that doesn't always parse
the FROM clause so that JOINs are left-associative. As a result
the final join tree produced by the parser is incorrect, which
is the cause for subsequent name resolution to fail.
2005-10-25 09:00:57 +03:00
anozdrin@mysql.com
6105040ac4 Fix for BUG#13095: Cannot create VIEWs in prepared statements
- allow CREATE VIEW as well as DROP VIEW to use in prepared statements;
  - fix CREATE VIEW implementation to make it work in prepared statements.
2005-10-25 00:54:04 +04:00
andrey@lmy004.
991b6f1440 fix for bug #12595 (ESCAPE must be exactly 1 character long)
ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES
or has length of 0 or 1 in every other situation.
(approved patch applied on a up-to-date tree re-commit)
2005-10-21 04:01:52 +03:00
hf@deer.(none)
9910198aaf Additional fix for bug #12267 (Can't use POINT for primary key) 2005-10-15 22:23:13 +05:00
bar@mysql.com
7c81d7fc69 ctype_utf8.result, ctype_utf8.test:
New syntax: CHAR(x USING charset)
  Adding test case.
sql_yacc.yy:
  New syntax: CHAR(x USING charset)
  Adding new parser rule.
item_strfunc.h:
  New syntax: CHAR(x USING charset)
  Adding a new constructor.
2005-10-13 19:24:47 +05:00
pem@mysql.com
2456c0c668 Fixed BUG#13510: Setting password local variable changes current password
Disallow conflicting use of variables named "password" and "names". If such
  a variable is declared, and "SET ... = ..." is used for them, an error is
  returned; the user must resolve the conflict by either using `var` (indicating
  that the local variable is set) or by renaming the variable.
  This is necessary since setting "password" and "names" are treated as special
  cases by the parser.
2005-10-11 15:01:38 +02:00
ramil@mysql.com
d9eb8958a2 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b11553
2005-09-22 11:39:01 +05:00
jonas@perch.ndb.mysql.com
f35c49f748 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push
2005-09-21 13:22:59 +02:00
bell@sanja.is.com.ua
c1b185f5ff WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
2005-09-20 21:20:38 +03:00
ramil@mysql.com
6f64f66d8b a fix (bug #11553: gives error if aggregate user-defined function in HAVING clause). 2005-09-20 14:28:23 +05:00
jonas@perch.ndb.mysql.com
2119a88abe Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
2005-09-20 10:46:33 +02:00
jonas@perch.ndb.mysql.com
668a192ce5 ndb - imlp. show engine ndb status;
that dump free list allocation per connection
2005-09-19 15:35:07 +02:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
bell@sanja.is.com.ua
4a18f890e6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
2005-09-14 13:37:40 +03:00
pem@mysql.com
9cf77e404e Post-review fix for BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers 2005-09-14 10:54:02 +02:00
bell@sanja.is.com.ua
914b961d01 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0
2005-09-14 11:07:04 +03:00
bell@sanja.is.com.ua
71ffbbf81b part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm
2005-09-14 10:53:09 +03:00
pem@mysql.com
d825ed1a6b Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.0
2005-09-14 09:43:02 +02:00
eric@mysql.com
9944cbf8f6 Merge eherman@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/eric/mysql-5.0
2005-09-13 10:17:40 -07:00
pem@mysql.com
f31095f3d5 Fixed BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers
Second version after review. Allow 'set autocommit' in procedures, but not
  functions or triggers. Can return error in run-time (when a function calls
  a procedure).
2005-09-13 17:16:12 +02:00
pem@mysql.com
c76d5768a7 Fixed BUG#13133: Local variables in stored procedures are not initialized correctly.
Have to init. all local variables in their frames, not just once at the beginning
  of invocation.
2005-09-13 12:50:21 +02:00
eric@mysql.com
1a79e25537 Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414
2005-09-12 18:02:17 -07:00
timour@mysql.com
7d24bdac22 Fix for BUG#12943.
The problem was that in the first production in rule 'join_table', that
processes simple cross joins, the parser was processing the second join operand
before the first one due to unspecified priorities of JOINs. As a result in the
case of cross joins the parser constructed a tree with incorrect nesting:
the expression "t1 join t2 join t3 on some_cond" was interpreted as
"t1 join (t2 join t3 on some_cond)" instead of
"(t1 join t2) join t3 on some_cond".
Because of this incorrect nesting the method make_join_on_context picked an
incorrect table as the first table of the name resolution context.

The solution assignes correct priorities to the related production.
2005-09-10 15:01:54 +03:00
aivanov@mysql.com
9c51a97e90 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/mysql-5.0
2005-09-07 23:44:23 +04:00
anozdrin@mysql.com
c1e570a441 Fix for Bug#12995: Inside function "Table 't4' was not locked with LOCK TABLES"
Any form of HANDLER statement is forbidden from usage in stored procedures/functions.
2005-09-07 23:03:56 +04:00
aivanov@mysql.com
d6398c1aae Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-0
2005-09-07 18:58:58 +04:00
aivanov@mysql.com
4b245a2803 join_outer.result, opt_range.cc, item_cmpfunc.cc:
Post merge changes
sql_yacc.yy:
  Post merge changes
sql_select.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions (post merge changes).
   The function add_key_fields() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
2005-09-07 17:42:47 +04:00
aivanov@mysql.com
2165167200 Merge mysql.com:/home/alexi/dev/mysql-4.1-0
into  mysql.com:/home/alexi/dev/mysql-5.0-0
2005-09-06 23:49:54 +04:00
anozdrin@mysql.com
b291090612 Fix for Bug#12953 "Stored procedures: crash if OPTIMIZE TABLE in function"
OPTIMIZE TABLE statement is forbidden from usage in stored procedures/functions.

NOTE: OPTIMIZE TABLE statement can be useful in stored procedures. The idea is
that the user/administrator can create a stored procedure for admin
tasks (optimizing, backing up, etc). This procedure can be scheduled to run
automatically (by mean of internal cron (WL#1034)). So, once we can make this
statement work, it is worth doing it.
2005-09-06 21:43:06 +04:00
aivanov@mysql.com
fa51afedeb item_cmpfunc.h:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
join_outer.test:
  Added testcases for bugs #12101, #12102
2005-09-06 18:03:08 +04:00
konstantin@mysql.com
38486e83c1 Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures".
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup, 
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query]   prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).
2005-09-03 03:13:18 +04:00
ingo@mysql.com
4b0ac126cd Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-08-29 21:11:05 +02:00
ingo@mysql.com
5845a6e553 Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
Added a switch to reject illegal values for PACK_KEYS.
2005-08-29 17:24:07 +02:00
andrey@lmy004.
d7d307fbdd Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy004.:/work/mysql-5.0-ready4
2005-08-29 12:20:36 +02:00
andrey@lmy004.
ed0bac2116 fix for bug #12490 (all-in-one patch)
(Packets out of order if calling HELP CONTENTS from Stored Procedure)
2005-08-29 12:19:08 +02:00
hf@deer.(none)
23a51871d2 Merge deer.(none):/home/hf/work/mysql-5.0.11207
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-08-27 18:53:54 +05:00
hf@deer.(none)
b2a1a5e7f2 Addition to the fix for #11207 (SET GLOBAL TRANSACTION ISOLATION LEVEL) 2005-08-27 18:51:11 +05:00
hf@deer.(none)
63d6bc34e0 Merge deer.(none):/home/hf/work/mysql-5.0.10499
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-08-27 18:13:26 +05:00
acurtis@xiphis.org
23c19b21d6 Bug#9048
"Creating a function with char binary IN parameter fails"
  Parse BINARY as part of type declaration, not as 
  a column attribute.
2005-08-27 07:26:14 +01:00
sergefp@mysql.com
c78ce16681 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug12335-release2
2005-08-25 17:39:02 +04:00
sergefp@mysql.com
95c3afc5d9 Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
2005-08-25 17:34:34 +04:00
jimw@mysql.com
9e4a9e23c6 Make SYSDATE() behave as in Oracle: always the current datetime, not the
datetime of when the current statement began. This also makes SYSDATE()
not safe in replication. (Bug #12562)
2005-08-24 15:50:58 -07:00
serg@sergbook.mysql.com
117d61c8a0 Merge bk-internal:/home/bk/mysql-5.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
2005-08-20 14:38:18 +04:00