Commit graph

244 commits

Author SHA1 Message Date
Georgi Kodinov
e4e1901569 Bug #11761822: yassl rejects valid certificate which openssl accepts
Applied the fix that updates yaSSL to 2.2.1 and fixes parsing this 
particular certificate.
Added a test case with the certificate itself.
2012-05-15 13:12:22 +03:00
Tatjana Azundris Nuernberg
da2cc0cdf6 BUG#13431369 - MAIN.VARIABLES-NOTEMBEDDED CRASHES THE SERVER SPORADICALLY ON WINDOWS
On shutdown(), Windows can drop traffic still queued for sending even if that
wasn't specifically requested. As a result, fatal errors (those after
signaling which the server will drop the connection) were sometimes only
seen as "connection lost" on the client side, because the server-side
shutdown() erraneously discarded the correct error message before sending
it.

If on Windows, we now use the Windows API to access the (non-broken) equivalent
of shutdown().

Backport from trunk
2012-02-17 19:02:17 +00:00
Kent Boortz
b6e6097c95 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
e5ce023f57 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Luis Soares
ed6aae83c3 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Davi Arnaut
0b87650887 Post-merge fixes: fix typo and remove unused variables. 2009-11-21 10:11:45 -02:00
Vladislav Vaintroub
78da734345 Bug#47571 : idle named pipe connection is unkillable
implement Davi's review suggestions (post-push fixes)
2009-11-20 13:09:50 +01:00
Vladislav Vaintroub
7d5e759907 merge 2009-11-03 01:52:57 +01:00
Vladislav Vaintroub
84301e8b9d Bug#47571: idle named pipe connection is unkillable
Bug#31621: Windows server hanging during shutdown using named pipes 
           and idle connection
            
Problem: when idle pipe connection is forcefully closed with KILL
statement or when the server goes down, thread that is closing connection
would hang infinitely in CloseHandle(). The reason for the hang is that 
named pipe operations are performed synchronously. In this mode all IOs
on pipe are serialized, that is CloseHandle() will not abort ReadFile() 
in another thread, but wait for ReadFile() to complete.
            
The fix implements asynchrnous mode for named pipes, where operation of file
are not synchronized. Read/Write operation would fire an async IO and wait for
either IO completion or timeout.
            
Note, that with this patch timeouts are properly handled for named pipes.
      
Post-review: Win32 timeout code has been fixed for named pipes and shared
memory. We do not store pointer to NET in vio structure, only the read and 
write timeouts.
2009-11-02 23:19:58 +01:00
Georgi Kodinov
b9553d83ea merge 2009-10-27 15:20:34 +02:00
Georgi Kodinov
95dce2b033 merge from 4.1 2009-10-27 15:11:06 +02:00
Georgi Kodinov
90d32d8bc8 Bug #47320: OpenSSL client does not check YaSSL server certificate
Removed the verify callback, as it's not needed to verify even self
signed certificates and is a security problem.
2009-10-20 13:09:16 +03:00
Staale Smedseng
63ab8415d9 Bug #45770 errors reading server SSL files are printed, but
not logged
        
Errors encountered during initialization of the SSL subsystem
are printed to stderr, rather than to the error log.
        
This patch adds a parameter to several SSL init functions to
report the error (if any) out to the caller. The function
init_ssl() in mysqld.cc is moved after the initialization of
the log subsystem, so that any error messages can be logged to
the error log. Printing of messages to stderr has been 
retained to get diagnostic output in a client context.
2009-07-23 13:38:11 +02:00
Staale Smedseng
47a9a25228 Merge from 5.0 2009-07-23 13:53:28 +02:00
Davi Arnaut
26f561d5d0 Bug#33899: Deadlock in mysql_real_query with shared memory connections
The problem is that the read and write methods of the shared
memory transport (protocol) didn't react to asynchornous close
events, which could lead to a lock up as the client would wait
(until time out) for a server response that will never come.

The solution is to also wait for close events while waiting
for I/O from or to the server.

