Commit graph

36547 commits

Author SHA1 Message Date
unknown
c73e0cfb60 Merge pilot.(none):/data/msvensson/mysql/bug28373/my50-bug28373
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint


mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
2007-06-01 15:43:04 +02:00
unknown
7816d02ef7 Merge pilot.(none):/data/msvensson/mysql/mysql-4.1-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-06-01 15:18:46 +02:00
unknown
0bf2d59fcf Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-06-01 14:53:58 +02:00
unknown
861b193ea1 Merge pilot.(none):/data/msvensson/mysql/bug28497/my50-bug28497
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-06-01 14:35:47 +02:00
unknown
9f1998b1a5 Merge pilot.(none):/data/msvensson/mysql/bug28497/my41-bug28497-query_get_value
into  pilot.(none):/data/msvensson/mysql/mysql-4.1-maint
2007-06-01 14:35:30 +02:00
unknown
3b74591e36 Add missing semicolon after connect command 2007-06-01 13:39:54 +02:00
unknown
4e2283f4ba Turn query_logging back on to avoid sideeffects in folloing test section 2007-06-01 12:38:41 +02:00
unknown
2fdaa5931d Merge pilot.(none):/data/msvensson/mysql/bug28497/my41-bug28497-query_get_value
into  pilot.(none):/data/msvensson/mysql/bug28497/my50-bug28497


client/mysqltest.c:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
2007-06-01 12:04:05 +02:00
unknown
5b0e66a752 Bug#28497 wait_for_slave_to_stop can cause random replication mysql-test failures
- Add funtion "query_get_value to allow reading a fields value
   into a $variable


client/mysqltest.c:
  - Add function "let $var= query_get_value(<query>,<colname>,<row>)"
    making it possible to read a value from a specific field in a query 
    into a $variable.
mysql-test/r/mysqltest.result:
  Add test cases for "query_get_value"
mysql-test/t/mysqltest.test:
  Add test cases for "query_get_value"
2007-06-01 12:01:42 +02:00
unknown
7ff06317a4 Bug#28373 mysqltest test case fails with binlog disabled
- Update tests to be independent how the mysqld was started


mysql-test/r/mysqltest.result:
  Update result file
mysql-test/t/mysqltest.test:
  The purpose of these three test is to check that "sync_with_master"
  detects illegal parameters, the parameter checking is done before
  sending any command to the server and the "save_master_pos" can be
  removed in two cases to make the tests independent of mysqld.
  The thirs test is removed since it's a syntax check that is done
  after the command has been executed and is done for all comands in
  mysqltest - it's tested elsewhere and is not specific to "sync_with_master"
2007-05-31 15:58:22 +02:00
unknown
b8587557b1 Merge polly.local:/home/kaa/src/maint/bug27643/my50-bug27643
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/sql_select.cc:
  Auto merged
2007-05-31 15:01:49 +04:00
unknown
f18a10c6c1 Fix for bug #27643 "query failed : 1114 (The table '' is full)
Problem:

HASH indexes on VARCHAR columns with binary collations did not ignore trailing spaces from strings before comparisons. This could result in duplicate records being successfully inserted into a MEMORY table with unique key constraints.

As a direct consequence of the above, internal MEMORY tables used for GROUP BY calculation in testcases for bug #27643 contained duplicate rows which resulted in duplicate key errors when converting those temporary tables to MyISAM. Additionally, that error was incorrectly converted to the 'table is full' error.

Solution:

- ignore trailing spaces in VARCHAR fields with binary collations when calculating hashes.
- return a proper error from create_myisam_from_heap() when conversion fails.


mysql-test/r/ctype_ucs2_def.result:
  Added a testcase for bug #27643.
mysql-test/r/heap_hash.result:
  Added a testcase for bug #27643.
mysql-test/t/ctype_ucs2_def.test:
  Added a testcase for bug #27643.
mysql-test/t/heap_hash.test:
  Added a testcase for bug #27643.
sql/sql_select.cc:
  Return an appropriate error instead of 'table is full' when conversion from MEMORY to MyISAM fails.
strings/ctype-bin.c:
  Added my_hash_sort_8bit_bin() which ignores trailing spaces when calculating hashes, and is now used for VARCHAR columns instead of my_hash_sort_bin().
strings/ctype-mb.c:
  Ignore trailing spaces when calculating a string hash in my_hash_sort_mb_bin().
strings/ctype-ucs2.c:
  Ignore trailing spaces when calculating a string hash in my_hash_sort_ucs2_bin().
