Commit graph

76 commits

Author SHA1 Message Date
Vladislav Vaintroub
e6090f10bb Windows improvements : manual backport of
htttp://lists.mysql.com/commits/50957?f=plain
      
Always use TLS functions instead of __declspec(thread) to access 
thread local storage variables.
The change removes the necessity to recomplile the same source
files twice -  with USE_TLS for DLLs and without USE_TLS for EXEs.
Real benefit of this change is better readability and maintainability
of TLS functions within MySQL.
              
There is a performance loss using TlsXXX functions compared to __declspec 
but the difference is negligible in practice. In a sysbench-like benchmark 
I ran with with TlsGetValue, pthread_[get|set]_specific was called 600000000 
times and took 0.17sec of total 35min CPU time, or 0.008%.
2009-09-30 03:22:57 +02:00
Vladislav Vaintroub
41746bb039 Bug #43715 Link errors when trying to link mysql_embedded.exe
The reason for the error is incorrectly specified link dependencies
for mysql_embedded, mysqltest_embedded and mysql_client_test_embedded
in CMakeLists.txt (ADD_DEPENDENCIES should be TARGET_LINK_LIBRARIES)
2009-03-17 23:28:24 +01:00
Magnus Svensson
466c9f5e3e Fix merge error, mysqltest.cc should be mysqltest.c 2008-12-18 19:36:01 +01:00
Alfranio Correia
3175a06a13 merge 5.1 --> 5.1-rpl 2008-12-13 19:42:12 +00:00
Vladislav Vaintroub
4dfbf2ec93 Bug#38522: 5 seconds delay when closing application using embedded server
The problem here is that embedded server starts handle_thread manager 
thread  on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
             
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
            
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
            
Note: Specifically on Windows and when using DBUG version of libmysqld, 
the complete solution requires removing obsolete code my_thread_init() 
from my_thread_var(). This has a side effect that a DBUG statement 
after my_thread_end() can cause thread counter to be incremented, and 
embedded will hang for some seconds. Or worse, my_thread_init() will 
crash if critical sections have been deleted by the global cleanup 
routine that runs in a different thread. 

This patch also fixes and revert prior changes for Bug#38293 
"Libmysqld crash in mysql_library_init if language file missing".

Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
described above
2008-12-04 19:41:53 +01:00
Alexey Botchkov
b8cd1725b1 Bug#38293 Libmysqld crash in mysql_library_init if language file missing
additional fix - the 'debug' keyword removed
2008-11-19 15:51:31 +04:00
Alexey Botchkov
70e8a4fd54 Bug#38293 Libmysqld crash in mysql_library_init if language file missing
That's a Win-specific error.
    When we create libmysqld.dll we have many libraries like mysys, dbug,
    strings, etc linked into that dll, so the application built upon
    this library shouldn't link these libraries to itself, rather use
    those inside the dll.

    Fixed by redirecting calls into the libmysqld.dll

per-file comments:
  dbug/dbug.c
Bug#38293 Libmysqld crash in mysql_library_init if language file missing
    fake _db_something definitions added

  include/my_dbug.h
Bug#38293 Libmysqld crash in mysql_library_init if language file missing
  fake _db_something declarations added

  libmysqld/examples/CMakeLists.txt
Bug#38293 Libmysqld crash in mysql_library_init if language file missing
    superfluous libraries removed from linking

  libmysqld/libmysqld.def
Bug#38293 Libmysqld crash in mysql_library_init if language file missing
    set of mysys functions added to the export section
2008-11-19 13:57:23 +04:00
Magnus Svensson
06a2f92bac Ad missing ) to CmakeLists.txt 2008-08-09 11:31:17 +02:00
Magnus Svensson
39ad2dc05a Bug #38181 Please print more debug info when tests fail 2008-08-04 21:54:44 +02:00
msvensson@pilot.mysql.com
9144b58c8d Bug#32044 some of the tests (backup, drop, query_cache, etc) will timeout on Windows 2007-11-02 09:27:38 +01:00
kent@mysql.com/kent-amd64.(none)
1b53e4a547 Makefile.am:
Always include all sub directories in "make dist"
  Removed incorrect comment
configure.in:
  Unconditionally list make files in AC_CONFIG_FILES
  Removed 'thread_dirs', it is not used
  Minor cleanup
compile-dist:
  Simplified the configure line needed for "make dist" to get it all
