Commit graph

2027 commits

Author SHA1 Message Date
unknown
9a10c20ba9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/archive.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/queues.c:
  Auto merged
sql/events.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  manual merge
mysql-test/r/myisam.result:
  manual merge
mysql-test/r/partition.result:
  manual merge
mysql-test/r/user_var.result:
  manual merge
mysql-test/t/myisam.test:
  manual merge
mysql-test/t/partition.test:
  manual merge
mysql-test/t/user_var.test:
  manual merge
sql/item.h:
  manual merge
sql/item_func.cc:
  manual merge
storage/myisammrg/ha_myisammrg.cc:
  manual merge
2007-12-13 15:56:04 +04:00
unknown
cdc382e7fd Bug#22312 Syntax error in expression with INTERVAL()
Parser rejects valid INTERVAL() expressions when associated with
arithmetic operators. The problem is the way in which the expression
and interval grammar rules were organized caused shift/reduce conflicts.

The solution is to tweak the interval rules to avoid shift/reduce
conflicts by removing the broken interval_expr rule and explicitly
specify it's content where necessary.

Original fix by Davi Arnaut, revised and improved rules by Marc Alff


mysql-test/r/parser.result:
  Add test case result for Bug#22312
mysql-test/t/parser.test:
  Add test case for Bug#22312
sql/sql_yacc.yy:
  Resolve shift/reduce conflicts by reorganizing the interval
  expression rules.
2007-11-30 09:34:25 -02:00
unknown
30aee30b0d Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


include/my_base.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/suite/ndb/t/disabled.def:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
client/mysql.cc:
  Manual merge
mysql-test/suite/rpl/t/disabled.def:
  Manual merge
2007-11-27 19:29:10 +01:00
unknown
7eb5a83de6 Merge mysql.com:/home/ram/work/b30495/b30495.5.0
into  mysql.com:/home/ram/work/b30495/b30495.5.1


mysql-test/r/analyze.result:
  Auto merged
mysql-test/t/analyze.test:
  Auto merged
