Commit graph

185 commits

Author SHA1 Message Date
unknown
579c926de0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt


BitKeeper/etc/gone:
  auto-union
mysys/my_getopt.c:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/select.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
2007-02-13 23:35:06 +01:00
unknown
56820e1cdc Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


Makefile.am:
  Auto merged
configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysys/default.c:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
2007-02-06 14:45:08 +01:00
unknown
c35ceeca9e Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
Ignoring error codes from type conversion allows default (wrong) values to
 go unnoticed in the formation of index search conditions.
 Fixed by correctly checking for conversion errors.


mysql-test/r/select.result:
  Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
   - test case
mysql-test/t/select.test:
  Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
   - test case
sql/field.h:
  Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
   - don't ignore coversion errors
sql/field_conv.cc:
  Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
   - don't ignore coversion errors
sql/item.cc:
  Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
   - don't ignore coversion errors
2007-02-06 11:08:57 +02:00
unknown
c15b2e4152 Fixed bug #25407.
The bug could cause choosing a sub-optimal execution plan for 
a single-table query if a unique index with many null keys were 
defined for the table. 
It happened because the code of the check_quick_keys function 
made an assumption that any key may occur in an unique index 
only once. Yet this is not true for keys with nulls that may 
have multiple occurrences in the index.


mysql-test/r/null_key.result:
  Fixed bug #25407
  Adjusted result after the fix.
mysql-test/r/select.result:
  Added a test case for bug #25407.
mysql-test/t/select.test:
  Added a test case for bug #25407.
2007-01-31 19:31:36 -08:00
unknown
ffe6fae3bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
scripts/mysqld_multi.sh:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-01-31 16:23:05 -05:00
unknown
acef88bee3 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/select.result:
  manual merge
mysql-test/r/view.result:
  manual merge
mysql-test/t/select.test:
  manual merge
2007-01-23 14:08:58 +04:00
unknown
39fb7b2423 Fix for bug #22026: Warning when using IF statement and large unsigned bigint
We use INT_RESULT type if all arguments are of type INT for 'if', 'case', 
'coalesce' functions regardless of arguments' unsigned flag, so sometimes we can
exceed the INT bounds.


mysql-test/r/select.result:
  Fix for bug #22026: Warning when using IF statement and large unsigned bigint
    - test result.
mysql-test/t/select.test:
  Fix for bug #22026: Warning when using IF statement and large unsigned bigint
    - test case.
sql/item_cmpfunc.cc:
  Fix for bug #22026: Warning when using IF statement and large unsigned bigint
    - take into account unsigned flags aggregating result types:                    
      return INT_RESULT only if two items with INT_RESULT type                      
      have equal unsigned_flags, otherwise return REAL_RESULT.
2007-01-22 14:52:23 +04:00
unknown
5effa05d3f Bug#25172: Not checked buffer size leads to a server crash.
After fix for bug#21798 JOIN stores the pointer to the buffer for sorting
fields. It is used while sorting for grouping and for ordering. If ORDER BY
clause has more elements then the GROUP BY clause then a memory overrun occurs.

Now the length of the ORDER BY list is always passed to the 
make_unireg_sortorder() function and it allocates buffer big enough to be
used for bigger list.


sql/sql_delete.cc:
  Bug#25172: Not checked buffer size leads to a server crash.
  Length parameter is initialized to 0 for the make_unireg_sortorder() function.
sql/sql_select.cc:
  Bug#25172: Not checked buffer size leads to a server crash.
  Now the length of the ORDER BY list is always passed to the 
  make_unireg_sortorder() function and it allocates buffer big enough to be
  used for bigger list.
sql/sql_table.cc:
  Bug#25172: Not checked buffer size leads to a server crash.
  Length parameter is initialized to 0 for the make_unireg_sortorder() function.
sql/sql_update.cc:
  Bug#25172: Not checked buffer size leads to a server crash.
  Length parameter is initialized to 0 for the make_unireg_sortorder() function.
mysql-test/r/select.result:
  Added a test case for bug#25172: Not checked buffer size leads to a server crash.
mysql-test/t/select.test:
  Added a test case for bug#25172: Not checked buffer size leads to a server crash.
