Commit graph

71 commits

Author SHA1 Message Date
Sergey Vojtovich
92985af1ff Merge backport of WL#3771 with mysql-next-mr. 2010-01-19 17:30:55 +04:00
Alexander Nozdrin
594d05a688 Auto-merge from mysql-next-mr. 2009-12-19 11:35:19 +03:00
Vladislav Vaintroub
dc803c99d0 merge 2009-12-18 22:13:56 +01:00
Vladislav Vaintroub
e378fa5be0 Bug #49811: inconsistent usage of SAFEMALLOC in debug compilation on windows
Remove per-project SAFEMALLOCs definitions, as they result in malloc/free mismatches.
2009-12-18 21:39:24 +01:00
Alexander Nozdrin
0b1a15e9a7 Backporing patch for Bug#48351 (Inconsistent library names for semisync plugin)
from mysql-next-mr-bugfixing to mysql-trunk-bugfixing.

Original revision:
------------------------------------------------------------
revision-id: zhenxing.he@sun.com-20091127084945-wng7gakygduv3q8k
committer: He Zhenxing <zhenxing.he@sun.com>
branch nick: 5.1-rep-semisync
timestamp: Fri 2009-11-27 16:49:45 +0800
message:
  Bug#48351 Inconsistent library names for semisync plugin
  
  The semisync plugin library names on Unix like systems were prefixed with
  'lib', which did not follow the conventions.
  
  Fix the problem by removing the 'lib' prefix on Unix systems.
------------------------------------------------------------
2009-12-15 23:40:20 +03:00
Sergey Vojtovich
94098b22c0 Backport from 6.0-codebase.
WL#3771
  "Audit Plugin Interface"
  Implement new plug-in type - AUDIT
  New plug-in: audit_null
    simply increments counter for how many times it was called.
2009-12-15 23:52:47 +04:00
Marc Alff
edd5ff174c Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc 2009-12-11 01:58:13 -07:00
Marc Alff
e33a8b2a1a WL#2360 Performance schema
Part III: mysys instrumentation
2009-12-09 20:19:51 -07:00
He Zhenxing
e8b261508e Merge from trunk-bugfixing 2009-12-05 10:46:29 +08:00
He Zhenxing
cbafed1cae Auto merge from 5.1-rep-semisync 2009-12-05 10:28:53 +08:00
He Zhenxing
6a213f3a60 Postfix after merge patch for Bug#49020 2009-12-04 17:54:11 +08:00
He Zhenxing
a4bd241536 Auto merge fixes for Bug#49020 2009-12-04 16:05:35 +08:00
He Zhenxing
b17c1a7961 Auto merge postfix of Bug#49020 2009-12-04 13:46:06 +08:00
He Zhenxing
eaf517bc7d Post fix for previous patch of Bug#49020
Added back n_frees, use 'clear' instead of 'free' since memory is
not freed here.
2009-12-04 13:43:38 +08:00
He Zhenxing
7954a1717b Auto merge fix for Bug#49020 2009-12-04 10:04:14 +08:00
He Zhenxing
16ec25c0a8 Bug#49020 Semi-sync master crashed with free_pool == NULL, assertion `free_pool_'
Before this patch, semisync assumed transactions running in parallel
can not be larger than max_connections, but this is not true when
the event scheduler is executing events, and cause semisync run out
of preallocated transaction nodes.

Fix the problem by allocating transaction nodes dynamically.

This patch also fixed a possible deadlock when running UNINSTALL
PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by
releasing the internal Delegate lock before unlock the plugins.
2009-12-04 09:46:33 +08:00
He Zhenxing
9b262a3d9f Merge fix of bug#48351 from 5.1-rep-semisync 2009-11-29 10:10:09 +08:00
He Zhenxing
75b9db91de Bug#48351 Inconsistent library names for semisync plugin
The semisync plugin library names on Unix like systems were prefixed with
'lib', which did not follow the conventions.

