Commit graph

1296 commits

Author SHA1 Message Date
unknown
221039515b 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.


sql/item_strfunc.h:
  New syntax: CHAR(x USING charset)
  Adding a new constructor.
sql/sql_yacc.yy:
  New syntax: CHAR(x USING charset)
  Adding new parser rule.
mysql-test/t/ctype_utf8.test:
  New syntax: CHAR(x USING charset)
  Adding test case.
mysql-test/r/ctype_utf8.result:
  New syntax: CHAR(x USING charset)
  Adding test case.
2005-10-13 19:24:47 +05:00
unknown
71c8962221 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.


mysql-test/r/sp-error.result:
  New test cases for BUG#13510
mysql-test/t/sp-error.test:
  New test cases for BUG#13510
sql/share/errmsg.txt:
  New error message for when certain variable names are use which would be
  parsed the wrong way. (E.g. "password" and "names")
sql/sql_yacc.yy:
  Check if "names" or "password" are used as local variable/parameter, in which
  case "set names" or "set password" will be parsed the wrong way. Give an error
  message instead.
2005-10-11 15:01:38 +02:00
unknown
479ef8f76a Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/ram/work/5.0.b11553


sql/sql_yacc.yy:
  Auto merged
2005-09-22 11:39:01 +05:00
unknown
49e641a039 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push


sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-09-21 13:22:59 +02:00
unknown
3fe752f527 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.


sql/ha_innodb.cc:
  Renamed structure st_security_context to class Security_context
sql/item_func.cc:
  Renamed structure st_security_context to class Security_context
sql/item_strfunc.cc:
  fixed USER() function
sql/log.cc:
  variable used to optimize access to security context
sql/mysql_priv.h:
  Renamed structure st_security_context to class Security_context
sql/mysqld.cc:
  main security context used direcly
sql/sp_head.cc:
  Renamed structure st_security_context to class Security_context
  removed unneed variable
sql/sp_head.h:
  Comment inmroved
  Renamed structure st_security_context to class Security_context
sql/sql_acl.cc:
  Renamed structure st_security_context to class Security_context
  fixed function comment and return value
  variable used to optimize access to security context
  Renamed method of Security_ontext
sql/sql_acl.h:
  fixed return value type
sql/sql_class.cc:
  Renamed structure st_security_context to class Security_context
sql/sql_class.h:
  Renamed structure st_security_context to class Security_context
  Method renamed
sql/sql_db.cc:
  Renamed structure st_security_context to class Security_context
  fixed layout
sql/sql_parse.cc:
  registration of wanted access for underlying tables
sql/sql_show.cc:
  Renamed structure st_security_context to class Security_context
  fixed layout
sql/sql_yacc.yy:
  Renamed structure st_security_context to class Security_context