2007-01-19 18:34:09 +03:00
unknown
fd534e03a6 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22533/my50-bug22533


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
2007-01-19 08:56:03 +04:00
unknown
50f32533f9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22533/my50-bug22533


mysql-test/r/type_bit.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
2007-01-18 17:10:00 +04:00
unknown
2ca87ae30c Merge mysql.com:/usr/home/ram/work/bug22533/my41-bug22533
into  mysql.com:/usr/home/ram/work/bug22533/my50-bug22533


mysql-test/r/select.result:
  resolve skipped
mysql-test/t/range.test:
  merging
mysql-test/t/select.test:
  merging
sql/item.cc:
  merging
2007-01-18 09:39:47 +04:00
unknown
5001bd06a7 Bug#6298 (LIMIT #, -1 no longer works to set start with no end limit)
With MySQL 3.23 and 4.0, the syntax 'LIMIT N, -1' is accepted, and returns
all the rows located after row N. This behavior, however, is not the
intended result, and defeats the purpose of LIMIT, which is to constrain
the size of a result set.

With MySQL 4.1 and later, this construct is correctly detected as a syntax
error.

This fix does not change the production code, and only adds a new test case
to improve test coverage in this area, to enforce in the test suite the
intended behavior.


mysql-test/r/select.result:
  Enforce that LIMIT N, -1 is illegal.
mysql-test/t/select.test:
  Enforce that LIMIT N, -1 is illegal.
2007-01-03 11:47:01 -07:00
unknown
0ce02f6d98 Fix for bug #22533: Traditional: Too-long bit value not rejected.
Problem: storing >=8 byte hexadecimal values we don't check data.
Fix: check if the data fits the {u}longlong range.


mysql-test/r/select.result:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - test result.
mysql-test/t/range.test:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - adjusted.
mysql-test/t/select.test:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - test case.
sql/item.cc:
  Fix for bug #22533: Traditional: Too-long bit value not rejected.
    - limit storing value to {U}LONGLONG_MAX in numeric context.
2006-12-06 16:32:12 +04:00
unknown
14decc4fbc Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)