2007-05-31 14:54:44 +04:00
unknown
63dbf6f482 Merge polly.local:/home/kaa/src/maint/bug28121/my50-bug28121
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


strings/strtod.c:
  Auto merged
2007-05-31 12:27:12 +04:00
unknown
3242007b78 mysqldump.c:
Fix harmless typo (caught thanks to warning)


client/mysqldump.c:
  Fix harmless typo (caught thanks to warning)
2007-05-31 00:40:56 +02:00
unknown
7d06ed8281 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50


strings/strtod.c:
  Auto merged
2007-05-30 23:46:21 +02:00
unknown
6505b8fc0a Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/41
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/41
2007-05-30 23:45:34 +02:00
unknown
1835c8bf80 Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into  damien-katzs-computer.local:/Users/dkatz/50_dump
2007-05-30 16:42:18 -04:00
unknown
9dc7a7b834 Got rid of log_01[], because we don't really need it. Division and log_10[] can always be used instead, which is also a more precise way.
This is for bug #28121.


include/m_string.h:
  Got rid of log_01[], because we don't really need it.
sql/item_cmpfunc.cc:
  Got rid of log_01[], because we don't really need it.
strings/strtod.c:
  Got rid of log_01[], because we don't really need it.
2007-05-30 22:47:52 +04:00
unknown
6e1130fba2 Merge polly.local:/home/kaa/src/maint/bug24611/my50-bug24611
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/mysqld.cc:
  Auto merged
2007-05-29 17:16:23 +04:00
unknown
d1c608c574 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-maint
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-05-29 16:47:17 +04:00
unknown
07c7cf1288 Moved size_of() from Field_double to Field_real in order to properly clone Field_float and Field_double. This is to fix PushBuild failures introduced by the patch for bug #28121.
sql/field.h:
  Moved size_of() from Field_double to Field_real in order to properly clone Field_float and Field_double.
2007-05-29 16:35:55 +04:00
unknown
4507f7ed4c Merge pilot.(none):/data/msvensson/mysql/bug26397/my41-bug26397
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Auto merged
2007-05-29 13:01:23 +02:00
unknown
116b14313d Merge pilot.(none):/data/msvensson/mysql/bug27597/my50-bug27597
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-05-29 12:53:23 +02:00
unknown
eab7e4d4e4 Don't use log_01[] in my_strtod() to avoid loss of precision.
This is for bug #28121.


strings/strtod.c:
  Don't use log_01[] in my_strtod() to avoid loss of precision.
2007-05-28 21:43:31 +04:00
unknown
11c409518b Bug #26397 mysql-test-run.pl --start-dirty removes binary logs
- Don't delete anything if starting dirty


mysql-test/mysql-test-run.pl:
  Don't delete anything if starting dirty
2007-05-28 18:03:24 +02:00
unknown
088cb9ddc4 Some Windows-related fixes to make Microsoft compilers happy. This is for bug #28128.
include/m_string.h:
  Reduced the number of elements in log_10[] and log_01[] to not exceed DBL_MAX.
sql/field.cc:
  Avoid the warning on Windows.
strings/strtod.c:
  Reduced the number of elements in log_10[] and log_01[] to not exceed DBL_MAX.
2007-05-28 15:33:22 +04:00
unknown
8358a0c7c7 Merge polly.local:/home/kaa/src/maint/bug28121/my50-bug28121
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
strings/strtod.c:
  Auto merged
2007-05-28 14:34:36 +04:00
unknown
e3af3c2127 Fix for bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
When storing a large number to a FLOAT or DOUBLE field with fixed length, it could be incorrectly truncated if the field's length was greater than 31.

This patch also does some code cleanups to be able to reuse code which is common between Field_float::store() and Field_double::store().


include/m_string.h:
  Added declarations for log_10 and log_01 from strtod.c
mysql-test/r/type_float.result:
  Added the testcase for bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
mysql-test/t/type_float.test:
  Added the testcase for bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
sql/field.cc:
  Moved common code from Field_float::store() and Field_double:store() to Field_real::truncate()
  Fixed the algorithm to not truncate large input numbers if the field length is greater than 31.
  Fixed rounding to not depend on FLT_MAX/DBL_MAX constants.
sql/field.h:
  Moved not_fixed member from Field_double to Field_real to allow code reuse between Field_float::store() and Field_double::store()
  Added truncate() method to Field_real which is used by both Field_float and Field_double