2005-09-20 21:20:38 +03:00
unknown
3e978f8573 a fix (bug #11553: gives error if aggregate user-defined function in HAVING clause).
sql/sql_yacc.yy:
  a fix (bug #11553: gives error if aggregate user-defined function in HAVING clause).
    - call inc_in_sum_expr() before udf_expr_list rule parsing in case of
      aggregate udf functions.
2005-09-20 14:28:23 +05:00
unknown
130e902cf1 Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0


ndb/include/ndbapi/NdbBlob.hpp:
  Auto merged
ndb/include/ndbapi/NdbOperation.hpp:
  Auto merged
ndb/include/ndbapi/NdbRecAttr.hpp:
  Auto merged
ndb/src/ndbapi/NdbApiSignal.cpp:
  Auto merged
ndb/src/ndbapi/NdbApiSignal.hpp:
  Auto merged
ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
ndb/src/ndbapi/NdbRecAttr.cpp:
  Auto merged
ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
  Auto merged
ndb/test/include/NDBT_Test.hpp:
  Auto merged
ndb/test/ndbapi/bank/BankLoad.cpp:
  Auto merged
ndb/test/ndbapi/testOIBasic.cpp:
  Auto merged
ndb/test/src/NdbBackup.cpp:
  Auto merged
ndb/test/src/NdbRestarts.cpp:
  Auto merged
ndb/tools/restore/Restore.cpp:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
ndb/include/ndbapi/Ndb.hpp:
  merge
ndb/include/ndbapi/NdbIndexOperation.hpp:
  merge
ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  merge
ndb/include/ndbapi/NdbTransaction.hpp:
  merge
ndb/src/ndbapi/NdbImpl.hpp:
  merge
ndb/src/ndbapi/Ndblist.cpp:
  merge
ndb/test/src/HugoCalculator.cpp:
  merge
ndb/test/src/NDBT_Test.cpp:
  merge
sql/ha_ndbcluster.cc:
  merge
sql/mysqld.cc:
  merge
sql/sql_lex.h:
  merge
sql/sql_parse.cc:
  merge
2005-09-20 10:46:33 +02:00
unknown
b390a1a400 ndb - imlp. show engine ndb status;
that dump free list allocation per connection


sql/ha_ndbcluster.cc:
  imlp. show engine ndb status;
    that dump free list allocation per connection
sql/ha_ndbcluster.h:
  imlp. show engine ndb status;
    that dump free list allocation per connection
sql/mysqld.cc:
  imlp. show engine ndb status;
    that dump free list allocation per connection
sql/sql_lex.h:
  imlp. show engine ndb status;
    that dump free list allocation per connection
sql/sql_parse.cc:
  imlp. show engine ndb status;
    that dump free list allocation per connection
sql/sql_yacc.yy:
  imlp. show engine ndb status;
    that dump free list allocation per connection
2005-09-19 15:35:07 +02:00
unknown
84f029a448 WL#2787 (part 2, ver 3 (merged)) changed securety context switching
libmysqld/lib_sql.cc:
  changed securety context switching
mysql-test/r/rpl_sp.result:
  now it show real information from changed security context of SP (checked)
sql/ha_innodb.cc:
  changed securety context switching
sql/item.cc:
  changed securety context switching
sql/item_func.cc:
  changed securety context switching
sql/item_strfunc.cc:
  changed securety context switching
sql/log.cc:
  changed securety context switching
sql/mysql_priv.h:
  changed securety context switching
sql/mysqld.cc:
  changed securety context switching
sql/repl_failsafe.cc:
  changed securety context switching
sql/set_var.cc:
  changed securety context switching
sql/slave.cc:
  changed securety context switching
sql/sp.cc:
  changed securety context switching
sql/sp_head.cc:
  changed securety context switching
  in case of inability to switch context  we return error now
sql/sp_head.h:
  changed securety context switching
sql/sql_acl.cc:
  changed securety context switching
sql/sql_acl.h:
  changed securety context switching
sql/sql_base.cc:
  changed securety context switching
sql/sql_class.cc:
  changed securety context switching
sql/sql_class.h:
  changed securety context switching
sql/sql_db.cc:
  changed securety context switching
sql/sql_insert.cc:
  changed securety context switching
sql/sql_parse.cc:
  changed securety context switching
sql/sql_show.cc:
  changed securety context switching
sql/sql_trigger.cc:
  changed securety context switching
sql/sql_view.cc:
  changed securety context switching
sql/sql_yacc.yy:
  changed securety context switching
2005-09-15 22:29:07 +03:00
unknown
33b1d6f63d 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


sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  merge
2005-09-14 13:37:40 +03:00
unknown
8c86f8e4bf Post-review fix for BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers
mysql-test/r/sp.result:
  Added missing drop table.
mysql-test/t/sp.test:
  Added missing drop table.
sql/sp_head.h:
  Post-review fix for autocommit check in SPs and triggers.
sql/sql_yacc.yy:
  Post-review fix for autocommit check in SPs and triggers.
2005-09-14 10:54:02 +02:00
unknown
d0a78e6fa6 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


sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/func_in.result:
  merge
mysql-test/r/lowercase_view.result:
  merge
mysql-test/r/mysqldump.result:
  merge
mysql-test/r/sql_mode.result:
  merge
mysql-test/r/temp_table.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-09-14 11:07:04 +03:00
unknown
f7aeb6f9fd part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm


mysql-test/r/func_in.result:
  definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
  definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
  definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
  check log of queries
mysql-test/r/skip_grants.result:
  --skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
  definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
  definer information added to CREATE VIEW
mysql-test/r/view.result:
  definer information added to CREATE VIEW
  test of storing/restoring definer information
mysql-test/r/view_grant.result:
  test of grant check of definer information
  definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
  check log of queries
mysql-test/t/skip_grants.test:
  --skip-grants do not allow use user information
mysql-test/t/view.test:
  test of storing/restoring definer information
mysql-test/t/view_grant.test:
  test of grant check of definer information
sql/mysql_priv.h:
  CREATE/ALTER VIEW print support
  set current user as definer procedure
sql/share/errmsg.txt:
  new errors/warnings
sql/sql_acl.cc:
  make find_acl_user public to allow to check user
sql/sql_acl.h:
  make find_acl_user public to allow to check user
sql/sql_lex.h:
  storing definer information
sql/sql_parse.cc:
  send CREATE/ALTER VIEW for replication with full list of options
  set current user as definer procedure
sql/sql_show.cc:
  new CREATE VIEW options printed
sql/sql_view.cc:
  check of definer clause
  changes in .frm file
  definer information storage support
  now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
  definer information sintax support
  getting SOURCE field information for .frm
sql/table.h:
  definer information storage
2005-09-14 10:53:09 +03:00
unknown
38c43ecdd3 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-09-14 09:43:02 +02:00
unknown
6ad5a6c78f Merge eherman@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/eric/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-09-13 10:17:40 -07:00
unknown
065a93773e 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).


mysql-test/r/sp-error.result:
  New test case for BUG#12712.
mysql-test/t/sp-error.test:
  New test case for BUG#12712.
sql/set_var.cc:
  Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/set_var.h:
  Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/share/errmsg.txt:
  New error message for disallowing the setting of autocommit in stored functions and triggers.
sql/sp_head.h:
  New flag: has 'set autocommit', and testing for this in is_not_allowed_in_function().
sql/sql_yacc.yy:
  Disallow setting AUTOCOMMIT in stored function and triggers.
2005-09-13 17:16:12 +02:00
unknown
902932a1e8 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.


mysql-test/r/sp.result:
  New test case for BUG#13133.
mysql-test/t/sp.test:
  New test case for BUG#13133.
sql/sp_head.cc:
  Just init. local variable slots in the fram to NULL. (Real init. will be done
  in each block.)
sql/sp_pcontext.cc:
  Removed isset flag, since it's not used.
sql/sp_pcontext.h:
  Removed isset flag, since it's not used.
sql/sql_yacc.yy:
  Initialize local variables in the block to null, or the default value, given.
  (Untabifed block too.)
2005-09-13 12:50:21 +02:00
unknown
00d77fdd75 Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414


mysql-test/r/federated.result:
  alter from "COMMENT=" to "CONNECTION="
mysql-test/r/federated_archive.result:
  change "COMMENT=" to "CONNECTION="
mysql-test/t/federated.test:
  change from "COMMENT=" to "CONNECTION="
mysql-test/t/federated_archive.test:
  change from "COMMENT=" to "CONNECTION="
sql/ha_federated.cc:
  Change parsing of char* table->s->comment to LEX_STRING table->s->connect_string
  (per Monty's patch)
sql/handler.h:
  added LEX_STRING "connection_string"
  (per Monty's patch)
sql/sql_yacc.yy:
  added setting of "connect_string" string and length
sql/table.cc:
  Modifying frm file to store connecting information (code change came from Monty).
sql/table.h:
  added connect_string
sql/unireg.cc:
  Storing information on connection_string (code came from Monty).
2005-09-12 18:02:17 -07:00
unknown
0dec682f39 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.


mysql-test/r/select.result:
  Added test for BUG#12943.
mysql-test/t/select.test:
  Added test for BUG#12943.
sql/sql_parse.cc:
  Fixed typo.
sql/sql_yacc.yy:
  Provide explicit priorities of the JOIN operator and the 'table_ref' rule,
  to enforce left-associativity of [INNER | CROSS] JOIN.
2005-09-10 15:01:54 +03:00
unknown
cf0b4702f5 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-09-07 23:44:23 +04:00
unknown
eb061b654f 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.


mysql-test/r/sp-error.result:
  Results for the test case for Bug#12995 added.
mysql-test/t/sp-error.test:
  Test case for Bug#12995 added.
sql/sql_yacc.yy:
  Forbid any form of "HANDLER" statement from use in stored procedures/functions.
2005-09-07 23:03:56 +04:00
unknown
c0c40c5ffd Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-0


sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-09-07 18:58:58 +04:00
unknown
0a61c3abda 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.


sql/item_cmpfunc.cc:
  Post merge changes
sql/opt_range.cc:
  Post merge changes
sql/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.
sql/sql_yacc.yy:
  Post merge changes.
mysql-test/r/join_outer.result:
  Post merge changes
2005-09-07 17:42:47 +04:00
unknown
2e883d19cf Merge mysql.com:/home/alexi/dev/mysql-4.1-0
into  mysql.com:/home/alexi/dev/mysql-5.0-0


sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/join_outer.result:
  Manual merge
mysql-test/t/join_outer.test:
  Manual merge
sql/item_cmpfunc.h:
  Manual merge
sql/opt_range.cc:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
BitKeeper/etc/RESYNC_TREE:
  New BitKeeper file ``BitKeeper/etc/RESYNC_TREE''
2005-09-06 23:49:54 +04:00
unknown
b89205880f 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.


mysql-test/r/sp-error.result:
  Results for the test case for Bug#12953 added.
mysql-test/t/sp-error.test:
  Test case for Bug#12953 "Stored procedures: crash if OPTIMIZE TABLE in function" added.
sql/sql_yacc.yy:
  Forbid "OPTIMIZE TABLE" statement from use in stored procedures/functions.
2005-09-06 21:43:06 +04:00
unknown
f1cc504981 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


mysql-test/t/join_outer.test:
  Added testcases for bugs #12101, #12102
mysql-test/r/join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
sql/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.
sql/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/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().
sql/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.
2005-09-06 18:03:08 +04:00
unknown
c910050a76 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).


mysql-test/r/not_embedded_server.result:
  Since we don't want to log Dynamic SQL in stored procedures,
  now the general log gets only one log entry per SQL statement.
mysql-test/r/sp-error.result:
  - remove obsolete tests
  - a better error message for the case when a stored procedure that
  returns a result set is called from a function
mysql-test/r/trigger.result:
  - a better error message for the case when a stored procedure that
  returns a result set is called from a trigger
mysql-test/t/sp-error.test:
  - a better error message for the case when a stored procedure that
    returns a result set is called from a function.
  - move the comment to its place (end of file).
mysql-test/t/trigger.test:
  - a better error message for the case when a stored procedure that
  returns a result set is called from a trigger
sql/item_func.cc:
  - we need to pass sql_command explicitly to get_var_with_binlog, because
  when creating a query for SQL prepared statement thd->lex->sql_command
  points at SQLCOM_EXECUTE, which is not listed in the list of update
  queries.
sql/log_event.h:
  - remove an extra copy of the previous sentence
sql/mysql_priv.h:
  - fix declarations of sql_prepare.cc API
sql/share/errmsg.txt:
  - a new error message, when one attempts to execute a prepared statement
  which is currently being executed (this can happen only in Dynamic SQL
  at the moment).
sql/sp_head.cc:
  - extend sp_multi_results_command to return different flags for a
  command (and rename it)
  - add support for SQLCOM_PREPARE,SQLCOM_EXECUTE, SQLCOM_DEALLOCATE
    to sp_get_flags_for_command
  - replace multiple boolean sp_head members with uint m_flags
  - a fix for a crash when user variables are used in a stored procedure
    and binlog is on. A temporary fix for Bug#12637 "SP crashes the server 
   if it has update query with user var & binlog is enabled", which actually
   stands for stored functions: now instead of a crash we break
   replication if a user variable is used in a stored function which 
   is executed in prelocked mode.
sql/sp_head.h:
  - replace multiple boolean flags of sp_head with uint m_flags;
  - add flag CONTAINS_DYNAMIC_SQL
  - use this flag to error if a stored procedure with Dynamic SQL is
    called from a function or trigger.
sql/sql_class.cc:
  - Statement_map::insert should not delete a statement if it exists,
    now it's done externally to be able to handle the case when the
    statement being deleted is in use.
  - remove extra code (free_list is already reset in free_items)
sql/sql_lex.cc:
  - add lex->stmt_prepare_mode; we can't rely on thd->command any more,
    because we don't reset it any more (Dynamic SQL requirement is that
    PS are as little intrusive as possible).
sql/sql_lex.h:
  - declare bool LEX::stmt_prepare_mode
sql/sql_parse.cc:
  - move prepared statement code to sql_prepare.cc
  - change declarations (refactored code)
  - better error message when one attempts to use Dynamic SQL or a 
    stored procedure that returns a result set in a function or trigger.
sql/sql_prepare.cc:
  - major refactoring to ensure PREPARE/EXECUTE commands do not reset global THD
    state and allow their use in stored procedures.
  - add Prepared_statement::flags and use it to ensure no recursive execution
    of a prepared statement is possible
  - better comments
sql/sql_yacc.yy:
  - enable PREPARE/EXECUTE/DEALLOCATE in stored procedures
  - produce an error message on attempt to use PREPARE/EXECUTE/DEALLOCATE
    in a stored function or trigger
mysql-test/r/sp-dynamic.result:
  - sp-dynamic.test results
mysql-test/t/sp-dynamic.test:
  - a new test for PREPARE/EXECUTE/DEALLOCATE in stored procedures.
2005-09-03 03:13:18 +04:00
unknown
a10739e596 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-5000


sql/sql_yacc.yy:
  Auto merged
2005-08-29 21:11:05 +02:00
unknown
27201ccb06 Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
Added a switch to reject illegal values for PACK_KEYS.


mysql-test/r/myisam.result:
  Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
  The test result.
mysql-test/t/myisam.test:
  Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
  The test case.
2005-08-29 17:24:07 +02:00
unknown
901075ac22 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy004.:/work/mysql-5.0-ready4


sql/sql_yacc.yy:
  Auto merged
2005-08-29 12:20:36 +02:00
unknown
afe5507c75 fix for bug #12490 (all-in-one patch)
(Packets out of order if calling HELP CONTENTS from Stored Procedure)


mysql-test/r/sp-error.result:
  results of test of bug 12490
mysql-test/t/sp-error.test:
  test for bug 12490
  (Packets out of order if calling HELP CONTENTS from Stored Procedure)
sql/sql_yacc.yy:
  disable HELP in SP
  (fixes bug 12490)
2005-08-29 12:19:08 +02:00
unknown
8ac7225ddf Merge deer.(none):/home/hf/work/mysql-5.0.11207
into deer.(none):/home/hf/work/mysql-5.0.clean


sql/sql_yacc.yy:
  Auto merged
2005-08-27 18:53:54 +05:00
unknown
f2539a49b6 Addition to the fix for #11207 (SET GLOBAL TRANSACTION ISOLATION LEVEL)
sql/sql_yacc.yy:
  exact types specified for opt_var_type and similar
2005-08-27 18:51:11 +05:00
unknown
8f3daaf1a0 Merge deer.(none):/home/hf/work/mysql-5.0.10499
into deer.(none):/home/hf/work/mysql-5.0.clean


sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-08-27 18:13:26 +05:00
unknown
bddf61cfb3 Bug#9048
"Creating a function with char binary IN parameter fails"
  Parse BINARY as part of type declaration, not as 
  a column attribute.


mysql-test/r/sp.result:
  test for bug 9048
mysql-test/t/sp.test:
  test for bug 9048
sql/sql_yacc.yy:
  fix bug 9048
  parse BINARY as part of type declaration and not as column modifier.
2005-08-27 07:26:14 +01:00
unknown
08b8f64832 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug12335-release2


sql/lex.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-08-25 17:39:02 +04:00
unknown
8a5e527453 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.


mysql-test/r/rpl_sp.result:
  Fix for BUG#12335: updated test cases/results
mysql-test/t/rpl_sp.test:
  Fix for BUG#12335: updated test cases/results
sql/item.cc:
  Fix for BUG#12335 (SP replication): 
   - Added Item_name_const 'function'
   - Addede 'delete reuse' to call dtor on item reuse
sql/item.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
sql/item_create.cc:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_create.h:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_func.cc:
  Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
sql/lex.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/log.cc:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/mysql_priv.h:
  Fix for BUG#12335 (SP replication)
sql/sp_head.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sp_head.h:
  Comments added
sql/sp_pcontext.h:
  Comments added
sql/sp_rcontext.h:
  Comments added
sql/sql_class.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_class.h:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/sql_delete.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_insert.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_lex.cc:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_lex.h:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_parse.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_update.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_yacc.yy:
  Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
  in the query.
2005-08-25 17:34:34 +04:00
unknown
da13a76a28 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)


