Commit graph

19863 commits

Author SHA1 Message Date
unknown
03ed0d1d24 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14186-bug-4.1-mysql


sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
2005-11-01 17:34:19 +03:00
unknown
fffe741705 Review of new pushed code
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
Mark that add_time(), time_diff() and str_to_date() can return null values


myisam/mi_check.c:
  keyoffset is not a position (no %lx here)
mysql-test/r/func_sapdb.result:
  Fixed test after marking that timediff() can return NULL
sql/item_func.cc:
  Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
sql/item_timefunc.cc:
  Mark that add_time and str_to_date() can return null values
sql/item_timefunc.h:
  Mark that time_diff can return 0
sql/spatial.cc:
  Simple cleanups during review of new code
2005-11-01 13:00:02 +02:00
unknown
cc953ed32a Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-4.1
2005-11-01 09:52:45 +04:00
unknown
b1a1b4815f Accept any shared library for "libz", not just the static one. Bug#6584 2005-10-31 18:35:26 +01:00
unknown
e86e844f3e Check for NULLs only if we don't replace column results,
get real results after all checks.
(see bug #14254: func_crypt.test fails on FreeBSD with --ps-protocol).


client/mysqltest.c:
  Check for NULLs only if we don't replace column results,
  get real results after all checks.
2005-10-31 16:28:45 +04:00
unknown
a006453fad Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.12839


sql/field.cc:
  Auto merged
2005-10-31 12:24:43 +04:00
unknown
b47f1efb25 Additional fix for #12839
sql/field.cc:
  This code still could work for VERY out-of-dated databases
sql/spatial.cc:
  small syntax fixes
2005-10-31 12:05:27 +04:00
unknown
3a5a518de4 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-28 18:52:10 -07:00
unknown
a6aff9ecf9 Merge mysql.com:/home/jimw/my/mysql-4.1-13811
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-28 18:43:52 -07:00
unknown
cb90e54ec1 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  krsna.patg.net:/home/patg/mysql-build/mysql-4.1
2005-10-28 18:23:23 -07:00
unknown
693320149f Merge mysql.com:/home/jimw/my/mysql-4.1-13796
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-28 18:19:19 -07:00
unknown
d5bb660640 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug14139
2005-10-28 21:42:01 +04:00
unknown
61e2ed9c01 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-10-28 17:50:06 +03:00
unknown
2d3b347c08 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/dev/mysql-4.1-10511
2005-10-28 17:25:26 +04:00
unknown
00a275e53c Fix BUG#10511: Wrong padding of UCS2 CHAR columns in
ON UPDATE CASCADE


innobase/row/row0ins.c:
  Patch from Marko is applied
2005-10-28 17:16:22 +04:00
unknown
a7ed6ce441 Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
that fields_list is a part of all_fields_list. Because select have only 
3 columns and analyse() redefines it to have 10 columns, int overrun in
setup_copy_fields() occurs and server goes to almost infinite loop.

Because fields_list used not only to send data ad fields types, it's wrong 
to allow procedure redefine it. This patch separates select's fileds_list 
and procedure's one. Now if procedure is present, copy of fields_list is 
created in procedure_fields_list and it is used for sending data and fields.


mysql-test/t/analyse.test:
  Test case for bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
mysql-test/r/analyse.result:
  Test case for bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
sql/sql_select.h:
  Fix bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
  To JOIN  Added separate fields_list for procedure.
sql/sql_select.cc:
  Fix bug #14138  ROLLUP and PROCEDURE ANALYSE() hang server
  SELECT's fields_list and procedure's fields_list made split. If procedure is defined
  then procedure's fields_list is used to send fields and data.
2005-10-28 15:24:46 +04:00
unknown
8cb789ab81 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1


include/config-netware.h:
  Auto merged
2005-10-28 14:04:06 +03:00
unknown
8db3252fa6 NetWare specific change to use a LibC API instead of a
kernel function to prevent CPU hogs.
2005-10-28 14:01:00 +03:00
unknown
6020281e95 Fix bug#14186 select datefield is null not updated
Date field was declared as not null, thus expression 'datefield is null'
was always false. For SELECT special handling of such cases is used. 
There 'datefield is null' converted to 'datefield eq "0000-00-00"'.

In mysql_update() before creation of select added remove_eq_conds() call.
It makes some optimization of conds and in particular performs conversion
from 'is null' to 'eq'. 
Also remove_eq_conds() makes some evaluation of conds and if it founds that
conds is always false then update statement is not processed further.
All this allows to perform some update statements process faster due to
optimized conds, and not wasting resources if conds known to be false. 


sql/sql_select.cc:
  Fix bug#14186  select datefield is null not updated
  Remove static from remove_eq_conds()
sql/sql_select.h:
   Fix bug#14186  select datefield is null not updated
  Added remove_eq_conds() prototype.
mysql-test/r/update.result:
  Test case for  bug#14186  select datefield is null not updated
mysql-test/t/update.test:
  Test case for  bug#14186  select datefield is null not updated
sql/sql_update.cc:
  Fix bug#14186  select datefield is null not updated
  To mysql_update() added call to remove_eq_conds() to optimize conds and convert 'datefield is null' to 'datefield eq 0000-00-00'
2005-10-28 01:24:11 +04:00
unknown
5e8515d9f2 Merge mysql.com:/home/jimw/my/mysql-4.1-14009
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/item_func.cc:
  Auto merged
2005-10-27 10:20:38 -07:00
unknown
987c33a975 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/13855-bug-4.1-mysql
2005-10-27 18:36:49 +04:00
unknown
fb94ffdaf5 select.result:
After merge fix


mysql-test/r/select.result:
  After merge fix
2005-10-27 18:36:11 +04:00
unknown
111b40e156 Manually merged
include/config-netware.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  Manually merged fix for bug#13855
mysql-test/t/select.test:
  Manuall merged fix for bug#13855
2005-10-27 17:44:28 +04:00
unknown
e28a02ecfb Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/alexi/dev/mysql-4.1-innobase
2005-10-27 17:27:07 +04:00
unknown
4cccc642e9 conf_to_src.c:
Dump MY_CS_CSSORT when it's necessary.


strings/conf_to_src.c:
  Dump MY_CS_CSSORT when it's necessary.
2005-10-27 17:40:21 +05:00
unknown
fed8b2082a conf_to_src.c:
Updating to conform the current CHARSET_INFO structure.


strings/conf_to_src.c:
  Updating to conform the current structure.
2005-10-27 16:48:49 +05:00
unknown
6ec1c061a8 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b13347
2005-10-27 13:41:09 +05:00
unknown
fff4e673fa Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  krsna.patg.net:/home/patg/mysql-build/mysql-4.1


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
2005-10-26 09:22:47 -07:00
unknown
d1d49ce14c Removed innobase/my_cnf, innobase/include/makefilewin.i,
and innobase/*/makefilewin (which are unused now).


BitKeeper/deleted/.del-makefilewin.i~5c8479dcb8a455b2:
  Delete: innobase/include/makefilewin.i
BitKeeper/deleted/.del-makefilewin~78000390c783b1c5:
  Delete: innobase/btr/makefilewin
BitKeeper/deleted/.del-makefilewin~2fc379bd4065c995:
  Delete: innobase/buf/makefilewin
BitKeeper/deleted/.del-makefilewin~d37b6b303348c871:
  Delete: innobase/data/makefilewin
BitKeeper/deleted/.del-makefilewin~5104767c73775697:
  Delete: innobase/dict/makefilewin
BitKeeper/deleted/.del-makefilewin~d90f35fdc3f2ee5f:
  Delete: innobase/dyn/makefilewin
BitKeeper/deleted/.del-makefilewin~c7b621c745e5de95:
  Delete: innobase/eval/makefilewin
BitKeeper/deleted/.del-makefilewin~4d139e182457e553:
  Delete: innobase/fil/makefilewin
BitKeeper/deleted/.del-makefilewin~d1a9d1f7d33fcb73:
  Delete: innobase/fsp/makefilewin
BitKeeper/deleted/.del-makefilewin~ef3a208fa0e9b0db:
  Delete: innobase/fut/makefilewin
BitKeeper/deleted/.del-makefilewin~f1e3b890aa1c9ea3:
  Delete: innobase/ha/makefilewin
BitKeeper/deleted/.del-makefilewin~1c53f31b88dd36e:
  Delete: innobase/ibuf/makefilewin
BitKeeper/deleted/.del-makefilewin~7a9d7d5a42bbfaf5:
  Delete: innobase/lock/makefilewin
BitKeeper/deleted/.del-makefilewin~b643e38d8da389ac:
  Delete: innobase/log/makefilewin
BitKeeper/deleted/.del-makefilewin~a40ea12eebdd6ef0:
  Delete: innobase/mach/makefilewin
BitKeeper/deleted/.del-makefilewin~1dbc058d76ebf1db:
  Delete: innobase/mem/makefilewin
BitKeeper/deleted/.del-makefilewin~6ba64863bce3d0b8:
  Delete: innobase/mtr/makefilewin
BitKeeper/deleted/.del-makefilewin~15e9e5c9e8fa870b:
  Delete: innobase/os/makefilewin
BitKeeper/deleted/.del-makefilewin~aeea7c82f21f7cf5:
  Delete: innobase/page/makefilewin
BitKeeper/deleted/.del-makefilewin~dea10ec1c94f7be:
  Delete: innobase/pars/makefilewin
BitKeeper/deleted/.del-makefilewin~608ed49dcd88e0f7:
  Delete: innobase/que/makefilewin
BitKeeper/deleted/.del-makefilewin~2e0407fe123f8365:
  Delete: innobase/read/makefilewin
BitKeeper/deleted/.del-makefilewin~fdda94ad32fa9e34:
  Delete: innobase/rem/makefilewin
BitKeeper/deleted/.del-makefilewin~dc4b8ad5ea53bd:
  Delete: innobase/row/makefilewin
BitKeeper/deleted/.del-makefilewin~63acd666293282a:
  Delete: innobase/srv/makefilewin
BitKeeper/deleted/.del-makefilewin~13888739357b3025:
  Delete: innobase/sync/makefilewin
BitKeeper/deleted/.del-makefilewin~c8273a47b90f52bb:
  Delete: innobase/thr/makefilewin
BitKeeper/deleted/.del-makefilewin~f4b7b99a887b7de:
  Delete: innobase/trx/makefilewin
BitKeeper/deleted/.del-makefilewin~72a64128bacce71b:
  Delete: innobase/usr/makefilewin
BitKeeper/deleted/.del-makefilewin~389ee2dcf79afb79:
  Delete: innobase/ut/makefilewin
BitKeeper/deleted/.del-makefilewin~14f24a4a173e2fcd:
  Delete: innobase/makefilewin
BitKeeper/deleted/.del-my_cnf~977f69858affc57b:
  Delete: innobase/my_cnf
innobase/include/Makefile.am:
  Removed ref to Makefilewin.i (it is unused now).
2005-10-26 20:06:08 +04:00
unknown
fe90e5677c Imported fix from 5.0. 2005-10-26 16:12:41 +03:00
unknown
dd1dc7def9 mysql-test-run.pl:
Added MTR_BUILD_THREAD to control the port range


mysql-test/mysql-test-run.pl:
  Added MTR_BUILD_THREAD to control the port range
2005-10-26 01:24:03 +02:00
unknown
8023bda59b Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-10-25 23:56:08 +02:00
unknown
a1d92b8a1b Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/Users/kent/mysql/bk/mysql-4.0
2005-10-25 23:52:18 +02:00
unknown
cf59103d84 BUG# 12123
Made change to mysqlimport to set character_set_database to binary to 
make importing various charsets/columns work correctly.


client/mysqlimport.c:
  BUG# 12123
  
  Added 'set @@character_set_database=binary' to make loading of tables with
  mixed charset types and non-latin characters load.
mysql-test/mysql-test-run.pl:
  BUG #12123
  
  Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/mysql-test-run.sh:
  BUG #12123
  
  Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/r/mysqldump.result:
  BUG #12123
  
  Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
  show that this fix handles dumping and reloading of non-latin1 charsets
  in table with different charset columns (mixing of charsets, also can be a
  UTF table with latin1 tables). Note the select before and after dump and 
  restore - should be exact.
mysql-test/t/mysqldump.test:
  BUG #12123
  
  Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
  show that this fix handles dumping and reloading of non-latin1 charsets
  in table with different charset columns (mixing of charsets, also can be a
  UTF table with latin1 tables). Note the select before and after dump and 
  restore - should be exact. (results of this)
2005-10-25 14:50:08 -07:00
unknown
115bf43602 BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space 
required for field_X in the new table.


mysql-test/r/create.result:
  Testcase for BUG#14139
mysql-test/t/create.test:
  Testcase for BUG#14139
sql/field.cc:
  BUG#14139: Make create_length_to_internal_length() save length-in-characters in 
  create_field::chars_length.
sql/field.h:
  BUG#14139: Add create_length::chars_length where we save length-in-characters, added comments.
sql/sql_table.cc:
  BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
  we get two instances of create_field: (1) is occurence of field_X in create list, and (2) is
  in select list. If we figure they both refer to the same field, we "join" them according to
  some rule that is not explicitly specified anywhere.
  When we do this "join", create_field::length already contains length-in-bytes for both, so
  when we transfer field length (in characters) from (1) to (2), use length-in-characters that
  we have saved in create_length::chars_length.
2005-10-26 00:56:17 +04:00
unknown
5a9dc44dac Merge mysql.com:/home/jimw/my/mysql-4.1-12925
into  mysql.com:/home/jimw/my/mysql-4.1-clean


tests/mysql_client_test.c:
  Auto merged
2005-10-25 10:11:47 -07:00
unknown
b5dc243e3d Fix incorrect casts in my_getopt code that capped the maximum of longlong
options to the wrong value. (Bug #12925)


mysql-test/t/mysql_client_test.test:
  Add parameter for testing getopt bug
mysys/my_getopt.c:
  Remove incorrect and unnecessary casts
tests/mysql_client_test.c:
  Add test case for Bug #12925 (my_getopt bug)
2005-10-25 10:10:53 -07:00
unknown
947de78a36 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/14016-bug-4.1-mysql
2005-10-25 20:37:45 +04:00
unknown
b96dbef6fd Fix bug #14016 date_format() 2nd parameter was compared using case insensitive
collation

By default constant strings in second parameter of date_time() have case
insensitive collation. Because of this expressions date_format(f,'%m') and 
date_format(f,'%M') wrongly becomes equal, which results in choosing wrong 
column to sort by.

Now if second parameter of date_format() is constant then it's collation is 
changed to case sensitive.


sql/item_timefunc.cc:
  Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
  If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/date_formats.result:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/date_formats.test:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
2005-10-25 20:37:26 +04:00
unknown
d58f2bdfd7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into moonbone.local:/work/13392-bug-4.1-mysql
2005-10-25 20:04:44 +04:00
unknown
45369edf57 Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE
VALUES() can only refer to table insert going to. 
But Item_insert_value::fix_fields() were passing to it's arg full table list,
This results in finding second column which shouldn't be found, and
failing with error about ambiguous field.

Item_insert_value::fix_fields() now passes only first table of full table
list.


sql/item.cc:
  Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
  If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/insert_select.result:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/insert_select.test:
  Test case for bug#14016 2nd parameter was compared using case insensitive collation
2005-10-25 20:04:12 +04:00
unknown
a345629ac6 Imported fixes from 4.1 and 5.0 to 4.0. 2005-10-25 16:56:25 +03:00
unknown
b4e8705bdc Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/mysql-4.1
2005-10-25 13:59:25 +02:00
unknown
cabb72f27f Bug#13347: empty result from query with like and cp1250 charset
ctype-win1250ch.c:
  Like range prefix tables were wrong.
ctype_cp1250_ch.result, ctype_cp1250_ch.test:
  Adding test case.


strings/ctype-win1250ch.c:
  Bug#13347: empty result from query with like and cp1250 charset
  Like range prefix tables were wrong.
mysql-test/t/ctype_cp1250_ch.test:
  Adding test case.
mysql-test/r/ctype_cp1250_ch.result:
  Adding test case.
2005-10-25 14:49:04 +05:00
unknown
6e49a48a25 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1


myisam/mi_check.c:
  Auto merged
2005-10-25 12:12:10 +03:00
unknown
b31dd53c85 Changed some dbug print options.
myisam/mi_check.c:
  Changed print style for keyoffset.
myisam/mi_delete.c:
  Changed print style for keypos.
2005-10-25 12:11:31 +03:00
unknown
133ea93bc4 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0-build-thread
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
2005-10-25 02:36:51 +02:00
unknown
2937201b88 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0-build-thread
into mysql.com:/Users/kent/mysql/bk/mysql-4.0
2005-10-25 02:29:08 +02:00
unknown
e17b176e9b Makefile.am:
Option to set environment variable MTR_BUILD_THREAD to a small
  number, from what mysql-test-run calculate port numbers that
  will not conflict with other runs with different thread num


Makefile.am:
  Option to set environment variable MTR_BUILD_THREAD to a small
  number, from what mysql-test-run calculate port numbers that
  will not conflict with other runs with different thread num
2005-10-25 02:27:55 +02:00
unknown
8d6634c9e0 Added more tests for new UPDATE ... ORDER BY ... LIMIT optimization
heap/_check.c:
  Change arguments to ha_key_cmp
heap/hp_create.c:
  Change arguments to ha_key_cmp
include/my_base.h:
  Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
myisam/mi_check.c:
  Change arguments to ha_key_cmp
myisam/mi_rnext_same.c:
  Change arguments to ha_key_cmp
myisam/mi_search.c:
  Change arguments to ha_key_cmp
myisam/mi_write.c:
  Change arguments to ha_key_cmp
myisammrg/myrg_queue.c:
  Change arguments to ha_key_cmp
mysys/my_handler.c:
  Remove SEARCH_RETURN_B_POS and instead always send an array to ha_key_cmp() as last argument
  (This removes an if in a loop at the expensive of an int on the stack)
sql/records.cc:
  Simplify new rr_index() code
  Create common error handling function for rr_() functions.
  Remove loop from rr_index() as handler::index_next() can never return HA_ERR_RECORD_DELETED
sql/sql_load.cc:
  Simplify
sql/sql_update.cc:
  Simplify code
  Fixed bug when one is updating an index column that could be used with ORDER BY
sql/structs.h:
  Removed not needed structure element
2005-10-25 02:27:40 +03:00