Commit graph

1580 commits

Author SHA1 Message Date
unknown
d4d8d132eb Merge mysql.com:/home/kent/bk/tmp/mysql-4.0
into  mysql.com:/home/kent/bk/tmp/mysql-4.1-build


include/Makefile.am:
  Auto merged
2007-03-12 13:15:11 +01:00
unknown
32b370bb7f Makefile.am, configure.in, mysys.dsp:
Removed unused files
.del-my_winsem.c:
  Delete: mysys/my_winsem.c
.del-my_semaphore.c:
  Delete: mysys/my_semaphore.c
.del-my_semaphore.h:
  Delete: include/my_semaphore.h


BitKeeper/deleted/.del-my_semaphore.c:
  Delete: mysys/my_semaphore.c
BitKeeper/deleted/.del-my_semaphore.h:
  Delete: include/my_semaphore.h
BitKeeper/deleted/.del-my_winsem.c:
  Delete: mysys/my_winsem.c
VC++Files/mysys/mysys.dsp:
  Removed unused files
configure.in:
  Removed unused files
include/Makefile.am:
  Removed unused files
mysys/Makefile.am:
  Removed unused files
2007-03-12 13:12:42 +01:00
unknown
6f21a5af6b include/config-win.h :
Companion change to this one
   ChangeSet@1.2206, 2007-01-22 02:32:07+02:00, jani@a88-113-38-195.elisa-laajakaista.fi +8 -0
     include/my_pthread.h@1.67, 2007-01-22 02:32:06+02:00, jani@a88-113-38-195.elisa-laajakaista.fi +31 -10
which renamed "sigset()" -> "my_sigset()" but forgot to do it for Windows ...


include/config-win.h:
  Companion change to this one
     ChangeSet@1.2206, 2007-01-22 02:32:07+02:00, jani@a88-113-38-195.elisa-laajakaista.fi +8 -0
       include/my_pthread.h@1.67, 2007-01-22 02:32:06+02:00, jani@a88-113-38-195.elisa-laajakaista.fi +31 -10
  which renamed "sigset()" -> "my_sigset()" but forgot to do it for Windows ...
2007-02-16 16:31:31 +01:00
unknown
5305cd7caf After merge fix 2007-02-02 10:01:44 +01:00
unknown
62fdcb54a7 Merge chilla.local:/home/mydev/mysql-4.0-axmrg
into  chilla.local:/home/mydev/mysql-4.1-axmrg


include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
include/thr_alarm.h:
  Auto merged
mysys/default.c:
  Auto merged
mysys/my_pthread.c:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
mysys/my_thr_init.c:
  Manual merged
sql/mysqld.cc:
  Manual merged
2007-02-01 08:09:36 +01:00
unknown
7be3cad45d Merge bk://localhost:5559
into  production.mysql.com:/usersnfs/jamppa/mysql-4.0


include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
mysys/default.c:
  Auto merged
mysys/my_pthread.c:
  Auto merged
mysys/my_thr_init.c:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-01-30 17:52:27 +01:00
unknown
cdf6001aeb Cleanup of thread-type (linuxthread or NTPL) detection code
Move get_thread_lib to mysys/my_pthread.c
Set 'thr_client_alarm' to signal number used by thr_alarm to give alarms


include/my_global.h:
  Fixed to be same as in 5.1
include/my_pthread.h:
  Move things around to be more in line with rest of code
mysys/default.c:
  Fixed two wrong pointer incrementations.
mysys/my_pthread.c:
  Cleanup: Use variable thr_client_alarm
mysys/my_thr_init.c:
  Detect thread library at startup.
  Set also thr_client_alarm signal here, so that we get
  it in init_signals() in mysqld
mysys/thr_alarm.c:
  Set thr_client_alarm depending on which thread library we are using
sql/mysqld.cc:
  Move get_thread_lib to mysys/my_pthread.c
2007-01-30 18:52:26 +02:00
unknown
2ec2fa6d08 Cleanup of thread-type (linuxthread or NTPL) detection code
Move get_thread_lib to mysys/my_pthread.c
Set 'thr_client_alarm' to signal number used by thr_alarm to give alarms