zlib.m4, ssl.m4:
  Unconditionally list make files in AC_CONFIG_FILES
Makefile.am:
  Removed DIST_SUBDIRS not needed
  Don't copy soft links as files into source package
2007-09-26 18:47:55 +02: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
iggy@amd64.(none)
3ed9739c82 Bug#29903 The CMake build method does not produce the embedded library.
- Changes to correct and test Windows embedded build.
2007-08-03 14:43:12 -04:00
iggy@alf.
c15a2647a0 Embedded Server doesn't build on Windows.
- Add build configuration parameter EMBEDDED_ONLY which will configure 
the VS solution to produce only mysql embedded binary.
- Make necessary updates to successfully compile solution.
2007-06-15 14:32:16 -04:00
mikron@mikael-ronstr-ms-dator.local
8a83924eb6 Merge mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/mysql-5.0-ndb
into  mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/mysql-5.1-ndb
2007-05-07 15:39:36 +02:00
mikron@mikael-ronstr-ms-dator.local
4cdf0fab48 Fix SCI Transporter 2007-05-07 15:25:24 +02:00
msvensson@pilot.blaudden
2218fafa1f Merge pilot.blaudden:/home/msvensson/mysql/bug22508/my51-bug22508
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-11 09:34:02 +02:00
msvensson@pilot.blaudden
b554258a8e Bug#22508 BUILD/compile-dist fails due to problem with readline/libedit
- Move the link_sources command from top level Makefile into each subdir
   that need to link files
2007-03-27 23:56:48 +02:00
monty@mysql.com/narttu.mysql.fi
520d1b4144 Fixed compilations problems and warnings on windows 2007-02-23 22:48:15 +02:00
holyfoot/hf@hfmain.(none)
b4c0867df1 Merge mysql.com:/d2/hf/clean/my51-clean
into  mysql.com:/d2/hf/common/my51-common
2006-12-31 12:41:42 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
874d366500 Merge mysql.com:/d2/hf/clean/my50-clean
into  mysql.com:/d2/hf/common/my50-common
2006-12-31 12:39:20 +04:00
kent@mysql.com/kent-amd64.(none)
67868597bb Many files:
Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
  Added GPL copyright text
my_vle.h, rpl_utility.h, my_vle.c, base64-t.c, rpl_utility.cc:
  Changed copyright header formatting some
plugin_example.c, daemon_example.c:
  Added "Copyright (C) 2006 MySQL AB" to GPL header
2006-12-31 02:29:11 +01:00
kent@kent-amd64.(none)
be15e3bc15 Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-23 20:20:40 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
holyfoot/hf@deer.(none)
385541131b Merge mysql.com:/home/hf/work/embt/my50-embt
into  mysql.com:/home/hf/work/embt/my51-embt
2006-11-13 20:16:46 +04:00
holyfoot/hf@mysql.com/deer.(none)
7805cdef84 Merge mysql.com:/home/hf/work/embt/my41-embt
into  mysql.com:/home/hf/work/embt/my50-embt
2006-11-13 10:45:22 +04:00
holyfoot/hf@mysql.com/deer.(none)
6e0045ed20 embedded-mode tests fixed 2006-11-13 10:39:15 +04:00
monty@mysql.com
e50412ef38 Re-apply missing changeset, orignally pushed by elliot
Add define YASSL_PREFIX when compiling yassl

Import patch from yaSSL
- avoid allocating memory for each call to 'EVP_md5' and 
  'EVP_des_ede3_cbc' which were not released until server was stopped
- Those functions are used from the SQL function 'des_encrypt' and
  'des_decrypt'.

Add new define YASSL_PREFIX beforee including ssl.h to activate inclusion of prefix_*.h files

Bug#20022 mysql-test-run can't be run with secure connections turned on for all testcases
- Part 1, fixes rpl- and federated-tests where connection is made to 127.0.0.1

- Include prefix files that renames all public functions in yaSSLs
  OpenSSL API to ya<function_name>. They will otherwise conflict
  with OpenSSL functions if loaded by an application that uses OpenSSL
  as well as libmysqlclient with yaSSL support.

Bug#18235: assertion/crash when windows mysqld is ended with ctrl-c
  
Two threads both try a shutdown sequence which creates a race to the
de-init/free of certain resources.
  