Fix the problem by removing the 'lib' prefix on Unix systems.
2009-11-27 16:49:45 +08:00
Sergei Golubchik
d101d144df WL#4903 Plugin Service API part I
(mysql-next-mr backport)
2009-11-02 21:05:42 +01:00
He Zhenxing
240dbc28f7 Postfix of previews commit, add missing file 2009-10-23 15:22:20 +08:00
He Zhenxing
b6529a140b Add semi-sync support for Windows 2009-10-23 12:56:30 +08:00
He Zhenxing
f71b836e50 Postfix of bug#45674
rpl_semi_sync_master_wait_sessions was reset by FLUSH STATUS,
which could cause the master fail to wake up waiting sessions and
result in master timeout waiting for slave reply.

rpl_semi_sync_master_wait_session should not be reset, this 
problem is fixed by this patch.
2009-10-18 20:29:03 +08:00
He Zhenxing
dab1162b53 Backport post fix for semisync
Remove functions that no longer needed
Fix warning suppressions
2009-10-12 21:21:13 +08:00
He Zhenxing
b92ec52915 Backport BUG#47298 Semisync: always wait until timeout if no semi-sync slave available
Add an option to control whether the master should keep waiting
until timeout when it detected that there is no semi-sync slave
available.

The bool option 'rpl_semi_sync_master_wait_no_slave' is 1 by
defalt, and will keep waiting until timeout. When set to 0, the
master will switch to asynchronous replication immediately when
no semi-sync slave is available.
2009-10-12 21:15:32 +08:00
He Zhenxing
64fc766c93 BUG#45674 FLUSH STATUS does not reset semisynchronous counters
Semi-sync status were not reset by FLUSH STATUS, this was because
all semi-sync status variables are defined as SHOW_FUNC and FLUSH
STATUS could only reset SHOW_LONG type variables.

This problem is fixed by change all status variables that should
be reset by FLUSH STATUS from SHOW_FUNC to SHOW_LONG.

After the fix, the following status variables will be reset by
FLUSH STATUS:
  Rpl_semi_sync_master_yes_tx
  Rpl_semi_sync_master_no_tx

Note: normally, FLUSH STATUS itself will be written into binlog
and be replicated, so after FLUSH STATS, one of
  Rpl_semi_sync_master_yes_tx
  Rpl_semi_sync_master_no_tx
can be 1 dependent on the semi-sync status. So it's recommended
to use FLUSH NO_WRITE_TO_BINLOG STATUS to avoid this.
2009-10-12 21:03:04 +08:00
He Zhenxing
7d3d0fc303 Backport Bug#45852 Semisynch: Last_IO_Error: Fatal error: Failed to run 'after_queue_event' hook
Errors when send reply to master should never cause the IO thread
to stop, because master can fall back to async replication if it
does not get reply from slave.

The problem is fixed by deliberately ignoring the return value of
slaveReply.
2009-10-12 20:57:30 +08:00
He Zhenxing
55842061e7 Backport BUG#45848 Semisynchronous replication internals are visible in SHOW PROCESSLIST and logs
Semi-sync uses an extra connection from slave to master to send
replies, this is a normal client connection, and used a normal
SET query to set the reply information on master, which is visible
to user and may cause some confusion and complaining.

This problem is fixed by using the method of sending reply by
using the same connection that is used by master dump thread to
send binlog to slave. Since now the semi-sync plugins are integrated
with the server code, it is not a problem to use the internal net
interfaces to do this.