include/my_global.h:
  Fixed to be same as in 5.1
include/my_pthread.h:
  Move things around to be more in line with rest of code
include/thr_alarm.h:
  extern of thr_client_alarm
mysys/default.c:
  Fixed two wrong pointer incrementations.
mysys/my_pthread.c:
  Cleanup: Use variable thr_client_alarm
mysys/my_thr_init.c:
  Detect thread library at startup
mysys/thr_alarm.c:
  Set thr_client_alarm depending on which thread library we are using
sql/mysqld.cc:
  Move get_thread_lib to mysys/my_pthread.c
2007-01-25 20:10:31 +02:00
unknown
077840fa23 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-4.1


include/thr_alarm.h:
  Auto merged
mysys/my_pthread.c:
  Auto merged
BUILD/SETUP.sh:
  Merged from 4.0
configure.in:
  Merged from 4.0
include/my_global.h:
  Merged from 4.0
include/my_pthread.h:
  Merged from 4.0
mysys/thr_alarm.c:
  Merged from 4.0
sql/mysqld.cc:
  Merged from 4.0
BUILD/SETUP.sh.rej:
  Merged from 4.0
configure.in.rej:
  Merged from 4.0
include/my_global.h.rej:
  Merged from 4.0
include/my_pthread.h.rej:
  Merged from 4.0
mysys/thr_alarm.c.rej:
  Merged from 4.0
sql/mysqld.cc.rej:
  Merged from 4.0
2007-01-22 03:33:59 +02:00
unknown
454c763c6b Fix for configure to detect library correctly.
Fix to check library in use during runtime.
Fix for Bug#16995, "idle connections not being killed due to timeout when NPTL is used".


BUILD/SETUP.sh:
  To avoid warnings during compilation.
configure.in:
  Fixed configure so that it can correctly detect
  between NPTL and Linuxthreads.
include/my_global.h:
  Fix for Linuxthreads.
include/my_pthread.h:
  Added defines for different libraries that can be detected.
  Currently only 'other', 'nptl', and 'lt' (linuxthreads) are
  being used.
  
  changed sigset() and signal() to my_sigset() and my_signal()
include/thr_alarm.h:
  Removed defines for Linuxthreads. This is now detected during
  runtime and handled in the thr_alarm.c
mysys/my_pthread.c:
  Runtime check for library.
mysys/thr_alarm.c:
  Runtime checks for library and corresponding
  signals.
sql/mysqld.cc:
  Added function for detecting thread library in use
  during start-up.
  
  THR_KILL_SIGNAL removed, setting signals during runtime.
2007-01-22 02:32:07 +02:00
unknown
679402dab6 my_global.h:
Patch from Alfredo for TARGET_FAT_BINARY


include/my_global.h:
  Patch from Alfredo for TARGET_FAT_BINARY
2007-01-04 23:18:04 +01:00
unknown
befbebcfdb Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


client/mysqltest.c:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
2006-11-28 21:11:05 +01:00
unknown
87e3047501 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint


mysql-test/Makefile.am:
  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
sql/item_timefunc.cc:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge of changes for RPM
2006-11-24 12:12:25 +01:00
unknown
a3d041559d ABI fix
include/mysql_h.ic:
  this one should actually be removed from the ABI
2006-11-17 14:30:08 +04:00
unknown
17c238a15b Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1-mrg


include/mysql.h:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_class.h:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
mysql-test/t/mysql_client.test:
  merging
2006-11-16 20:44:37 +04:00
unknown
24ca44731d Remove the tmp file produced when checking abi 2006-11-13 13:32:39 +01:00
unknown
cb80733a89 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/t/rename.test:
  choose one of the race problem solutions. It was solved
  differently in -runtime and mainstream
2006-11-10 15:05:38 +03:00
unknown
434192fe54 Make --mem settable with environment variable MTR_MEM and make it possible to pass the directory to use. I.e --mem=<directory>
include/abi_check.ic:
  Ignore file
include/abi_check:
  Ignore file
2006-11-07 11:07:27 +01:00
unknown
6cf8ceebbf Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1-runtime
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2006-11-06 00:05:02 +03:00
unknown
e1a722b2d3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint


configure.in:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
myisam/sort.c:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/innodb_mysql.test:
  Manual merge.
mysys/mf_iocache.c:
  Manual merge.
2006-11-02 17:27:42 -05:00
unknown
8a7bc05288 Fix Bug #9191 "TIMESTAMP/from_unixtime() no longer accepts 2^31-1"
(4.1 version, with post-review fixes)
  
  The fix for another Bug (6439) limited FROM_UNIXTIME() to
  TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
  however unix timestamp in general is not considered to be limited 
  by this value. All dates up to power(2,31)-1 are valid.
  
  This patch extends allowed TIMESTAMP range so, that max
  TIMESTAMP value is power(2,31)-1. It also corrects
  FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
  max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
  is fixed accordingly to allow conversion of dates up to
  2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
  function to allow extended range of dates.
  
  The main problem solved in the patch is possible overflows
  of variables, used in broken-time representation to time_t
  conversion (required for UNIX_TIMESTAMP).


acinclude.m4:
  Add new macro to check time_t range
configure.in:
  Call the macro to check time_t range
include/my_time.h:
  Move time-related defines to proper place.
  Add a function to perform a rough check if
  a TIMESTAMP value fits into the boundaries.
  Note: it is defined as "static inline", as
  otherwise libmysql won't compile (due to the
  way how gcc handles "inline" directive).
mysql-test/r/func_time.result:
  Update test result
mysql-test/r/timezone.result:
  Update test result
mysql-test/r/timezone2.result:
  Update test result
mysql-test/t/func_time.test:
  Add test for Bug#9191 and update test to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone.test:
  Update old tests to be consistent
  with new TIMESTAMP boundaries
mysql-test/t/timezone2.test:
  Update tests for convert_tz to be consistent with new
  TIMESTAMP boundaries
sql/item_timefunc.cc:
  Fix convert_tz to allow dates from the new (extended)
  TIMESTAMP range
sql/mysql_priv.h:
  Move time handling defaults to my_time.h
sql-common/my_time.c:
  Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
  became possible. Here we make it safe against the overflows by stepping
  back from the boundary dates which are likely to trigger them.
sql/time.cc:
  Update TIME_to_timestamp to allow conversion of
  extended date range
sql/tztime.cc:
  Fix new (4.1) implementation of broken-down time representation
  to time_t conversion routine to avoid overflows during conversion
  of boundary dates
mysql-test/r/timezone4.result:
  New BitKeeper file ``mysql-test/r/timezone4.result''
mysql-test/t/timezone4-master.opt:
  New BitKeeper file ``mysql-test/t/timezone4-master.opt''
mysql-test/t/timezone4.test:
  New BitKeeper file ``mysql-test/t/timezone4.test''
2006-11-01 16:47:40 +03:00
unknown
928fa57a9e Update the rules for abi_check
include/Makefile.am:
  Move m_ctype.h from BUILT_SOURCES, it's in vcs
  Update the rule for abi_check
include/mysql_h.ic:
  Update the refernce and rename it to mysql_h.ic
2006-10-27 15:57:00 +02:00
unknown
9c9bf0aff2 WL#3462 Add testing of MySQL client ABI to prevent unintentional ABI breaks
BUG#23427 incompatible ABI change in 5.0.26?
   - Use the icheck tool if avaliable and compare the current mysql.h to a version
controlled reference file 


BitKeeper/etc/ignore:
  Added include/check_abi include/mysql_h.ic to the ignore list
configure.in:
  Look for icheck in configure
include/Makefile.am:
  Add rule to build mysql_h.ic if icheck is avaliable
  Add rule to compare mysql_h.ic to the version
  controlled reference file mysql_h_abi.ic
include/mysql.h:
  Add comment about taking care when editing mysql.h
  Add example how to add reserved fiels in the structs to
  allow for features to be added without breaking ABI
include/mysql_h_abi.ic:
  Add new file describing the libmysqlclient ABI used as a reference to detect ABI breakage
2006-10-24 20:32:07 +02:00
unknown
6c4aa883ce Bug #23427 (incompatible ABI change)
the incompatibility was caused by current_stmt member added to the MYSQL
structure.
It's possible to move it to THD structure instead which saves ABI