sql/init.cc:
  log_10[] and log_01[] are now defined as statical arrays in strtod.c, no need to pre-computed them.
sql/item_cmpfunc.cc:
  log_01[] now starts from 1e0, not from 1e-1 for consistency.
sql/mysql_priv.h:
  Moved log_10[] and log_01[] from mysqld.cc to libmystrings.
sql/mysqld.cc:
  Moved log_10[] and log_01[] from mysqld.cc to libmystrings.
strings/strtod.c:
  Define and use log_10[] and log_01[] as static arrays of constants instead of values pre-computed at startup.
2007-05-28 12:44:59 +04:00
unknown
e010e1c240 Bug #24733 RESET MASTER run before dump with --delete-master-logs
fixed by using flush logs, dumping, then doing PURGE MASTER LOGS TO 'binfile', instead
of deleting the log files at the beginning.
  
  NOTE: previously the delete-master-logs  would reset the log names back to
filename.00001. Now the trailing number doesn't get reset. This may need to be
documented. 


client/mysqldump.c:
  changed the code the --delete-master-logs option is used from this:
      
      take locks
      delete bin logs
      do dump (if this is a lock-based dump)
      release locks
      do dump (if this is a consistent-read-dump)
      
   to this:
      
      take locks
      flush logs
      remember the name of the new log
      do dump (if this is a lock-based dump)
      release locks
      do dump (if this is a consistent-read-dump)
      fflush output sql file if specified, to ensure the backup is commited to disk
      --- yes, dump succeeded ---
      do PURGE MASTER LOGS TO up to the new log
2007-05-27 11:50:10 -04:00
unknown
36b183ee31 Fix for bug #24611 "mysqld crashes when connecting from remote host, and compiled from source".
On some Linux distributions with both LinuxThreads and NPTL glibc versions available, statically built binaries can crash, because linker defaults to LinuxThreads when linking statically, but calls to external libraries (like libnss) are resolved to NPTL versions.

Since there is nothing we can do in the code to work that around, just give user an advice on how to fix that, if a crash happened on such a binary/OS combination.


sql/mysqld.cc:
  Advise a user on possible solutions in case of a crash in a statically built binary on a system with both LinuxThreads and NPTL available.
2007-05-25 20:52:01 +04:00
unknown
de108e05f9 Bug#26664 test suite times out on OS X 64bit
- Add checks to make sure net has a vio assigned
 - For example bootstrap will create a fake "net" with vio
   set to 0 


sql/net_serv.cc:
  Add checks to make sure net has a vio assigned
2007-05-25 16:47:43 +02:00
unknown
d8f21a949a Bug #26664 test suite times out on OS X 64bit
- Make the two "my_net_set*" function only visible when included
   from my_global.h


include/mysql_com.h:
  Make the two "my_net_set*" functions only
  visible when included from my_global.h
2007-05-25 11:38:23 +02:00
unknown
26b4a7db2c Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b26842/b26842.5.0
2007-05-25 11:13:32 +05:00
unknown
180b8eed6a Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-24 22:26:49 +02:00
unknown
6c78927888 Merge pilot.blaudden:/home/msvensson/mysql/bug26664/my50-bug26664
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint


libmysql/libmysql.c:
  Auto merged
sql-common/client.c:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2007-05-24 20:51:37 +02:00
unknown
7be03ef01f Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b28464.new/b28464.new.5.0


sql/item.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item.cc:
  SCCS merged
2007-05-24 20:21:04 +05:00
unknown
3791e35f79 Fix for
bug #26842: master binary log contains invalid queries - replication fails
bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements

Problem:  
binlogging PS' we may produce syntacticly incorrect queries in the binlog replacing 
some parameters with variable names (instead of variable values).
E.g. in the reported case of "limit ?" clause: replacing "?" with "@var"
produces "limit @var" which is not a correct SQL syntax. 
Also it may lead to different query execution on slave if we
set and use a variable in the same statement, e.g.
"insert into t1 values (@x:=@x+1, ?)"

Fix: make the stored statement string created upon its execution use variable values
(instead of names) to fill placeholders.


mysql-test/r/ctype_cp932_binlog.result:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - result adjusted.
mysql-test/r/ctype_cp932_notembedded.result:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - result adjusted.
mysql-test/r/rpl_user_variables.result:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - test result.
mysql-test/t/ctype_cp932_binlog.test:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - test adjusted.
mysql-test/t/rpl_user_variables.test:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - test case.
sql/sql_prepare.cc:
  Fix for
  bug #26842: master binary log contains invalid queries - replication fails
  bug #12826: Possible to get inconsistent slave using SQL syntax Prepared Statements
    - set val to the variable's value (escaped if needed) then insert it into the query
      string in the position of the placeholder. We don't need to call
      get_var_with_binlog() here as there is no trace of the variable's name in the binlog.