The master dump thread will mark the event requires a reply and
wait for the reply when the event just sent is the last event
of a transaction and semi-sync status is ON; And the slave will
send a reply to master when it received such an event that requires
a reply.
2009-10-12 20:55:01 +08:00
He Zhenxing
d8b4e637a0 Fix semisync master/slave status always showed as OFF on sparc
On sparc, semisync master/slave status is always showed as OFF, this
is fixed by change rpl_semisync_master/slave_status variables from
long to char.
2009-10-03 13:00:05 +08:00
He Zhenxing
06442da289 Backporting WL#4398 WL#1720
Backporting BUG#44058 BUG#42244 BUG#45672 BUG#45673
Backporting BUG#45819 BUG#45973 BUG#39012
2009-09-26 12:49:49 +08:00
Timothy Smith
858d40d82c Add the IBM DB2 for i storage engine.
Modify plugins.m4 configuration framework so that plugins which are
not built still get added to the source distribution during make dist.
This came up now because we can only build ibmdb2i on i5/OS, and we
can't bootstrap our source dist on that platform.  The solution is to
specify DIST_SUBDIRS containing all plugins, separate from SUBDIRS
which contains the plugins which are actually built.

This ibmdb2i code is from the ibmdb2i-ga3-src.zip file, with a patch
to plug.in to disable the plugin if the PASE environment isn't available.
2009-02-15 03:18:30 +01:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
e286ac998c Use pkglibdir to simplify pkgplugindir, and fix the path in a
couple of Makefiles.  Continuation of the fix for bug#31736.
2008-01-02 13:00:46 +00:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
f988a7e600 Add new pkgplugindir handling to seperate plugins from libraries,
and allow override for binary distributions.  Extend mysql_config
to print compiled-in plugin location for third-party plugins to
use.  Resolves bug#31736.
2007-12-19 13:24:43 +00: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
joerg@debian.(none)
81930fc4bf Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1
into  debian.(none):/M51/merge-5.1
2007-06-01 12:59:06 +02:00
kent@mysql.com/kent-amd64.(none)
870b38b808 Makefile.am:
Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
2007-05-28 22:18:51 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
fc3b3a0a86 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-05-24 13:24:36 +03: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
serg@sergbook.mysql.com
31c1a1c9c3 fixed: memleak in --help, sigsegv on shutdown
Ingo's patch:
WL#2936 - Falcon & MySQL plugin interface: server variables
Added initialization for plugin string variables with their
default values.
Added deallocation of string values before a plugin and its
variables is deleted.
Added examples to plugin_example
2007-04-26 21:26:04 +02:00
istruewing@chilla.local
98ff6f0a95 WL#2936 - Falcon & MySQL plugin interface: server variables
Added initialization for the plugin structure created in
plugin_add().
Made a correct argument vector in mysql_install_plugin():
handle_options() assumes that arg0 (program name) always exists.
2007-04-24 10:40:23 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
cd75806b61 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1
2007-02-03 00:58:09 +02:00
monty@mysql.com/narttu.mysql.fi
25e481aed8 Fixed problems detected by pushbuild 2007-01-30 13:52:26 +02:00
monty@mysql.com/narttu.mysql.fi
1f6d91c5a6 after merge fixes
Removed
2007-01-29 16:13:18 +02:00
brian@zim.(none)
9d06ba72ea Made the example actually do something :)
It now demonstrates creating its own thread and shows off how to clean up after itself (creates a really simple heartbeat file)
2007-01-25 18:43:40 -08: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@mysql.com/kent-amd64.(none)
1e3237fefa Many files:
Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
baker@bk-internal.mysql.com
f175a892ab Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
2006-11-28 22:22:52 +01:00
monty@mysql.com/nosik.monty.fi
fa81a82e7f Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
2006-11-27 01:47:38 +02:00
brian@zim.(none)
f0c661f1ac Refactored a number of engines to have correct init/deinit. Added pass support for "data" from plugin to plugin generic init to use memory location. 2006-11-19 18:01:54 -08:00
brian@zim.(none)
739f2c27d0 This patch fixes the example engine, the example parser, and the example daemon to compile. AKA You can now test that the interface is actually working :) 2006-11-10 17:21:59 -08:00
brian@zim.(none)
faff46eefe Added license information display to output of plugins schema, and tagged all plugins with GPL flag. 2006-10-05 00:41:29 -07:00