This exists in similar form in the client as 17926: "mysql.exe crashes
when ctrl-c is pressed in windows."

Update after merge to 5.0

BUG#18669: Session COM_STATISTICS breaks mysqladmin status.
Changed COM_STATISTICS to display the global status, instead of thead status, for slow queries and table opens.

- In function 'handle_grant_struct' when searching the memory structures for an 
  entry to modify, convert all entries here host.hostname is NULL to "" and compare that 
  with the host passed in argument "user_from".
- A user created with hostname "" is stored in "mysql.user" table as host="" but when loaded into 
  memory it'll be stored as host.hostname NULL. Specifiying "" as hostname means
  that "any host" can connect. Thus is's correct to turn on allow_all_hosts
  when such a user is found. 
- Review and fix other places where host.hostname may be NULL.

BUG#19394 OPT_INNODB_THREAD_CONCURRENCY duplicated
Removed duplication (not a user-visible change)
2006-06-06 14:21:07 +03:00
msvensson@shellback.(none)
20217ba36f Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init
- Include prefix files that renames all public functions in yaSSLs
   OpenSSL API to ya<function_name>. They will otherwise conflict
   with OpenSSL functions if loaded by an application that uses OpenSSL
   as well as libmysqlclient with yaSSL support.
2006-05-31 16:19:06 +02:00
reggie@big_geek.
67a692f998 performing a set of bk mv on each CMakeLists.txt file to try and restore the mixed case filenames since this seems to be required with Cmake 2.4 beta 1.
This is being pushed to a private tree and tested before being sent to the mainline.
2006-05-11 11:29:08 -05:00
knielsen@mysql.com
8a78628f0a Missing file in last commit. 2006-04-03 10:28:53 +02:00
pem@mysql.com
b2a9961abf Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new
2005-11-28 20:14:12 +01:00
msvensson@devsrv-b.mysql.com
8f457699a8 Bug #15168 yassl failure on amd64
- Use libtool to build libraries
2005-11-24 17:17:36 +01:00
jani@a193-229-222-105.elisa-laajakaista.fi
5273071265 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2005-11-23 14:57:00 +02:00
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
kent@mysql.com
4742f585b1 Merge 2005-11-04 02:17:11 +01:00
kent@mysql.com
095efe48a5 Makefile.am, configure.in:
Enable "make distcheck" to work
2005-09-24 15:51:45 +02:00
kent@mysql.com
8e3b393d5c Merge 2005-07-06 00:06:11 +02:00
kent@mysql.com
a7be42163a Makefile.am:
Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
2005-07-05 23:24:48 +02:00
lenz@mysql.com
918ce29557 - manual merge 2005-04-21 08:30:59 +02:00
lenz@mysql.com
814b4aa2eb - manual merge 2005-04-19 17:18:56 +02:00
lenz@mysql.com
a42c7d442e - added missing copyright headers to several Makefile.am's (noticed
while testing changes to the mysql-copyright scripts
2005-04-19 17:00:05 +02:00
konstantin@mysql.com
60e7da0a67 Remove unexistent @MT_INCLUES@ 2005-03-18 00:24:35 +03:00
serg@serg.mylan
852f2e0aba small Makefile.am cleanup
clean: targets removed
    generated *.h files moved to include/
2005-01-28 17:14:03 +01:00
patg@krsna.patg.net
7db99fa559 change to Makefile.am per Serg's request 2005-01-25 23:52:47 -08:00
tomas@poseidon.ndb.mysql.com
7b3ec51deb fix for make error in Makefile.am of mysql_client_test.c 2005-01-25 09:47:00 +01:00
jimw@mysql.com
d11081bd6f Merge 2005-01-24 13:48:48 -08:00
lenz@mysql.com
e456b6c086 - fixed one missing occasion from the mysql_client_test renaming 2005-01-20 17:00:30 +01:00
lenz@mysql.com
9675b0698f - renamed client_test -> mysql_client_test
- renamed the tests that use the embedded server (client_test -> 
  mysql_client_test_embedded, mysqltest -> mysql_test_embedded
  and changed some Makefiles and scripts so they are installed in $bindir
  (required to be able to run the test suite against the embedded server)
2005-01-20 16:25:38 +01:00
anjuta@arthur.local
a045161e5b Added pathes to mysqld_error.h and sql_state.h; fixed segfault bug; 2004-12-14 01:54:16 +02:00