mysql-test/r/func_time.result:
  Add new results
mysql-test/t/func_time.test:
  Add tests for new SYSDATE() behavior
sql/item_timefunc.cc:
  Add Item_func_sysdate_local implementation
sql/item_timefunc.h:
  Add Item_func_sysdate_local, so SYSDATE() can behave differently
  than NOW().
sql/lex.h:
  SYSDATE() is no longer an alias for NOW().
sql/sql_yacc.yy:
  Handle SYSDATE()
2005-08-24 15:50:58 -07:00
unknown
41dad02d04 Merge bk-internal:/home/bk/mysql-5.0
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-08-20 14:38:18 +04:00
unknown
9ed50e9675 the syntax is XA END xid [SUSPEND [FOR MIGRATE]] 2005-08-19 18:00:16 +04:00
unknown
44086a625b Cleanups and optimization during review of new code
mysql-test/t/kill.test:
  Moved --disable_reconnect earlier to avoid race condition
sql/sql_help.cc:
  Cleanup during review of new code
  (Moved variable definitions first in function
sql/sql_insert.cc:
  Cleanup during review of new code
sql/sql_lex.cc:
  Cleanup during review of new code
sql/sql_parse.cc:
  Cleanup during review of new code
  Changed potential problem with previous_table_ref where it dependent that TABLE_LIST first element would be next_local
  Rearanged code in add_table_to_list() to remove extra if
  Combined 2 calls to calloc() to one
sql/sql_view.cc:
  Remove extra indentation level
  Combined common 'on error' exit
sql/sql_yacc.yy:
  Fixed comment style
sql/table.cc:
  Cleanup during review of new code
  - Changed while() loops to for() loop (to make code more readable)
  - Removed not needed initialization of variables
  - Removed not needed 'else' cases
  - Removed trivial ASSERT's that was checked by previous code
  - Moved comment setting last in Natural_join_column::check_grants()
2005-08-18 03:12:42 +03:00
unknown
c5aac211d0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


sql/ha_berkeley.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_derived.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_class.cc:
  Manual merge
2005-08-15 18:35:48 +03:00
unknown
a914b5274f Save and clear run context before executing a stored function or trigger and restore it afterwards.
This allows us to use statement replication with functions and triggers
The following things are fixed with this patch:
- NOW() and automatic timestamps takes the value from the main event for functions and triggers (which allows these to replicate with statement level logging)
- No side effects for triggers or functions with auto-increment values(), last_insert_id(), rand() or found_rows()
- Triggers can't return result sets

Fixes bugs:
#12480: NOW() is not constant in a trigger
#12481: Using NOW() in a stored function breaks statement based replication
#12482: Triggers has side effects with auto_increment values
#11587: trigger causes lost connection error


mysql-test/r/trigger.result:
  Added test fpr big
mysql-test/t/sp-error.test:
  Changed error message numbers
mysql-test/t/trigger.test:
  Added test for trigger returning result (#11587)
sql/item_func.cc:
  Store the first used seed value for RAND() value.
  (This makes rand() replicatable in functions and triggers)
  Save and clear run context before executing a stored function and restore it afterwards.
  This removes side effects of stored functions for RAND(), auto-increment values and NOW() and makes most stored function replicatable
sql/share/errmsg.txt:
  Reuse error message also for triggers
sql/sp_head.cc:
  If in function or trigger, don't change value of NOW()
  (This allows us to use statement replication with functions that directly or indirectly uses timestamps)
sql/sql_class.cc:
  Added framework for storing and retrieving run context while exceuting triggers or stored functions.
sql/sql_class.h:
  Added framework for storing and retrieving run context while exceuting triggers or stored functions.
sql/sql_parse.cc:
  If in function or trigger, don't change value of NOW()
  (This allows us to use statement replication with functions that directly or indirectly uses timestamps)
sql/sql_trigger.cc:
  Moved process_triggers function from sql_trigger.h
  Use reset/restore sub_statement_state while executing triggers to avoid side effects and make them replicatable
sql/sql_trigger.h:
  Moved process_triggers function from sql_trigger.h
  Use reset/restore sub_statement_state while executing triggers to avoid side effects and make them replicatable
sql/sql_yacc.yy:
  Give error message if trigger can return a result set (Bug #11587)
tests/fork_big2.pl:
  Removed return from end of lines
mysql-test/r/rpl_trigger.result:
  New BitKeeper file ``mysql-test/r/rpl_trigger.result''
mysql-test/t/rpl_trigger.test:
  New BitKeeper file ``mysql-test/t/rpl_trigger.test''
2005-08-15 18:15:12 +03:00
unknown
2b53b711d8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge


mysql-test/r/errors.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/join_nested.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/errors.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_insert.cc:
  merge WL#2486
sql/sql_show.cc:
  merge WL#2486
2005-08-12 19:27:54 +03:00
unknown
7517d7e112 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task


mysql-test/include/ps_query.inc:
  Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
  The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
  More detailed error message.
mysql-test/r/innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
  More detailed error message.
mysql-test/r/join.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one failing test case which is commented with
  WL#2486 in the test file.
mysql-test/r/subselect.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
  More detailed error message.
mysql-test/t/bdb.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
  More detailed error message.
mysql-test/t/innodb.test:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
  More detailed error message.
mysql-test/t/join.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
  More detailed error message.
sql/item.cc:
  - extra parameter to find_field_in_tables
  - find_field_in_real_table renamed to find_field_in_table
  - fixed comments/typos
sql/item.h:
  - added [first | last]_name_resolution_table to class
    Name_resolution_context
  - commented old code
  - standardized formatting
sql/mysql_priv.h:
  - refactored the find_field_in_XXX procedures,
  - added a new procedure for natural join table references,
  - renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
  - pass the top-most list of the FROM clause to setup_tables
  - extra parameter to find_field_in_tables
sql/sql_acl.cc:
  - renamed find_field_in_table => find_field_in_table_ref
  - extra parameter to find_field_in_table_ref
  - commented old code
sql/sql_base.cc:
  This file contains the core of the implementation of the processing
  of NATURAL/USING joins (WL#2486).
  - added many comments to old code
  - refactored the group of find_field_in_XXX procedures, and added a
    new procedure for natural joins. There is one find_field_in_XXX procedure
    per each type of table reference (stored table, merge view, or natural
    join); one meta-procedure that selects the correct one depeneding on the
    table reference; and one procedure that goes over a list of table
    referenes.
  - NATURAL/USING joins are processed through the procedures:
      mark_common_columns, store_natural_using_join_columns,
      store_top_level_join_columns, setup_natural_join_row_types.
    The entry point to processing NATURAL/USING joins is the
    procedure 'setup_natural_join_row_types'.
  - Replaced the specialized Field_iterator_XXX iterators with one
    generic iterator over the fields of a table reference.
  - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
    the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
  - Commented old code.
sql/sql_delete.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_help.cc:
  - pass the end name resolution table to find_field_in_tables
  - adjust the list of tables for name resolution
sql/sql_insert.cc:
  - Changed the code that saves and restores the current context to
    support the list of tables for name resolution -
    context->first_name_resolution_table, and
    table_list->next_name_resolution_table.
    Needed to support an ugly trick to resolve inserted columns only in
    the first table.
  - Added Name_resolution_context::[first | last]_name_resolution_table.
  - Commented old code
sql/sql_lex.cc:
  - set select_lex.parent_lex correctly
  - set correct state of the current name resolution context
sql/sql_lex.h:
  - Added a stack of name resolution contexts to support local
    contexts for JOIN ... ON conditions.
  - Commented old code.
sql/sql_load.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
  - correctly set SELECT_LEX::parent_lex
  - set the first table of the current name resoltion context
  - added support for NATURAL/USING joins
  - commented old code
sql/sql_select.cc:
  - Pass the FROM clause to setup_tables.
  - Pass the end table to find_field_in_tables
  - Improved comments
sql/sql_show.cc:
  - Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
  - Added support for a stack of name resolution contexts needed to
    implement name resolution for JOIN ... ON. A context is pushed
    for each new JOIN ... ON, and popped afterwards.
  - Added support for NATURAL/USING joins.
sql/table.cc:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
sql/table.h:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
  Adjusted according to standard NATURAL JOIN syntax.
2005-08-12 17:57:19 +03:00
unknown
d6c3d655b8 Fixes during review of new pushed code
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong


sql/ha_berkeley.cc:
  Removed not used variable (and options)
sql/ha_berkeley.h:
  Removed not used argument
sql/ha_ndbcluster.cc:
  Remove compiler warning
sql/init.cc:
  Simplify code
sql/item_sum.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysql_priv.h:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysqld.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_class.h:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_delete.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_derived.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_lex.h:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_parse.cc:
  Indentation fixes
sql/sql_select.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_select.h:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_show.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_union.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_update.cc:
  Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_yacc.yy:
  Changed variable name i to more descriptive name
  Removed compiler warning
2005-08-12 13:54:42 +03:00
unknown
6cca9a0fd3 Fix for bug #10499 (Function creation with GEOMETRY return)
mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis.test:
  test case
sql/sp_head.cc:
  m_geom_returns is sent to make_field
sql/sp_head.h:
  m_geom_returns declared
sql/sql_yacc.yy:
  m_geom_returns initializing added
2005-08-10 13:45:05 +05:00
unknown
f6fff55eb0 Fix for bug #12280 "Triggers: crash if flush tables".
We should not allow FLUSH statement to be executed inside both triggers
and stored functions.


mysql-test/r/sp-error.result:
  Updated test after replacing error, which is thrown when one uses FLUSH
  statement inside of stored function, with more specific.
  Also now we issue more general error when we barking about USE command
  in stored routines.
mysql-test/r/trigger.result:
  Added test for bug #12280 "Triggers: crash if flush tables"
mysql-test/t/sp-error.test:
  Updated test after replacing error, which is thrown when one uses FLUSH
  statement inside of stored function, with more specific.
  Also now we issue more general error when we barking about USE command
  in stored routines.
mysql-test/t/trigger.test:
  Added test for bug #12280 "Triggers: crash if flush tables"
sql/share/errmsg.txt:
  Removed ER_SP_NO_USE error. Now we use more general ER_SP_BADSTATEMENT in this
  case. Instead added error message for barking about statements which should not
  be allowed inside of stored functions or triggers.
  It is safe to do this since it is highly unprobable that someone will upgrade
  first to the new 5.0 release and then downgrade back to the old one.
sql/sql_parse.cc:
  reload_acl_and_cache():
    FLUSH TABLES and FLUSH PRIVILEGES should not be allowed if we are inside
    of stored function or trigger.
sql/sql_yacc.yy:
  We should not allow FLUSH statement inside both triggers and stored
  functions. Replaced error which is thrown in this case with more
  specific.
  Also now we issue more general ER_SP_BADSTATEMENT error when one tries
  to use USE command inside of stored routine.
2005-08-10 10:31:32 +04:00
unknown
d1b163ecae Fix for bug #11207 (SET GLOBAL TRANSACTION ISOLATION LEVEL is broken)
sql/sql_yacc.yy:
  i think the '!' is wrong here
2005-08-08 19:04:10 +05:00
unknown
a160bc9cce Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-tn


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Manual merge.
2005-07-19 20:55:09 +04:00