include/mysql.h:
  member moved to the THD structure
libmysqld/lib_sql.cc:
  now we use THD member here
sql/sql_class.h:
  current_stmt member added for the embedded server
2006-10-24 17:19:02 +05:00
unknown
23e9415055 Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT
This will hopefully avoiid annoying crashes when running with --debug
Fix warnings  from the above in mysqltest.c


client/mysqltest.c:
  Fix format specifier warnings in mysqltest.c
include/my_dbug.h:
  Add ATTRIBUTE_FORMAT specifier to _db_doprnt, which is used by DBUG_PRINT
  This will hopefully avoiid annoying crashes when running with --debug
2006-10-12 20:15:56 +02:00
unknown
403cc15508 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug8283-one


include/my_sys.h:
  Auto merged
2006-10-11 22:28:06 +02:00
unknown
5623f2e9a6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk


sql/item_timefunc.cc:
  Auto merged
2006-10-11 14:57:09 +04:00
unknown
3baf203483 Merge polly.local:/tmp/maint/bug11655/my41-bug11655
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk


sql/field.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/func_time.result:
  Manually merged
mysql-test/t/func_time.test:
  Manually merged
2006-10-11 14:55:23 +04:00
unknown
679b5848f3 Merge chilla.local:/home/mydev/mysql-4.1-bug8283
into  chilla.local:/home/mydev/mysql-4.1-bug8283-one


myisam/mi_check.c:
  Auto merged
myisam/mi_packrec.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/myisam.result:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Manual merge
mysql-test/t/myisam.test:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Manual merge
2006-10-09 19:40:16 +02:00
unknown
3109da7719 Bug#8283 - OPTIMIZE TABLE causes data loss
OPTIMIZE TABLE with myisam_repair_threads > 1 performs a non-quick 
parallel repair. This means that it does not only rebuild all 
indexes, but also the data file.

Non-quick parallel repair works so that there is one thread per 
index. The first of the threads rebuilds also the new data file.

The problem was that all threads shared the read io cache on the
old data file. If there were holes (deleted records) in the table,
the first thread skipped them, writing only contiguous, non-deleted
records to the new data file. Then it built the new index so that
its entries pointed to the correct record positions. But the other
threads didn't know the new record positions, but put the positions
from the old data file into the index.

The new design is so that there is a shared io cache which is filled
by the first thread (the data file writer) with the new contiguous
records and read by the other threads. Now they know the new record
positions.

Another problem was that for the parallel repair of compressed
tables a common bit_buff and rec_buff was used. I changed it so
that thread specific buffers are used for parallel repair.

A similar problem existed for checksum calculation. I made this
multi-thread safe too.


include/my_sys.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of io_cache_share.
include/myisam.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of checksum calculation in mi_check.c.
  'calc_checksum' is now in myisamdef.h:st_mi_sort_param.
myisam/mi_check.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Implemented a new parallel repair design.
  Using a synchronized shared read/write cache.
  Allowed for thread specific bit_buff, rec_buff, and calc_checksum.
myisam/mi_open.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added DBUG output.
myisam/mi_packrec.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Allowed for thread specific bit_buff and rec_buff.
myisam/myisamdef.h:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Commented on checksum calculation variables.
  Allowed for thread specific bit_buff.
  Added DBUG output for better table crash detection.
myisam/sort.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added implications of the new parallel repair design.
  Renamed 'info' -> 'sort_param'.
  Added DBUG output.
mysql-test/r/myisam.result:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added test results.
mysql-test/t/myisam.test:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Added test cases.
mysys/mf_iocache.c:
  Bug#8283 - OPTIMIZE TABLE causes data loss
  Redesign of io_cache_share.
  We do now allow a writer to synchronize himself with the
  readers of a shared cache. When all threads join in the lock,
  the writer copies the data from his write buffer to the shared
  read buffer.
2006-10-09 19:26:55 +02:00
unknown
287b027ed8 Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-kt


include/m_ctype.h:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2006-10-05 16:38:21 +05:00
unknown
634d3ff2c6 Fixes a number of problems with time/datetime <-> string conversion functions:
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced


include/my_time.h:
  Added defines for the TIME limits
  Added defines for the warning flags set by str_to_time() and check_time_range()
  Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
  Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
  Fixed testcase which relied on incorrect behaviour
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
  Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
  Added check_time_range() to be used from str_to_time() and item_timefunc.cc
  Added new out-of-range flag to str_to_time() warnings
  Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
  Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
  Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
  Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
  Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
  Checks for 'unsigned int' overflows in Item_func_maketime
  Use make_time_with_warn() instead of make_time() in Item_func_maketime
  Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
  Check for return value of str_to_time() along with warning flags
2006-10-04 17:13:32 +04:00
unknown
cdec7323ec Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers
This was available from gcc 3.1, so diable it before that
Update m_ctype.h to use the new macro


include/m_ctype.h:
  Use macro ATTRIBUTE_FORMAT_FPTR on function pointer
include/my_global.h:
  Add ATTRIBUTE_FORMAT_FPTR macro for setting format specifier also on function pointers
  This was available from gcc 3.1, so diable it before that
2006-10-03 00:48:26 +02:00
unknown
5bd5f55eee When compiling with qcc on QNC the define __GNUC__will be set although it doesn't support full GNU syntax
- disable __attribute__ when using qcc


include/my_global.h:
  Disable __attribute__ when compiling with qcc