Bug report and patch submitted by: Armin Schöffmann
2009-03-26 20:25:10 -03:00
Davi Arnaut
bfa198c2e7 Bug#33899: Deadlock in mysql_real_query with shared memory connections
The problem is that the read and write methods of the shared
memory transport (protocol) didn't react to asynchronous close
events, which could lead to a lock up as the client would wait
(until time out) for a server response that will never come.

The solution is to also wait for close events while waiting
for I/O from or to the server.
2009-03-26 20:17:27 -03:00
Ignacio Galarza
2b85c64d65 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
iggy@alf.(none)
a54f3995ec Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  alf.(none):/src/mysql-5.1-build_31929
2008-02-21 19:53:37 -05:00
guilhem@gbichot4.local
045f3c4a5d Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  gbichot4.local:/home/mysql_src/mysql-5.1-build-gca
2008-02-18 23:36:57 +01:00
guilhem@gbichot4.local
9e2b31b026 Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
2008-02-18 23:29:39 +01:00
msvensson@pilot.mysql.com
fc937c52b5 Merge pilot.mysql.com:/data/msvensson/mysql/bug25988/my50-bug25988
into  pilot.mysql.com:/data/msvensson/mysql/bug25988/my51-bug25988
2008-02-07 09:55:49 +01:00
msvensson@pilot.mysql.com
c409f20695 Bug#33050 5.0.50 fails many SSL testcases 2008-02-07 08:48:28 +01:00
iggy@alf.(none)
18aba8a82c Bug#31929 Windows build fails with >=4 Parallel build threads.
- Add GenError Dependency to storage engines that include 
mysqld_error.h
2008-01-29 21:58:57 -05:00
msvensson@pilot.(none)
cae9149d7c Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
2007-08-28 11:36:10 +02:00
msvensson@pilot.(none)
ec421a02a9 Bug#28812 rpl_ssl fails due to assert in extra/yassl/src/socket_wrapper.cpp:117
- Merge sslaccept and sslconnect.
 - Atomically "reset" vio to VIO_TYPE_SSL when the SSL connection has
   succeeded, this avoids having to revert anything and thus protects
   against "close_active_vio" in the middle.
 - Add some variance to the testcase
2007-08-28 11:34:43 +02:00
jbruehe/mysqldev@mysql.com/production.mysql.com
2d4efab366 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/data0/mysqldev/my/mysql-5.1-30367
2007-08-16 18:21:47 +02:00
monty@narttu.mysql.fi
9d609a59fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-14 00:22:34 +03:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
kent@mysql.com/kent-amd64.(none)
413d1e1aa4 CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
  - Changed to do embedded build part as normal build, when
    WITH_EMBEDDED_SERVER is set.
  - Allow both normal and debug build with embedded.
  - Build static embedded library by pointing out all source and compile
    it all, i.e. not building libraries from libraries, not portable.
  - Let embedded use generated files from the "sql" directory, added
    dependencies to make sure built before embedded.
  - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
    linked in when debug target is used.
  - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
    others can't depend on it, not defined at configure time. Instead
    set the output file name.
  - Created work around for bug in CMake 2.4.6 and output names, to
    set the "mysqld<suffix>.pdb" name to the same base name.
  - Set the correct manifest "name" (patch by iggy)
2007-08-06 23:16:01 +02:00
joerg@trift2.
22d445ee70 Fix a bad BitKeeper dependency structure for the "CMakeLists.txt" files.
They had been introduced in 5.1 and were only later backported to 5.0;
as a consequence, the files in the 5.1 tree do not depend on the 5.0 ones,
and changes in 5.0 do not propagate into the 5.1 files.

To fix this, the (previous) files in 5.1 now are deleted ("bk rm"),
and the previously deleted files depending on 5.0 are now moved to the 
respective source directories ("bk mv").
The current 5.1 contents is restored in these files.

If you need the previous history of the 5.1 files ("bk revtool"),
access those in "BitKeeper/deleted".

Contrary to the original plan, I did not introduce the name
"CMakeLists.historic" - mostly in order not to clutter the source tree.