sql/sql_yacc.yy:
  5.0 -> 5.1 manual merging (see bug #30495: optimize table t1,t2,t3 extended errors):
  CHECK options disabled for ANALYZE/OPTIMIZE PARTITION.
2007-11-27 10:14:46 +04:00
unknown
b7a2960fee Merge magare.gmz:/home/kgeorge/mysql/work/B32036-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32036-5.1-opt


mysql-test/r/subselect.result:
  merged fix for bug 32036 to 5.1-opt
mysql-test/t/subselect.test:
  merged fix for bug 32036 to 5.1-opt
sql/sql_yacc.yy:
  merged fix for bug 32036 to 5.1-opt
2007-11-26 13:48:22 +02:00
unknown
f3f9855d13 Bug #32036: EXISTS within a WHERE clause with a UNION
crashes MySQL 5.122
There was a difference in how UNIONs are handled
on top level and when in sub-query.
Because the rules for sub-queries were syntactically
allowing cases that are not currently supported by
the server we had crashes (this bug) or wrong results
(bug 32051).
Fixed by making the syntax rules for UNIONs match the 
ones at top level.

These rules however do not support nesting UNIONs, e.g.
(SELECT a FROM t1 UNION ALL SELECT b FROM t2) 
 UNION
(SELECT c FROM t3 UNION ALL SELECT d FROM t4)
Supports for statements with nested UNIONs will be
added in a future version.


mysql-test/r/subselect.result:
  Bug #32036: test case
mysql-test/t/subselect.test:
  Bug #32036: test case
sql/sql_yacc.yy:
  Bug #32036: Make the syntax rules for UNIONs in subqueries the same
  as for top level UNIONs.
2007-11-26 13:36:24 +02:00
unknown
692f0e4f67 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/suite/ndb/r/ndb_dd_basic.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/innodb.result:
  Manual merge.
2007-11-21 21:15:33 +01:00
unknown
18851d9ea7 Fix for bug #30495: optimize table t1,t2,t3 extended errors
Problem: we have CHECK TABLE options allowed (by accident?) for
ANALYZE/OPTIMIZE TABLE.

Fix: disable them.

Note: it might require additional fixes in 5.1/6.0


mysql-test/r/analyze.result:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - test result.
mysql-test/t/analyze.test:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - test case.
sql/sql_yacc.yy:
  Fix for bug #30495: optimize table t1,t2,t3 extended errors
    - opt_mi_check_type (CHECK TABLE options) removed from analyze: and optimize:
2007-11-21 11:11:22 +04:00
unknown
711cf7503d Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
mysql-test/r/events_bugs.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/select.result:
  manual merge
mysql-test/t/select.test:
  manual merge
2007-11-14 17:30:16 +04:00
unknown
19ef3ae88d Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-new-rpl


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  Auto merged
mysql-test/suite/rpl/r/rpl_bug31076.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_bug31076.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  Auto merged
mysql-test/suite/rpl_ndb/t/disabled.def:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event_old.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/partition.test:
  Manual merge.
BitKeeper/deleted/.del-rpl_row_extraColmaster_ndb.result~a2c64bae75b49d2:
  Manual merge.
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Manual merge.
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Manual merge.
mysql-test/suite/rpl/t/disabled.def:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
2007-11-14 11:07:30 +01:00
unknown
1b98a962d5 Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-main
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.1-last_with_main


libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
sql/event_scheduler.cc:
  Auto merged
sql/events.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_connect.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-11-12 21:09:48 +01:00
unknown
cecc270212 fixed coding style
sql/sql_yacc.yy:
  Fixed coding style (tabs)
2007-11-05 16:52:04 -07:00
unknown
cc0e546567 BUG#28086 (SBR of USER() becomes corrupted on slave):
Marking statements containing USER() or CURRENT_USER() as unsafe, causing
them to switch to using row-based logging in MIXED mode and generate a
warning in STATEMENT mode.


mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Result change.
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Adding test to check that USER() and CURRENT_USER() cause a switch
  to row-based logging.
sql/sql_yacc.yy:
  Setting statements containing USER() or CURRENT_USER() to be unsafe.
2007-10-31 21:09:52 +01:00
unknown
1603139dd5 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
2007-10-31 13:13:20 +01:00
unknown
bf18f6d4b8 Bug#30904 SET PASSWORD statement is non-transactional
The SET PASSWORD statement is non-transactional (no explicit transaction
boundaries) in nature and hence is forbidden inside stored functions and
triggers, but it weren't being effectively forbidden.

The implemented fix is to issue a implicit commit with every SET PASSWORD
statement, effectively prohibiting these statements in stored functions
and triggers. 


mysql-test/r/sp-error.result:
  Add test case result for Bug#30904
mysql-test/t/sp-error.test:
  Add test case for Bug#30904
sql/sql_lex.h:
  Add variable to set that a statement with SET PASSWORD causes a implicit
  commit.
sql/sql_parse.cc:
  End active transaction in SET PASSWORD.
sql/sql_yacc.yy:
  Set the correct flag on SET PASSWORD if inside a SP, thus effectively
  prohibiting SET PASSWORD statements in stored functions and triggers.
2007-10-30 20:51:04 -02:00
unknown
2437001234 Use an inline getter method (thd->is_error()) to query if there is an error
in THD.
In future the error may be stored elsewhere (not in net.report_error) and 
it's important to start using an opaque getter to simplify merges.


sql/filesort.cc:
  net.report_error -> is_error()
sql/ha_ndbcluster_binlog.cc:
  net.report_error -> is_error()
sql/item_func.cc:
  net.report_error -> is_error()
sql/item_subselect.cc:
  net.report_error -> is_error()
sql/set_var.cc:
  net.report_error -> is_error()
sql/sp.cc:
  net.report_error -> is_error()
sql/sp_head.cc:
  net.report_error -> is_error()
sql/sql_base.cc:
  net.report_error -> is_error()
sql/sql_class.cc:
  net.report_error -> is_error()
sql/sql_class.h:
  net.report_error -> is_error()
sql/sql_connect.cc:
  net.report_error -> is_error()
sql/sql_delete.cc:
  net.report_error -> is_error()
sql/sql_insert.cc:
  net.report_error -> is_error()
sql/sql_parse.cc:
  net.report_error -> is_error()
sql/sql_prepare.cc:
  net.report_error -> is_error()
sql/sql_select.cc:
  net.report_error -> is_error()
sql/sql_union.cc:
  net.report_error -> is_error()
sql/sql_update.cc:
  net.report_error -> is_error()
sql/sql_view.cc:
  net.report_error -> is_error()
sql/sql_yacc.yy:
  net.report_error -> is_error()
2007-10-30 20:08:16 +03:00
unknown
0e076d4bb9 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/select.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Merge with 5.0-opt
2007-10-26 18:05:46 +05:00
unknown
0bb55050d1 Bug#30296
"Dynamic plugins fail to load on FreeBSD"
  ELF executables need to be linked using the -export-dynamic option to
  ld(1) for symbols defined in the executable to become visible to dlsym().
  Also, do not build plugins on an all-static build.


configure.in:
  Bug#30296
    Use "-export-dynamic" when building executable for use with plugins.
    Add required option using MYSQLD_EXTRA_LDFLAGS variable so we do not
    affect any other binary.
config/ac-macros/plugins.m4:
  Do not build plugins when building all-static
sql/sql_yacc.yy:
  build fix - surplus semicolon
2007-10-25 21:19:28 -07:00
unknown
04ff9d4da0 Fixed bug #27695: View should not be allowed to have empty or
all space column names.

The parser has been modified to check VIEW column names
with the check_column_name function and to report an error
on empty and all space column names (same as for TABLE
column names).


sql/sql_yacc.yy:
  Fixed bug #27695.
  The parser has been modified to check VIEW column aliases
  with the check_column_name function and to report an error
  on empty columns and all space columns (same as for TABLE
  column names).
mysql-test/t/select.test:
  Updated test case for bug #27695.
mysql-test/r/select.result:
  Updated test case for bug #27695.
2007-10-25 10:32:52 +05:00
unknown
95a8bb20fb Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/query_cache.result:
  manual merge
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/query_cache.test:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 19:08:21 +05:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
unknown
c5dfd3e193 Merge magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30825-5.1-opt


mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/t/gis.test:
  Auto merged
BitKeeper/deleted/.del-bdb_gis.result:
  Auto merged
BitKeeper/deleted/.del-bdb_gis.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/innodb_gis.result:
  merged 5.0-opt -> 5.1-opt
mysql-test/t/innodb_gis.test:
  merged 5.0-opt -> 5.1-opt
sql/field.cc:
  merged 5.0-opt -> 5.1-opt
sql/field.h:
  merged 5.0-opt -> 5.1-opt
sql/sql_select.h:
  merged 5.0-opt -> 5.1-opt
sql/sql_yacc.yy:
  merged 5.0-opt -> 5.1-opt
sql/table.cc:
  merged 5.0-opt -> 5.1-opt
2007-10-23 11:44:14 +03:00
unknown
933bf86954 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30825-new-5.0-opt


sql/field.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-23 11:26:37 +03:00
unknown
84984f9111 Manual merge of 5.0-runtime to 5.1-runtime
mysql-test/r/sp-error.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
mysql-test/r/udf.result:
  Manual merge
mysql-test/t/sp.test:
  Manual merge
mysql-test/t/udf.test:
  Manual merge
sql/item_create.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
2007-10-16 20:47:08 -06:00
unknown
42b6424327 Fixed broken call to my_error
sql/sql_yacc.yy:
  Fixed error message to use char*, not LEX_STRING
2007-10-16 14:27:20 -06:00
unknown
6f8fd0a797 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-16 14:10:07 +05:00
unknown
f1d7a96b0a Bug#28318 (CREATE FUNCTION (UDF) requires a schema) -- part II
The root cause of the issue was that the CREATE FUNCTION grammar,
for User Defined Functions, was using the sp_name rule.
The sp_name rule is intended for fully qualified stored procedure names,
like either ident.ident, or just ident but with a default database
implicitly selected.

A UDF does not have a fully qualified name, only a name (ident), and should
not use the sp_name grammar fragment during parsing.

The fix is to re-organize the CREATE FUNCTION grammar, to better separate:
- creating UDF (no definer, can have AGGREGATE, simple ident)
- creating Stored Functions (definer, no AGGREGATE, fully qualified name)

With the test case provided, another issue was exposed which is also fixed:
the DROP FUNCTION statement was using sp_name and also failing when no database
is implicitly selected, when droping UDF functions.
The fix is also to change the grammar so that DROP FUNCTION works with
both the ident.ident syntax (to drop a stored function), or just the ident
syntax (to drop either a UDF or a Stored Function, in the current database)


mysql-test/r/sp-error.result:
  Adjust test results
mysql-test/r/udf.result:
  Adjust test results
mysql-test/t/sp-error.test:
  Adjust test results
mysql-test/t/udf.test:
  Adjust test results
sql/sql_parse.cc:
  CREATE UDF FUNCTION does not use a fully qualified name.
sql/sql_yacc.yy:
  Fix grammar for CREATE / DROP FUNCTION, FOR udf
  Improve error messages for select no_such_function()
2007-10-15 19:15:38 -06:00
unknown
048006e2f9 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters


mysql-test/r/ctype_utf8.result:
  issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
  issue an error if string has illegal characters
sql/item.cc:
  issue an error if string has illegal characters
sql/item.h:
  issue an error if string has illegal characters
sql/sql_yacc.yy:
  issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
unknown
03e74b8c5e Bug#29223 declare cursor c for SHOW .....
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work,
but is untested for some SHOW commands and does not work for other SHOW
commands.

Since this is an un-intended feature that leaked as a result of a coding bug
(in the parser grammar), the correct fix is to fix the grammar to not accept
this construct.

In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>"
is not considered a bug, and we will not implement other features to make all
the SHOW commands usable inside a cursor just because someone exploited a bug.


mysql-test/r/sp-error.result:
  Only allow declaring cursors for SELECT statements to avoid
  possible further confusion/problems.
mysql-test/t/information_schema.test:
  Only SELECT statements are allowed in cursors.
mysql-test/t/sp-error.test:
  Add test case for Bug#29223. Non-SELECT statements in cursors now
  yields a parser error.
sql/sql_yacc.yy:
  Rework DECLARE CURSOR statement to not allow non-SELECT statements.
2007-10-11 17:38:40 -03:00
unknown
048cb42dbf after merge fix 2007-10-11 16:41:05 +05:00
unknown
937504e7a0 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_yacc.yy:
  manual merge
2007-10-11 16:13:14 +05:00
unknown
f30eacb223 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +05:00
unknown
aec287fd67 Bug #30825: Problems when putting a non-spatial index on a GIS column
Fixed the usage of spatial data (and Point in specific) with 
 non-spatial indexes.
 Several problems :
   - The length of the Point class was not updated to include the 
     spatial reference system identifier. Fixed by increasing with 4 
     bytes.
   - The storage length of the spatial columns was not accounting for
     the length that is prepended to it. Fixed by treating the 
     spatial data columns as blobs (and thus increasing the storage
     length)
   - When creating the key image for comparison in index read wrong
     key image was created (the one needed for and r-tree search,
     not the one for b-tree/other search). Fixed by treating the
     spatial data columns as blobs (and creating the correct kind of
     image based on the index type). 


mysql-test/r/bdb_gis.result:
  Bug #30825: bdb tests
mysql-test/r/gis-rtree.result:
  Bug #30825: key length changed
mysql-test/r/gis.result:
  Bug #30825: MyISAM tests
mysql-test/r/innodb_gis.result:
  Bug #30825: InnoDB tests
mysql-test/t/bdb_gis.test:
  Bug #30825: bdb tests
mysql-test/t/gis.test:
  Bug #30825: MyISAM tests
mysql-test/t/innodb_gis.test:
  Bug #30825: InnoDB tests
sql/field.cc:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/field.h:
  Bug #30825: Removed Field_geom::get_key_image as Field_blog::get_key_image 
    takes type parameter into consideration and is a superset of 
    Field_geom::get_key_image()
sql/sql_select.h:
  Bug #30825: Geometry data are a blob derivate
sql/sql_table.cc:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/sql_yacc.yy:
  Bug #30825: Increased key length to accomodate for
    spatial reference system identifier (srid)
sql/table.cc:
  Bug #30825: It stores a length for spatial data
   as well, so increase the storage length (as it's
   done for blobs).
mysql-test/include/gis_keys.inc:
  Bug #30825: Test file for spatial data and non-spatial indexes
2007-10-10 16:26:02 +03:00
unknown
e952df911c Merge virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/bugs/28318-5.0
into  virtua-cwbas201-21-158-74.ctb.virtua.com.br:/Users/davi/mysql/push/mysql-5.0-runtime


sql/sql_yacc.yy:
  Auto merged
2007-10-09 20:48:37 -03:00
unknown
ad104d5bfd Bug#28318 CREATE FUNCTION (UDF) requires a schema
Bug#29816 Syntactically wrong query fails with misleading error message

The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.

Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.


mysql-test/r/sp-error.result:
  Add test case result for Bug#29816
mysql-test/r/udf.result:
  Add test case result for Bug#28318
mysql-test/t/sp-error.test:
  Add test case for Bug#29816
mysql-test/t/udf.test:
  Add test case for Bug#28318
sql/sp.cc:
  Copy the (last) nul byte of the stored routine key and move name parsing
  code to the sp_name class constructor.
sql/sp_head.cc:
  Revamp routine name parsing for when no schema is specified and
  omit dot from the qualified name if the routine is not associated
  with a scheme name.
sql/sp_head.h:
  Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
  file.
sql/sql_yacc.yy:
  Only copy the schema name if one is actually set and check for schema
  name presence only where it's necessary.
2007-10-09 20:46:33 -03:00
unknown
ded7fe7fd1 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
libmysql/libmysql.c:
  Manual merge.
2007-10-08 02:05:10 +04:00
unknown
a73a57554a Bug#30747 Create table with identical constraint names behaves incorrectly
MySQL provides what appears to be a non standard extension to the
FOREIGN KEY syntax which let users name (label/tag) a foreign key
to more easily identify a specific foreign key if any problems show
up later during the query parsing or execution. But the foreign key
name was not being properly set to the right key, possible leaving
the foreign key with no name.


mysql-test/include/mix1.inc:
  Add test case for Bug#30747
mysql-test/r/innodb_mysql.result:
  Add test case result for Bug#30747
sql/sql_yacc.yy:
  Set the foreign key name to the constraint name if a specific name was
  not provided. As for the constraint name, only use the foreign name if
  a specific name was not provided.
2007-09-13 19:22:08 -03:00
unknown
424a8eaea9 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  lambda.weblab:/home/malff/TREE/mysql-5.1-28360-b


sql/sql_yacc.yy:
  Auto merged
2007-09-13 08:39:21 -06:00
unknown
5b541452a8 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
sql/sql_yacc.yy:
  SCCS merged
2007-09-13 00:44:50 +05:00
unknown
8eae716664 Cleanup of sql_yacc.yy
sql/sql_yacc.yy:
  Remove useless actions from the grammar.
  Empty {} actions in the middle of a rule caused an extra reduce,
  which is affecting the parser complexity and performances.
2007-09-12 12:42:02 -06:00
unknown
2978fcc3e9 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  SCCS merged
mysql-test/t/sp.test:
  SCCS merged
2007-09-12 23:41:35 +05:00
unknown
8076d23f41 WL#4030 (Deprecate RENAME DATABASE: replace with ALTER DATABASE <name>
UPGRADE)

