Commit graph

35312 commits

Author SHA1 Message Date
unknown
fed9bb9820 Bug #21103: DATE column not compared as DATE
If we compare two items A and B, with B being (a constant) of a
larger type, then A gets promoted to B's type for comparison if
it's a constant, function, or CAST() column, but B gets demoted
to A's type if A is a (not explicitly CAST()) column. This is
counter-intuitive and not mandated by the standard.
 
Disabling optimisation where it would be lossy so field value
will properly get promoted and compared as binary string (rather
than as integers).


mysql-test/include/ps_conv.inc:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/func_time.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Show that everything works as expected.
mysql-test/r/ps_2myisam.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_3innodb.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_4heap.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_5merge.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_7ndb.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/t/func_time.test:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Show that everything works as expected.
sql/field.cc:
  Bug #21103: DATE column not compared as DATE
  
  #0 stores the date only as a 3-byte integer; save_in_field() in
  #1 saves 'this' in field's format (DATE), #2 "converts a constant
  item to an int and replaces the original item" -- consequently,
  this replaces the Item_string "2006-11-06 04:08:36.0" with the
  Item_int_with_ref 20061106.
  
  #0  Field_newdate::store (this=0x8d26880, from=0x8d5e658 "2006-11-06
  04:08:36.0", len=21, cs=0x88022c0) at field.cc:5344
  #1  0x0817e3b0 in Item_string::save_in_field (this=0x8d5e670, field=0x8d26880, no_conversions=true) at item.cc:4340
  #2  0x081b22ae in convert_constant_item (thd=0x8d25240, field=0x8d26880, item=0x8d5e74c) at item_cmpfunc.cc:245
  #3  0x081b8a36 in Item_bool_func2::fix_length_and_dec (this=0x8d5e6f8) at item_cmpfunc.cc:309
  #4  0x081a3427 in Item_func::fix_fields (this=0x8d5e6f8, thd=0x8d25240, ref=0x8d5f5fc) at item_func.cc:190
  #5  0x0825bc2d in setup_conds (thd=0x8d25240, tables=0x8d5e410, leaves=0x8d5e410, conds=0x8d5f5fc) at sql_base.cc:4941
  ...
  
  Disabling optimisation where it would be lossy so field value will
  properly get promoted and compared as binary string (rather than as
  integers).
2007-03-02 15:23:13 +01:00
unknown
06888e74fc Add hint about using --help to see what options are available 2007-03-02 15:21:01 +01:00
unknown
2464f10826 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26537-5.0-opt
2007-03-02 16:18:00 +02:00
unknown
35c841fb82 Merge trift2.:/MySQL/M41/manpages-4.1
into  trift2.:/MySQL/M50/manpages-5.0


support-files/mysql.spec.sh:
  Null-merge, the equivalent fix here is a change of its own.
2007-03-02 14:20:43 +01:00
unknown
00179853d4 Merge trift2.:/MySQL/M40/manpages-4.0
into  trift2.:/MySQL/M41/manpages-4.1


support-files/mysql.spec.sh:
  Null-merge, the equivalent fix here is a change of its own (NDB).
2007-03-02 14:17:04 +01:00
unknown
9e290476f8 Add the man pages for NDB to the RPMs.
support-files/mysql.spec.sh:
  Add the man pages for NDB.
2007-03-02 14:08:32 +01:00
unknown
622533fa81 Add the man pages for NDB to the RPMs.
support-files/mysql.spec.sh:
  Add the man pages for NDB.
2007-03-02 14:05:43 +01:00
unknown
d26369327e Add missing man pages to the RPMs.
support-files/mysql.spec.sh:
  Add missing man pages.
2007-03-02 14:03:28 +01:00
unknown
f7f5f00649 Freeze the number of conflicts. We should not introduce any more
conflicts without proper analysis and documentation of the nature of
the conflict.
2007-03-02 15:05:16 +03:00
unknown
b0e07932c6 Rename a macro to better reflect the action taken.
sql/sql_yacc.yy:
  Rename: YYERROR_UNLESS -> YYABORT_UNLESS
  yyerror doesn't have to abort of the parser, whereas this macro
  does explicitly call YYABORT.