This fixes bug#29982.
2007-07-31 19:35:13 +02:00
dkatz@damien-katzs-computer.local
230adda1e2 Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into  damien-katzs-computer.local:/Users/dkatz/mysql51
2007-07-12 22:22:40 -04:00
dkatz@damien-katzs-computer.local
899aaa6bb2 Bug #29579 Clients using SSL can hang the server
Added an option to yassl to allow "quiet shutdown" like openssl does. This option causes the SSL libs to NOT perform the close_notify handshake during shutdown. This fixes a hang we experience because we hold a lock during socket shutdown.
2007-07-12 22:06:33 -04:00
tsmith@quadxeon.mysql.com
4b93804592 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
2007-06-05 17:51:30 +02:00
msvensson@pilot.blaudden
5d22eb6552 Merge pilot.blaudden:/home/msvensson/mysql/bug26664/my50-bug26664
into  pilot.blaudden:/home/msvensson/mysql/bug26664/my51-bug26664
2007-05-24 20:43:12 +02:00
msvensson@pilot.blaudden
93b1fe65d8 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"
2007-05-24 11:21:27 +02:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c
2007-05-10 12:59:39 +03:00
msvensson@pilot.blaudden
4774c40089 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-11 22:08:00 +02:00
msvensson@pilot.blaudden
900e0d685d Merge pilot.blaudden:/home/msvensson/mysql/bug21611/my50-bug21611
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-04-11 21:03:29 +02:00
msvensson@pilot.blaudden
82b454aa28 Bug#21611 Slave can't connect when master-ssl-cipher specified
- Change check for return value of 'SSL_CTX_set_cipher_list'
   in order to handle 0 as error setting cipher.
 - Thanks to Dan Lukes for finding the problem!
2007-04-02 13:12:59 +02:00
msvensson@pilot.blaudden
cb806be68d Merge pilot.blaudden:/home/msvensson/mysql/bug25309/my51-bug25309
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-03-29 11:48:05 +02:00
msvensson@pilot.blaudden
f47c4368de Merge pilot.blaudden:/home/msvensson/mysql/bug25309/my50-bug25309
into  pilot.blaudden:/home/msvensson/mysql/bug25309/my51-bug25309
2007-03-29 11:38:48 +02:00
msvensson@pilot.blaudden
aec7927c8e Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23
- Turn off verification of peer if both ca_path and ca_file is null
   i.e from only passing --ssl-key=<client_key> and --ssl-cert=<client_cert>
   to the mysql utility programs.
   The server will authenticate the client accoring to GRANT tables
   but the client won't authenticate the server
2007-03-28 12:23:55 +02:00
monty@mysql.com/narttu.mysql.fi
f0ae3ce9b9 Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
2007-02-23 13:13:55 +02:00
msvensson@pilot.mysql.com
5274fa7c9d Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.1-new-maint
2007-02-06 22:01:21 +01:00
msvensson@pilot.mysql.com
e3a7ce7d3b Merge 192.168.0.5:mysql/bug25203/my50-bug25203
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-06 21:55:39 +01:00
msvensson@neptunus.(none)
5f5b0e9b39 Merge neptunus.(none):/home/msvensson/mysql/yassL-import/my50-yassL-import
into  neptunus.(none):/home/msvensson/mysql/yassL-import/my51-yassL-import
2007-02-06 17:34:06 +01:00
msvensson@neptunus.(none)
6fc734a768 Bug#24157 openssl_1 regression test is broken two different ways
- Send output from 'ERR_print_errors_fp' to DBUG_FILE if --debug is used
2007-02-06 17:33:11 +01:00
msvensson@pilot.mysql.com
256cb08ba9 Merge 192.168.0.10:mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
2007-02-06 14:44:05 +01:00
gluh@mysql.com/eagle.(none)
010dc0b55c Valgrind error fixes
Notes:
This patch doesn't fix all issues in the tree and we need jani's fix for that
This patch shoud not be merged into 5.0
2007-02-01 18:00:24 +04:00