Bug 17565 (RENAME DATABASE destroys events)
Bug#28360 (RENAME DATABASE destroys routines)

Removed the
  RENAME DATABASE db1 TO db2
statement.

Implemented the
  ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
statement, which has the same function.


client/mysqlcheck.c:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/create.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/query_cache.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/renamedb.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/sp-code.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/sp-error.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/upgrade.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/create.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/query_cache.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/renamedb.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/sp-error.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/upgrade.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/mysql_priv.h:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_lex.h:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_parse.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_prepare.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_yacc.yy:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_db.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
2007-09-10 16:10:37 -06:00
unknown
329534a86d Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data0/mhansson/my51-bug30234-push


sql/sql_yacc.yy:
  Bug#30234: Manual merge
2007-09-03 16:24:33 +02:00
unknown
403ed43b1d Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/data0/mhansson/my50-bug30234-push


sql/sql_yacc.yy:
  Auto merged
2007-09-03 12:44:17 +02:00
unknown
a895c77d1e Merge linux-st28.site:/home/martin/mysql/src/bug30234-push/my50-bug30234-push
into  linux-st28.site:/home/martin/mysql/src/bug30234-push/my51-bug30234-push


sql/sql_yacc.yy:
  Auto merged
2007-09-03 12:02:45 +02:00
unknown
f0d4beee79 Bug #30234: Unexpected behavior using DELETE with AS and USING
DELETE FROM ... USING ... statements with the following type of 
ambiguous aliasing gave unexpected results:
DELETE FROM t1 AS alias USING t1, t2 AS alias WHERE t1.a = alias.a;
This query would leave table t1 intact but delete rows from t2.
Fixed by changing DELETE FROM ... USING syntax so that only alias 
references (as opposed to alias declarations) may be used in FROM.