2007-05-24 15:35:43 +05:00
unknown
e079e20499 Merge pilot.blaudden:/home/msvensson/mysql/bug27438/my50-bug27438
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-24 12:04:03 +02:00
unknown
945f3c2cc8 Bug#26664 test suite times out on OS X 64bit
- The "mysql client in mysqld"(which is used by
   replication and federated) should use alarms instead of setting
   socket timeout value if the rest of the server uses alarm. By
   always calling 'my_net_set_write_timeout'
   or 'my_net_set_read_timeout' when changing the timeout value(s), the
   selection whether to use alarms or timeouts will be handled by
   ifdef's in those two functions. 
 - Move declaration of 'vio_timeout' into "vio_priv.h"


include/mysql_com.h:
  Move the net_set_*_timeout function declarations to mysql_com.h and
  rename to my_net_set_*_timeout to avoid name clashes
include/violite.h:
  Move declaration of 'vio_timeout' to vio_priv.h (to make
  the function as private as possible)
libmysql/libmysql.c:
  Use my_net_read_timeout or my_net_write_timeout when setting
  the timeouts. Move the global variables for my_net_read/my_write_timeout
  into the only place where they are used. Thus removing them...
server-tools/instance-manager/mysql_connection.cc:
  Use my_net_read_timeout or my_net_write_timeout when setting the timeouts
sql-common/client.c:
  Use my_net_read_timeout or my_net_write_timeout when setting the timeouts
sql/mysql_priv.h:
  Move the net_set_*_timeout function declarations to mysql_com.h
sql/net_serv.cc:
  No need to cast the net->write_timeout value from "uint" to "uint"
sql/set_var.cc:
  Rename net_set_*_timeout to my_net_set_*_timeout
sql/sql_client.cc:
  Use my_net_read_timeout or my_net_write_timeout when setting the timeouts
sql/sql_parse.cc:
  Rename net_set_*_timeout to my_net_set_*_timeout
sql/sql_repl.cc:
  Rename net_set_*_timeout to my_net_set_*_timeout
vio/vio_priv.h:
  Move declaration of 'vio_timeout' to vio_priv.h
vio/viosocket.c:
  Cleanup 'vio_timeout'
   - Use "const void*" on POSIX and "const char*" on windows for
     setsockopt
   - Add DBUG_PRINT's
   - Add comment about why we don't have an implementation of
    vio_timeout for platforms not supporting SO_SNDTIMEO or SO_RCVTIMEO
2007-05-24 11:21:27 +02:00
unknown
0629727088 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-24 09:27:53 +02:00
unknown
6df02cf7d7 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


configure.in:
  Auto merged
include/my_global.h:
  Auto merged
sql/item_func.cc:
  Auto merged
strings/strtod.c:
  Auto merged
2007-05-24 09:22:00 +02:00
unknown
37f1e22247 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
2007-05-24 09:12:29 +02:00
unknown
06570d97d9 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b28509/b28509.5.0
2007-05-23 16:31:22 +05:00
unknown
ce473a575d Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/mysql-test-run.pl:
  Merge 4.1 -> 5.0
2007-05-23 12:20:11 +02:00
unknown
0930f20889 Merge bk-internal:/home/bk/mysql-4.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/mysql-test-run.pl:
  Auto merged
2007-05-23 12:15:25 +02:00
unknown
ba94666e32 Bug#27396 Wrong check for root priveledge
- Check that filemode was set to 0000


mysql-test/mysql-test-run.pl:
  Checking for "running as root" should also read the filemode to see it 
  was properly set to 0000
2007-05-23 12:13:49 +02:00
unknown
5e236f85c5 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.42
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build


configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
2007-05-23 10:49:26 +02:00
unknown
e6f1c2dd14 Merge mysql.com:/home/ram/work/mysql-5.0-maint
into  mysql.com:/home/ram/work/b28509/b28509.5.0


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-05-23 13:48:31 +05:00
unknown
351abe5a89 Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
2007-05-23 12:40:12 +05:00
unknown
adef673652 Merge mysql.com:/home/svoj/devel/bk/mysql-5.0
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
2007-05-23 12:39:33 +05:00