2007-03-02 14:29:51 +03:00
unknown
d4272a16de after merge fix (bug #26038)
Item_func_geometry_from_text::val_str() should set null_value
in case of wrong data.


mysql-test/include/gis_generic.inc:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
mysql-test/r/archive_gis.result:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
mysql-test/r/gis.result:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
mysql-test/r/innodb_gis.result:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
mysql-test/r/ndb_gis.result:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
mysql-test/t/gis.test:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
sql/item_geofunc.cc:
  after merge fix
  
  Item_func_geometry_from_text::val_str() should set null_value
  in case of wrong data.
2007-03-02 15:09:44 +04:00
unknown
7fc2a2a765 Merge mysql.com:/home/ram/work/b23616/b23616.4.1
into  mysql.com:/home/ram/work/b23616/b23616.5.0


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
2007-03-02 15:09:20 +04:00
unknown
19948e8a7f sql_base.cc:
Post fix for bug#25122.


sql/sql_base.cc:
  Post fix for bug#25122.
2007-03-02 13:25:41 +03:00
unknown
399bf23c1d Bug #26537: item_unhex() was not expected
to return NULL for non-NULL arguments.
This is not the case as it can return NULL
for invalid hexidecimal strings.
Fixed by setting the maybe_null flag.


mysql-test/r/func_str.result:
  Bug #26537: test case
mysql-test/t/func_str.test:
  Bug #26537: test case
sql/item_strfunc.h:
  Bug #26537: item_unhex() can return NULLs
  even for guaranteed non-null arguments.
2007-03-02 12:14:50 +02:00
unknown
133e08af14 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-26093


sql/item_func.cc:
  Auto merged
2007-03-01 20:08:58 -07:00
unknown
bd6df52de7 Merge poseidon.mysql.com:/home/tomas/mysql-5.0
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb


ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
2007-03-02 09:38:03 +07:00
unknown
0a93be2869 Bug#26093 (SELECT BENCHMARK() for SELECT statements does not produce valid
results)

Before this fix, the function BENCHMARK() would fail to evaluate expressions
like "(select avg(a) from t1)" in debug builds (with an assert),
or would report a time of zero in non debug builds.

The root cause is that evaluation of DECIMAL_RESULT expressions was not
supported in Item_func_benchmark::val_int().

This has been fixed by this change.


mysql-test/r/func_misc.result:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
mysql-test/t/func_misc.test:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
sql/item_func.cc:
  Added support for DECIMAL_RESULT in Item_func_benchmark::val_int()
2007-03-01 19:20:47 -07:00
unknown
abc66a6f7f Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-02 09:10:17 +07:00
unknown
87c5e84f93 Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
(part 1)
- add signal data
- add ref in dict on create/drop table/index
2007-03-02 09:06:05 +07:00
unknown
1301de42c1 Bug #26720 Infinite loop on unknown signal in logging function
- terminate printing
2007-03-02 08:56:22 +07:00
unknown
10f632a1cb mysql.sln:
Correction of embedded build types


VC++Files/mysql.sln:
  Correction of embedded build types
2007-03-02 00:54:02 +01:00
unknown
fe3711254c mysql.sln:
Disabled build of all embedded server libraries, "libmysqld.ldd"
  "mysqldemb.lib" and "mysqlserver.lib"


VC++Files/mysql.sln:
  Disabled build of all embedded server libraries, "libmysqld.ldd"
  "mysqldemb.lib" and "mysqlserver.lib"
2007-03-01 23:48:22 +01:00
unknown
09d82a1a95 Manual merge of 5.0 into 5.0-runtime
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2007-03-01 15:10:14 -07:00
unknown
b72e3110da Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/25122-bug-5.0-opt-mysql


sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2007-03-02 00:10:25 +03:00
unknown
1437a9c532 Bug#25122: Views based on a self-joined table aren't insertable.
When INSERT is done over a view the table being inserted into is 
checked to be unique among all views tables. But if the view contains
self-joined table an error will be thrown even if all tables are used under
different aliases.

The unique_table() function now also checks tables' aliases when needed.


sql/mysql_priv.h:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated prototype of the unique_table() function.
sql/sql_base.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Now the unique_table() function checks tables' aliases when needed.
sql/sql_delete.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated calls to the unique_table() function.
sql/sql_insert.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated calls to the unique_table() function.
sql/sql_load.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated calls to the unique_table() function.
sql/sql_parse.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated calls to the unique_table() function.
sql/sql_update.cc:
  Bug#25122:  Views based on a self-joined table aren't insertable.
  Updated calls to the unique_table() function.
2007-03-02 00:09:22 +03:00
unknown
57b6c86411 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
server-tools/instance-manager/instance_options.cc:
  Auto merged
server-tools/instance-manager/mysqlmanager.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-03-01 14:06:57 -07:00
unknown
6e6fa326da After merge fixes 2007-03-01 20:59:08 +01:00
unknown
0e6a060c2d Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-03-01 19:10:07 +01:00
unknown
115a299ff3 Add two more USE_CYGWIN ifdefs to mysqltest 2007-03-01 19:09:43 +01:00
unknown
ec38bd7a32 Fix bug in mtr.pl where slave wes using same query log file as master 2007-03-01 18:31:09 +01:00
unknown
a01e8043de Don't set the "is_windows" flag if using cygwin 2007-03-01 18:30:29 +01:00
unknown
4a9edcc32c Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/ignore:
  auto-union