BitKeeper/etc/ignore:
  added mysql-test/r/*.warnings
BUILD/SETUP.sh:
  Don't build with BDB as default
client/client_priv.h:
  Added OPT_DEBUG_INFO
client/mysqlbinlog.cc:
  Fixed compiler warning
client/mysqldump.c:
  Removed compiler warnings
  Added option --debug-info to detect memory leaks
  Fixed memory leak
  Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning
cmd-line-utils/readline/complete.c:
  Fixed compiler warning
cmd-line-utils/readline/display.c:
  Fixed compiler warning
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warning
cmd-line-utils/readline/input.c:
  Fixed compiler warning
cmd-line-utils/readline/isearch.c:
  Fixed compiler warning
cmd-line-utils/readline/kill.c:
  Fixed compiler warning
cmd-line-utils/readline/macro.c:
  Fixed compiler warning
cmd-line-utils/readline/misc.c:
  Fixed compiler warning
cmd-line-utils/readline/nls.c:
  Fixed compiler warning
cmd-line-utils/readline/readline.c:
  Fixed compiler warning
cmd-line-utils/readline/rltty.c:
  Fixed compiler warning
cmd-line-utils/readline/search.c:
  Fixed compiler warning
cmd-line-utils/readline/terminal.c:
  Fixed compiler warning
cmd-line-utils/readline/text.c:
  Fixed compiler warning
cmd-line-utils/readline/tilde.c:
  Fixed compiler warning
cmd-line-utils/readline/undo.c:
  Fixed compiler warning
cmd-line-utils/readline/util.c:
  Fixed compiler warning
cmd-line-utils/readline/vi_mode.c:
  Fixed compiler warning
dbug/dbug_analyze.c:
  Fixed compiler warning
extra/yassl/src/ssl.cpp:
  Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp:
  Fixed compiler warning
heap/_check.c:
  Fixed compiler warning
heap/hp_delete.c:
  Fixed compiler warning
heap/hp_hash.c:
  Fixed compiler warning
heap/hp_open.c:
  Fixed compiler warning
heap/hp_rkey.c:
  Fixed compiler warning
heap/hp_rrnd.c:
  Fixed compiler warning
heap/hp_write.c:
  Fixed compiler warning
libmysql/libmysql.c:
  Fixed compiler warning
libmysqld/libmysqld.c:
  Fixed compiler warning
myisam/mi_close.c:
  Fixed compiler warning
myisam/mi_delete.c:
  Fixed compiler warning
myisam/mi_dynrec.c:
  Fixed compiler warning
myisam/mi_keycache.c:
  Fixed compiler warning
myisam/mi_page.c:
  Fixed compiler warning
myisam/mi_statrec.c:
  Fixed compiler warning
myisam/mi_test2.c:
  Fixed compiler warning
myisam/mi_write.c:
  Fixed compiler warning
myisam/myisampack.c:
  Fixed compiler warning
myisammrg/myrg_extra.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  Remove .reject, .progress, .log and .warnings flag at start
  cluster -> mysql database (for 5.1)
mysql-test/include/federated.inc:
  Remove mysqltest warnings
mysql-test/include/sp-vars.inc:
  Remove mysqltest warnings
mysql-test/mysql-test-run.sh:
  Fix so that 'make test' works again
  Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result:
  Drop used tables at startup
mysql-test/t/create.test:
  Remove mysqltest warnings
mysql-test/t/csv.test:
  Remove mysqltest warnings
mysql-test/t/ctype_collate.test:
  Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test:
  Drop used tables at startup
mysql-test/t/ctype_ucs.test:
  Remove mysqltest warnings
mysql-test/t/func_sapdb.test:
  Remove mysqltest warnings
mysql-test/t/func_str.test:
  Remove mysqltest warnings
mysql-test/t/grant.test:
  Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test:
  Remove mysqltest warnings
mysql-test/t/group_min_max.test:
  Remove mysqltest warnings
mysql-test/t/innodb.test:
  Remove mysqltest warnings
mysql-test/t/join.test:
  Remove mysqltest warnings
mysql-test/t/limit.test:
  Remove mysqltest warnings
mysql-test/t/null.test:
  Remove mysqltest warnings
mysql-test/t/select.test:
  Remove mysqltest warnings
mysql-test/t/sp-prelocking.test:
  Remove mysqltest warnings
mysql-test/t/strict.test:
  Remove mysqltest warnings
mysql-test/t/subselect.test:
  Remove mysqltest warnings
mysql-test/t/type_newdecimal.test:
  Remove mysqltest warnings
mysql-test/t/view_grant.test:
  Remove mysqltest warnings
mysys/default.c:
  Fixed compiler warning
mysys/hash.c:
  Fixed compiler warning
mysys/list.c:
  Fixed compiler warning
mysys/mf_iocache.c:
  Fixed compiler warning
mysys/mf_keycache.c:
  Fixed compiler warning
mysys/mf_keycaches.c:
  Fixed compiler warning
mysys/my_alloc.c:
  Fixed compiler warning
mysys/my_dup.c:
  Fixed compiler warning
mysys/my_fopen.c:
  Fixed compiler warning
mysys/my_fstream.c:
  Fixed compiler warning
mysys/my_getwd.c:
  Fixed compiler warning
mysys/my_handler.c:
  Fixed compiler warning
  Added missing enums in switch
mysys/my_lib.c:
  Fixed compiler warning
mysys/my_lread.c:
  Fixed compiler warning
mysys/my_lwrite.c:
  Fixed compiler warning
mysys/my_malloc.c:
  Fixed compiler warning
mysys/my_pread.c:
  Fixed compiler warning
mysys/my_read.c:
  Fixed compiler warning
mysys/my_realloc.c:
  Fixed compiler warning
mysys/my_seek.c:
  Fixed compiler warning
mysys/my_write.c:
  Fixed compiler warning
mysys/safemalloc.c:
  Fixed compiler warning
mysys/thr_lock.c:
  Fixed compiler warning
mysys/tree.c:
  Fixed compiler warning
mysys/typelib.c:
  Fixed compiler warning
ndb/include/logger/LogHandler.hpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in:
  Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp:
  Fixed compiler warning
ndb/include/util/OutputStream.hpp:
  Fixed compiler warning
ndb/include/util/SimpleProperties.hpp:
  Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp:
  remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Add missing enums
ndb/src/common/logger/LogHandler.cpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c:
  Fixed compiler warning
ndb/src/common/portlib/NdbThread.c:
  Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp:
  Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp:
  Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c:
  Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp:
  Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/Services.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp:
  Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Fixed compiler warning
ndb/tools/drop_index.cpp:
  Fixed compiler warning
ndb/tools/drop_tab.cpp:
  Fixed compiler warning
ndb/tools/ndb_config.cpp:
  Fixed compiler warning
regex/regexec.c:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warning
sql/Makefile.am:
  Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_federated.h:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/handler.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_subselect.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compiler warning
sql/net_serv.cc:
  Fixed compiler warning
sql/opt_range.cc:
  Fixed compiler warning
  Formated DBUG statements to be as rest of code
sql/slave.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_cache.cc:
  Fixed compiler warning
  Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
sql/sql_delete.cc:
  Fixed compiler warning
sql/sql_parse.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc:
  Fixed compiler warning
sql/sql_select.cc:
  Fixed compiler warning
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Fixed compiler warning
sql/strfunc.cc:
  Fixed compiler warning
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed compiler warning
sql/table.cc:
  Fixed compiler warning
sql/tztime.cc:
  Fixed compiler warning
sql/unireg.cc:
  Fixed compiler warning
strings/decimal.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
vio/viosocket.c:
  Fixed compiler warning
vio/viossl.c:
  Fixed compiler warning
vio/viosslfactories.c:
  Fixed compiler warning
2006-11-20 22:42:06 +02:00
unknown
711021a464 Merge rurik.mysql.com:/home/igor/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug19579


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
2006-10-17 10:07:29 -07:00
unknown
a2e0c419d3 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B22367-5.0-opt-merge


include/my_base.h:
  Auto merged
mysql-test/r/select.result:
  merge of 5.0-opt to 22367
mysql-test/t/select.test:
  merge of 5.0-opt to 22367
2006-10-17 10:58:01 +03:00
unknown
6101fd25d0 Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.



mysql-test/r/select.result:
  Added a test case for bug #19579.
mysql-test/t/select.test:
  Added a test case for bug #19579.
sql/item_cmpfunc.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_base.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_lex.h:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Added a counter of between predicates.
sql/sql_select.cc:
  Fixed bug #19579: at range analysis optimizer did not take into 
  account predicates that become sargable after reading const tables.
  Now info of such potentially saragable predicates is saved in
  an array and after reading const tables we check whether this
  predicates has become saragable.
2006-10-16 14:25:28 -07:00
unknown
ffc1facce8 Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference
text or varchar columns with collation different than binary.
This was done to handle correctly the situation where a lookup on such a key
may return more than 1 row because of the presence of many rows that differ
only by the amount of trailing space in the table's string column.
Inserting such values however appears to violate the unique checks on 
INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer
from choosing a faster access method.
This fix removes the setting of the HA_END_SPACE_KEYS flag.


include/my_base.h:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - disabled HA_END_SPACE_KEY as it's no longer needed
mysql-test/r/func_str.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/r/merge.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/r/select.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - test case
mysql-test/r/subselect.result:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - fixed explain in an existing case
mysql-test/t/select.test:
  Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on 
               strings
   - test case
2006-10-16 18:09:58 +03:00
unknown
f66945aadb Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/select.result:
  Manual merge
mysql-test/t/select.test:
  Manual merge
2006-09-29 11:36:27 -07:00
unknown
af2ba777c3 Fixed bug #22753.
After the patch for big 21698 equality propagation stopped
working for BETWEEN and IN predicates with STRING arguments.
This changeset completes the solution of the above patch.


mysql-test/r/select.result:
  Added a test case for bug #22735.
mysql-test/t/select.test:
  Added a test case for bug #22735.
sql/item_cmpfunc.h:
  Fixed bug #22753.
  After the patch for big 21698 equality propagation stopped
  working for BETWEEN and IN predicates with STRING arguments.
  This changeset completes the solution of the above patch.
  
  Added an implementation of the subst_argument_checker method
  for Item_func_opt_neg (the direct ancestor of Item_func_between
  and Item_func_in) which allows equality propagation for
  BETWEEN and IN predicates.
2006-09-29 07:43:25 -07:00
unknown
4fd7172391 Fixed bug#20503: Server crash due to the ORDER clause not taken into account
while space allocation

Under some circumstances DISTINCT clause can be converted to grouping.
In such cases grouping is performed by all items in the select list.
If an ORDER clause is present then items from it is prepended to group list.
But the case with ORDER wasn't taken into account when allocating the
array for sum functions. This leads to memory corruption and crash.

The JOIN::alloc_func_list() function now allocates additional space if there
is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
possible.


mysql-test/t/select.test:
  Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
mysql-test/r/select.result:
  Added the test case for bug#20503: Server crash due to the ORDER clause not taken into account while space allocation
sql/sql_select.cc:
  Fixed bug#20503: Server crash due to the ORDER clause not taken into account
  while space allocation
  The JOIN::alloc_func_list() function now allocates additional space if there
  is an ORDER by clause is specified and DISTINCT -> GROUP BY optimization is
  possible.
2006-09-29 00:50:00 +04:00
unknown
f121994de8 Fixed bug #21390: wrong estimate of rows after elimination of
const tables. This resulted in choosing extremely inefficient
execution plans in same cases when distribution of data in
joined were skewed (see the customer test case for the bug).



mysql-test/r/select.result:
  Added a test case for bug #21390: wrong estimate of rows
  after elimination of const tables.
  Includded a test case that checks the code added by the patch
  that handles outer joins with no matches after substitution of
  a const table in an efficient way.
mysql-test/t/select.test:
  Added a test case for bug #21390: wrong estimate of rows
  after elimination of const tables.
  Included a test case that checks the code added by the patch
  that handles outer joins with no matches after substitution of
  a const table in an efficient way.
sql/sql_select.cc:
  Fixed bug #21390: wrong estimate of rows after elimination of
  const tables. This resulted in choosing extremely inefficient
  execution plans in same cases when distribution of data in
  joined were skewed (see the customer test case for the bug).
  Also added the code to handle outer joins with no matches after
  substitution of a const table in an efficient way. 
  Corrected calculation of the null rejecting key conditions.
2006-08-25 02:17:41 -07:00
unknown
08be4e96a9 Merge sunlight.local:/local_work/tmp_merge-4.1-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.0-opt-mysql


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/func_group.result:
  Manual merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/subselect.result:
  Manual merge
2006-07-29 23:59:53 +04:00
unknown
70d27b3503 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21019-4.1-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
mysql-test/t/select.test:
  SCCS merged
2006-07-26 18:49:26 +03:00
unknown
048fbb845d Merge macbook.gmz:/Users/kgeorge/mysql/work/B21019-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21019-5.0-opt


mysql-test/t/select.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
2006-07-26 17:31:34 +03:00
unknown
5ca1ee5eea Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
 united into a single condition on the key and checked together the server must 
 check which value is the NULL value in a correct way : not only using ->is_null 
 but also check if the expression doesn't depend on any tables referenced in the 
 current statement. 
 This additional check must be performed because that optimization takes place 
 before the actual execution of the statement, so if the field was initialized 
 to NULL from a previous statement the optimization would be applied incorrectly.


mysql-test/r/select.result:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case
mysql-test/t/select.test:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - test case. 
     Note that ALTER TABLE is important here : it happens to
     leave the Field instance for t1.b set to NULL, witch is vital for
     demonstrating the problem fixed by this changeset.
sql/sql_select.cc:
  Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
   - check whether a value is null taking into account its table dependency.
2006-07-26 13:32:28 +03:00
unknown
585b5bbc92 Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
The problem was in that opt_sum_query() replaced MIN/MAX functions
with the corresponding constant found in a key, but due to imprecise
representation of float numbers, when evaluating the where clause,
this comparison failed.

When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.

As a side-effect this fix also corrects an unnoticed problem in
bug 12882.


mysql-test/r/func_group.result:
  BUG#20954 - test result adjustment.
  Adjusted the test result of bug 12882 which was not preperly fixed.
  The current patch corrects the problem that was fully corrected by the
  patch for 12882.
  
  The problem was that opt_sum_query() indicated that the optimizer may
  remove all tables because all MIN/MAX/COUNT functions are constants,
  but this lead to an empty result instead of NULL because the WHERE
  clause was still evaluated.
  
  The current fix removes all conjuncts in the where clause that
  reference the removed tables, and thus corrects the problem.
mysql-test/r/select.result:
  BUG#20954 - added test
mysql-test/r/subselect.result:
  BUG#20954 - test result adjustment.
  
  The fix removes those conditions in a where clause that refer to
  tables optimized away by MIN/MAX optimization (opt_sum_query()).
mysql-test/t/select.test:
  BUG#20954 - added test
sql/sql_select.cc:
  Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
  
  When MIN/MAX optimization detects that all tables can be removed,
  also remove all conjuncts in a where clause that refer to these
  tables. As a result of this fix, these conditions are not evaluated
  twice, and in the case of float number comparisons we do not discard
  result rows due to imprecise float representation.
  
  As a side-effect this fix also corrects an unnoticed problem in
  bug 12882.
2006-07-26 01:11:19 +03:00
unknown
14d72663f1 select.result, select.test:
Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.


mysql-test/t/select.test:
  Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
mysql-test/r/select.result:
  Test case for bug#10977 altered to make it work in both plain and ps-protocol modes.
2006-07-17 16:12:42 +04:00
unknown
1c96f2d73e Fixed bug#10977: No warning issued if a column name is truncated
When an alias is set to a column leading spaces are removed from the alias.
But when this is done on aliases set by user this can lead to confusion.

Now Item::set_name() method issues the warning if leading spaces were removed
from an alias set by user.

New warning message is added.


mysql-test/t/select.test:
  Added test case for bug#10977:No warning issued if a column name is truncated.
mysql-test/r/select.result:
  Added test case for bug#10977:No warning issued if a column name is truncated.
sql/sql_yacc.yy:
  Fixed bug#10977: No warning issued if a column name is truncated
  The is_autogenerated_name flag is set before set_name() method call.
sql/item.cc:
  Fixed bug#10977: No warning issued if a column name is truncated
  Now Item::set_name() method issues the warning if leading spaces were removed
  from an alias set by user.
2006-07-16 00:45:38 +04:00
unknown
8e354677a8 Bug #20569 Garbage in DECIMAL results from some mathematical functions
Adding decimal "digits" in multiplication resulted in signed overflow and
producing wrong results.

  Fixed by using large enough buffers and intermediary result types :
dec2 (currently longlong) to hold result of adding decimal "digits" 
(currently int32). 


mysql-test/r/select.result:
  Bug #20569 Garbage in DECIMAL results from some mathematical functions
    * test suite for the bug
mysql-test/t/select.test:
  Bug #20569 Garbage in DECIMAL results from some mathematical functions
    * test suite for the bug
strings/decimal.c:
  Bug #20569 Garbage in DECIMAL results from some mathematical functions
    * fixed the overflow in adding decimal "digits"
2006-07-06 13:18:05 +03:00
unknown
406a7ba992 field.cc, field.h:
Additional fix for #16377 for bigendian platforms
sql_select.cc, select.result, select.test:
  After merge fix


mysql-test/t/select.test:
  After merge fix
mysql-test/r/select.result:
  After merge fix
sql/sql_select.cc:
  After merge fix
sql/field.h:
  Additional fix for #16377 for bigendian platforms
sql/field.cc:
  Additional fix for #16377 for bigendian platforms
2006-06-21 01:14:53 +04:00
unknown
b6a416ff26 Manually merged
mysql-test/t/select.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2006-06-20 23:22:51 +04:00
unknown
3e7d68b11c select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.  
select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal


sql/item_cmpfunc.cc:
  Cleanup after fix for bug#18360 removal
mysql-test/t/select.test:
  Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/r/select.result:
  Added test case for bug#18759 Incorrect string to numeric conversion.
2006-06-20 23:05:55 +04:00
unknown
d0f39b6aeb Manually merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
2006-06-17 02:11:12 +04:00
unknown
de292d6799 Manually merged
configure.in:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-17 00:58:36 +04:00
unknown
89ce81ceed Bug #18895: BIT values cause joins to fail
The Field::eq() considered instances of Field_bit that differ only in 
bit_ptr/bit_ofs equal. This caused equality conditions optimization 
(build_equal_items_for_cond()) to make bad field substitutions that result
in wrong predicates. 
Field_bit requires an overloaded eq() function that checks the bit_ptr/bit_ofs
in addition to Field::eq().


mysql-test/r/select.result:
  Bug #18895: BIT values cause joins to fail
  
  - test case
mysql-test/t/select.test:
  Bug #18895: BIT values cause joins to fail
  
  - test case
sql/field.h:
  Bug #18895: BIT values cause joins to fail
  
  - eq() method overloaded for Field_bit
2006-06-14 15:57:23 +03:00
unknown
cbbd0fdb2c Removed duplicate tests from select.test 2006-06-02 18:02:22 +03:00
unknown
b05628d21b Merge mysql.com:/home/kgeorge/mysql/4.1/B4981
into  mysql.com:/home/kgeorge/mysql/5.0/B4981


mysql-test/t/select.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
mysql-test/r/select.result:
  merged
2006-06-02 15:35:40 +03:00
unknown
3390eaa085 Bug #4981: 4.x and 5.x produce non-optimal execution path,
3.23 regression test failure

The member SEL_ARG::min_flag was not initialized, 
due to which the condition for no GEOM_FLAG in function 
key_or did not choose "Range checked for each record" as 
the correct access method.


mysql-test/r/select.result:
  testcase for 'Range checked' access method
mysql-test/t/select.test:
  testcase for 'Range checked' access method
sql/opt_range.cc:
  All of the class members initialized
2006-06-02 12:04:03 +03:00
unknown
eb51f9e0d1 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


BitKeeper/deleted/.del-errmsg.txt~31abf77f9e7b9211:
  Auto merged
BitKeeper/deleted/.del-sql_state.h~4307ea5f1fe99019:
  Auto merged
mysql-test/r/explain.result:
  Auto merged
mysql-test/r/key_cache.result:
  Auto merged
mysql-test/r/preload.result:
  Auto merged
mysql-test/t/explain.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/sql_base.cc:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~11edc4db89248c16:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~184eb1f09242dc72:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~2cdeb8d6f80eba72:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~587903f9311db2d1:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~606dfaeb9e81aa4e:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~6bbd9eac7f0e6b89:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~7397c423c52c6d2c:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~898865062c970766:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~8ed1999cbd481dc4:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~94a93cc742fca24d:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~9dab24f7fb11b1e1:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~b44a85a177954da0:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~b6181e29d8282b06:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~ba132dc9bc936c8a:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~e2609fdf7870795:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~e3183b99fbba0a9c:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~eeb2c47537ed9c23:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~ef28b592c7591b7:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~ef53c33ac0ff8a84:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~f19bfd5d4c918964:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
  Manual merge
BitKeeper/deleted/.del-errmsg.txt~ffe4a0c9e3206150:
  Manual merge
BitKeeper/deleted/.del-mysqld_error.h~9dac75782467aab7:
  Manual merge
2006-05-31 18:10:02 -07:00
unknown
a2993441ab Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.


mysql-test/r/select.result:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
mysql-test/t/select.test:
  Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
  refers to a column name.
  Added a new test case.
sql/share/czech/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/danish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/dutch/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/english/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/estonian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/french/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/german/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/greek/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/hungarian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/italian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/japanese-sjis/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.\
sql/share/japanese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/korean/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian-ny/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/norwegian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/polish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/portuguese/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/romanian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/russian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/serbian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/slovak/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/spanish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/swedish/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
sql/share/ukrainian/errmsg.txt:
  Removed error message ER_INDEX_DOES_NOT_EXIST,
  used ER_KEY_DOES_NOT_EXITS instead.
2006-05-30 00:08:58 -07:00
unknown
42104b2efd Fixed bug #17873: confusing error message when IGNORE/USE/FORCE INDEX
refers to a column name.
Added a new error message ER_INDEX_DOES_NOT_EXIST.


include/mysqld_error.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
include/sql_state.h:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/explain.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/key_cache.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/preload.result:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/r/select.result:
  Added a test case for bug #17873.
mysql-test/t/explain.test:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
mysql-test/t/select.test:
  Added a test case for bug #17873.
sql/share/czech/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/danish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/dutch/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/english/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/estonian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/french/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/german/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/greek/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/hungarian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/italian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese-sjis/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/japanese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/korean/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian-ny/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/norwegian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/polish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/portuguese/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/romanian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/russian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/serbian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/slovak/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/spanish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/swedish/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
sql/share/ukrainian/errmsg.txt:
  Fixed bug #17873.
  Added a new error message ER_INDEX_DOES_NOT_EXIST.
2006-05-27 23:57:33 -07:00
unknown
5c6d923f30 Added a test case for bug #18940:in 5.0 the optimizer chose
a worse execution plan than in 4.1 for some queries.
It happened due the fact that at some conditions the 
optimizer always preferred range or full index scan access
methods to lookup access methods even when the latter were much
cheaper. 
The problem was not observed in 4.1 for the reported query
because the WHERE condition was not of a form that could
cause the problem.
Equality propagation introduced on 5.0 added an extra 
predicate and changed the WHERE condition. The new condition
provoked the optimizer to make a bad choice.

The problem was fixed by the patch for bug 17379.


mysql-test/r/select.result:
  Added a test case for bug #18940.
  The problem was fixed by the patch for bug 17379.
mysql-test/t/select.test:
  Added a test case for bug #18940.
  The problem was fixed by the patch for bug 17379.
2006-05-11 19:47:00 -07:00
unknown
3fa6432b09 BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as
E(#rows(ref[_or_null](const) access) only when it is appropriate.
[This is the final cumulative patch]


mysql-test/r/select.result:
  BUG#17379: Testcase
mysql-test/r/subselect.result:
  BUG#17379: Updated test results
mysql-test/t/select.test:
  BUG#17379: Testcase
sql/opt_range.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
sql/sql_select.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Re-work best_access_path() to reuse E(#rows(range access)) as
  E(#rows(ref[_or_null](const) access) only when it is appropriate.
sql/table.h:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
2006-05-10 17:40:20 +04:00
unknown
231f4964ad Added test case for Bug#18712: Truncation problem. The test
is only to make sure that this will not be fixed, as it is
intended behaviour. Documentation will be improved accordingly.
2006-05-04 17:05:21 +03:00
unknown
5ef6e903a4 Fixed bug #16504.
Multiple equalities were not adjusted after reading constant tables.
It resulted in neglecting good index based methods that could be
used to access of other tables.


mysql-test/r/having.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/r/select.result:
  Added a test case for bug #16504.
mysql-test/r/subselect.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/r/varbinary.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/t/select.test:
  Added a test case for bug #16504.
sql/item.cc:
  Fixed bug #16504.
  An Item_equal object may contain only a constant member.
  It may happen after reading constant tables.
sql/item_cmpfunc.cc:
  Fixed bug #16504.
  Added method Item_equal::check_const that check appearance of new 
  constant items in a multiple equality.
sql/item_cmpfunc.h:
  Fixed bug #16504.
  Added method Item_equal::check_const that check appearance of new 
  constant items in a multiple equality.
sql/sql_select.cc:
  Fixed bug #16504.
  Adjusted multiple equalities after reading constant tables.
  Fixed a few typo in comments.
2006-03-31 21:26:17 -08:00
unknown
7eb0f577d8 Merge
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
mysql-test/t/select.test:
  SCCS merged
2006-01-13 16:27:38 +03:00
unknown
4e91470d29 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/15538-bug-5.0-mysql


mysql-test/r/select.result:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-01-13 14:30:20 +03:00
unknown
a8a4a22974 Merge
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
mysql-test/r/select.result:
  SCCS merged
mysql-test/t/select.test:
  SCCS merged
2006-01-13 12:13:50 +03:00
unknown
4e2e0c6d53 Fixed bug #15538: unchecked table absence caused server crash.
Absence of table in left part of LEFT/RIGHT join wasn't checked before
name resolution which resulted in NULL dereferencing and server crash.

Modified rules: 
"table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
JOIN_SYM table_ref"
NULL check is moved before push_new_name_resolution_context()


sql/sql_yacc.yy:
  Fixed bug #15538: unchecked table absence caused server crash.
  Modified rules:
  "table_ref LEFT opt_outer JOIN_SYM table_ref" and "table_ref RIGHT opt_outer 
  JOIN_SYM table_ref"
  NULL check is moved before push_new_name_resolution_context()
mysql-test/r/select.result:
  Added test case for bug #15538: unchecked table absence caused server crash.
mysql-test/t/select.test:
  Added test case for bug #15538: unchecked table absence caused server crash.
2006-01-11 23:39:09 +03:00