2006-10-02 13:53:10 +02:00
unknown
bde5116b51 Fix __attribute__(A) macro (it formerly used bogus __cplusplus__ symbol) 2006-10-02 13:46:40 +02:00
unknown
89fa50a92b Disable __attribute__ entirely on g++ < 3.4. (Bug #2717)
include/my_global.h:
  Disable __attribute__ on g++ < 3.4. There are actually some forms of it that
  are supported, but rather than create more ATTRIBUTE_<foo> macros to handle
  them, it is easier to just disable them all. We will catch the compiler warnings
  with more recent versions of g++.
2006-09-29 19:28:16 -07:00
unknown
abd883f4d0 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
unknown
0b2a28f5cf BUG#9678: Client library hangs after network communication failure
(back-port to 4.0)

Socket timeouts in client library were used only on Windows.
Additionally, in 4.0 write operations erroneously set read timeout.

The solution is to use socket timeouts in client library on all
systems were they are supported, and to differentiate between read
and write timeouts.

No test case is provided because it is impossible to simulate network
failure in current test suite.


include/violite.h:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
libmysqld/lib_vio.c:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
sql/net_serv.cc:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
vio/viosocket.c:
  Add argument to vio_timeout() to determine which timeout should be set:
  for read (false) or for write (true).
  Implement socket timeouts on POSIX systems.
2006-09-18 22:02:06 +04:00
unknown
342dea0e35 Better comment text (thanks to SergeyP for suggestions made for the b#20471 patch) 2006-09-14 10:05:07 +05:00
unknown
4fd663b896 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b20471v2


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
2006-09-14 09:12:47 +05:00
unknown
ddb9f8668f Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte


include/mysql_com.h:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN
mysql-test/r/ctype_utf8.result:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
mysql-test/t/ctype_utf8.test:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
sql-common/client.c:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/sql_acl.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that user name is not longer than USERNAME_LENGTH symbols
sql/sql_parse.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/table.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that db name is not longer than NAME_LEN symbols
2006-08-30 15:56:17 +05:00
unknown
915bdfbea8 Bug #2717: include/my_global.h mis-defines __attribute__
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
  __attribute__((format(...))) safely, make more use of the format attribute,
  and fix some of the warnings that this turns up (plus a bonus unrelated one).


include/m_ctype.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
  Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
  Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
  Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
  is available from different versions of gcc and g++.
include/my_sys.h:
  Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
  Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
  Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
  Fix various format specifiers
  Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
  Cast pointers to correct type for %lx
sql/set_var.cc:
  Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
  Fix format specifier
sql/slave.h:
  Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
  Fix number of  arguments passed for formatting, and fix acl_host_or_ip being
  passed instead of just the hostname.
sql/sql_class.h:
  Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
2006-08-17 12:25:40 -07:00
unknown
dcb6659001 Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys.
Don't use GNUC min/max operations are they are depricated.
Fixed valgrind warning


BitKeeper/etc/ignore:
  Added */.libs/*
include/my_global.h:
  Don't use GNUC min/max operations are they are depricated
myisam/mi_rkey.c:
  Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
  The previous bug fix didn't work when using partial keys.
myisam/mi_test_all.res:
  Updated results to match mi_test_all.sh
myisam/mi_test_all.sh:
  Removed confusing warning
mysql-test/r/myisam.result:
  Added test case for #14400
mysql-test/t/myisam.test:
  Added test case for #14400
sql/sql_select.cc:
  Fixed valgrind warning (in field_string::val_int())
2006-08-10 22:41:19 +03:00
unknown
d2f7fe3558 Bug#20471 LIKE search fails with indexed utf8 char column
The main problem was already fixed by Igor under terms of 16674.
Adding some additional minor fixes and tests.


include/m_ctype.h:
  Adding reference to CHARSET_INFO.txt
mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
strings/CHARSET_INFO.txt:
  Adding comment about max_sort_char
strings/ctype-mb.c:
  Restiring that non-Unicode character sets use 0xFF as pad character
  for max_str. Only Unicode character sets use wc_mb.
strings/ctype-utf8.c:
  Fixed that max_sort_char for UTF8 from U+00FF to U+FFFF.
2006-07-20 15:52:48 +05:00
unknown
d9992cc79e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.16017


include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
libmysqld/libmysqld.c:
  merging
2006-07-13 22:32:18 +05:00
unknown
77deeb7ee6 Fixed include file usage
hp_test2 now works again
Fixed wrong cast, which caused problems with gcc 4.0 and floats in prepared statements (Bug #19694)


heap/hp_test1.c:
  Portability fix
heap/hp_test2.c:
  Added max_table_size (fixes that hp_test2 works again)
include/my_global.h:
  Fixed wrong cast, which caused problems with gcc 4.0 (Bug #19694)
mysys/my_handler.c:
  Added missing include file
strings/strtod.c:
  Fixed include files
2006-06-30 02:25:35 +03:00
unknown
8b6c2d312b bug #20318 (ctype_ucs2_def test fails with embedded)
there was two problems about charsets in embedded server
1. mysys/charset.c - defined there default_charset_info variable is
modified by both server and client code (particularly when
--default-charset option is handled)
In embedded server we get two codelines modifying one variable.
I created separate default_client_charset_info for client code

2. mysql->charset and mysql->options.charset initialization isn't
properly done for embedded server - necessary calls added


include/sql_common.h:
  client charset info default declared
libmysqld/lib_sql.cc:
  thd_init_client_charset calls added
libmysqld/libmysqld.c:
  check_embedded_connection moved to client.c to avoid code duplication
sql-common/client.c:
  charset initialization moved to mysql_init_character_set to
  be used in embedded server
sql/sql_parse.cc:
  thread client charset initialization moved to thd_init_client_charset
  to avoid code duplication
2006-06-19 22:11:01 +05:00
unknown
eadcf20081 bug #16017 (memory leaks in embedded server)
There actually was 3 different problems -
hash_user_connections wasn't cleaned
one strdupped database name wasn't freed
and stmt->mem_root wasn't cleaned as it was
replased with mysql->field_alloc for result
For the last one - i made the library using stmt's
fields to store result if it's the case.


include/mysql.h:
  statement pointer added to the advanced_command to be checked in
  embedded server
include/sql_common.h:
  stmt added to the cli_advanced_command interface
libmysql/libmysql.c:
  stmt pointer now sent to advanced_command
libmysqld/embedded_priv.h:
  it's enough to send database name to check_embedded_connection
libmysqld/lib_sql.cc:
  Now we store result directly in the MYSQL_STMT structure to
  avoid extra copying
libmysqld/libmysqld.c:
  it's enough to only send database pointer to check_embedded_connection
sql-common/client.c:
  stmt fake attribute added to cli_advanced_command
sql/sql_parse.cc:
  hash_user_connections isn't used if no access checks compiled
2006-06-01 17:06:42 +05: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