client/mysqltest.c:
  Auto merged
extra/comp_err.c:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
client/mysql_upgrade.c:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/ctype_cp932.result:
  Manual merge
mysql-test/r/mysqlbinlog.result:
  Manual merge
mysql-test/t/ctype_cp932.test:
  Manual merge
mysql-test/t/mysql.test:
  Manual merge
mysql-test/t/mysqlbinlog.test:
  Manual merge
2007-03-01 18:12:56 +01:00
unknown
a0684ef25f Correctly recognize Intel Core2Duo Extreme
in build.


BUILD/check-cpu:
  Correctly recognize Intel Core2Duo Extreme.
2007-03-01 15:28:10 +02:00
unknown
71d12e9f31 Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-4.1-runtime


sql/sql_parse.cc:
  Auto merged
2007-03-01 05:59:16 -07:00
unknown
38c26f4ac5 Merge bk-internal:/home/bk/mysql-4.1-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint


sql/mysqld.cc:
  Auto merged
2007-03-01 11:41:53 +01:00
unknown
b40ef082c8 MySQL versions before 5.0 still use cygwin, no need
to convert path
2007-03-01 11:41:29 +01:00
unknown
3616b5e3d5 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge


sql/field.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2007-03-01 11:37:28 +01:00
unknown
92e7cf1559 Merge quant.(none):/ext/mysql/bk/mysql-5.0-rpl-warnings
into  quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
2007-03-01 10:58:13 +01:00
unknown
a7ec72b21b Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-marvel
2007-03-01 10:47:30 +01:00
unknown
8fa0d1b98e Removing two more compilation warnings.
sql/slave.cc:
  Guard declaration of variable to avoid "unused variable" warning.
sql/sql_repl.cc:
  Guard declaration of variable to avoid "unused variable" warning.
2007-03-01 10:40:48 +01:00
unknown
33ccc75633 Fixed compiler warnings.
client/mysqltest.c:
  Fixed a compiler warning.
support-files/compiler_warnings.supp:
  Suppressed compiler warnings on Win 64.
2007-03-01 11:28:33 +02:00
unknown
c04d5985c1 Disabled compiler warnings.
sql/ha_archive.cc:
  Fixed a warning from unused computed value. This block is
  only used in debug mode and changes nothing.
support-files/compiler_warnings.supp:
  Disabled a warning from BDB.
2007-03-01 10:52:25 +02:00
unknown
30ece9b060 Fix for wrong replace command. 2007-03-01 12:26:07 +04:00
unknown
16e9e7ed4b Merge quant.(none):/ext/mysql/bk/mysql-5.0-bug25463
into  quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
2007-03-01 09:23:26 +01:00
unknown
6632872bbe Merge quant.(none):/ext/mysql/bk/mysql-5.0-rpl-warnings
into  quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
2007-03-01 09:21:32 +01:00
unknown
ef02cb6305 Renaming recenly added test case, because of name conflict
when merging into 5.1.


mysql-test/t/rpl_loaddata_charset.test:
  Rename: mysql-test/t/rpl_loaddata2.test -> mysql-test/t/rpl_loaddata_charset.test
mysql-test/r/rpl_loaddata_charset.result:
  Rename: mysql-test/r/rpl_loaddata2.result -> mysql-test/r/rpl_loaddata_charset.result
2007-03-01 11:52:25 +04:00
unknown
fdb1170eb1 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-rpl-warnings


sql/mysql_priv.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-03-01 08:47:49 +01:00
unknown
b3fafa40fc Fixes of compilation warnings and errors.
sql/mysql_priv.h:
  Removing compiler warning "NULL used in arithmetic"
sql/mysqld.cc:
  First argument to WARN_DEPRECATED is supposed to be a pointer (to THD structure)
sql/sql_insert.cc:
  Removing compiler warning "unused variable". Apparently query is not used when compiling libmysqld.
sql/sql_yacc.yy:
  Removing compiler error "Macro already defined"
2007-03-01 08:41:13 +01:00
unknown
d93c7f39f8 Additional fix for bug N 15126
Replacing local directory.


mysql-test/r/mysqlbinlog.result:
  Additional fix for bug N 15126
mysql-test/t/mysqlbinlog.test:
  Additional fix for bug N 15126
2007-03-01 11:23:12 +04:00
unknown
950e1dd12b Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
2007-03-01 08:37:16 +07:00