mysql-test/r/delete.result:
  Bug#30234: Test Result
mysql-test/t/delete.test:
  Bug#30234: Test Case
sql/sql_yacc.yy:
  Bug#30234:
  - Added parser rule table_alias_ref_list that contains a list of table 
    aliases only.
  - Added parser rule table_alias_ref that sets the TL_OPTION_ALIAS in 
    order to turn off semantic checking that applies only for table names.
2007-09-03 11:55:35 +02:00
unknown
89d3d58511 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge


client/mysql.cc:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-08-30 13:23:59 -06:00
unknown
0ecee6df3d Manual merge 2007-08-28 15:56:12 -06:00
unknown
e0e44ad66e Bug#30625 (Performance, reduce depth for expressions)
This is a performance bug, affecting in particular the bison generated code
for the parser.

Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
  bit_expr -> bit_term
  bit_term -> bit_factor
  bit_factor -> value_expr
  value_expr -> term
  term -> factor
etc

This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.

With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.

Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.

See the bug report for performance data.


mysql-test/r/parser_precedence.result:
  Improved test coverage for operator precedence
mysql-test/t/parser_precedence.test:
  Improved test coverage for operator precedence
sql/sql_yacc.yy:
  Simplified the grammar to improve performances
2007-08-28 11:16:03 -06:00
unknown
8f145dae1c Whitespace cleanup
sql/sql_yacc.yy:
  
  Whitespace cleaup
2007-08-24 09:08:11 -06:00