Commit graph

17 commits

Author SHA1 Message Date
marko
68a1ee9960 branches/zip: Add some Doxygen comments for many structs, typedefs,
#defines and global variables.  Many are still missing.
2009-05-26 12:28:49 +00:00
marko
11ff89d994 branches/zip: Add @file comments, and convert decorative
/*********************************
comments to Doxygen /** style like this:
/*****************************//**

This conversion was performed by the following command:

perl -i -e 'while(<ARGV>){if (m|^/\*{30}\**$|) {
s|\*{4}$|//**| if ++$com>1; $_ .= "\@file $ARGV\n" if $com==2}
print; if(eof){$.=0;undef $com}}' */*[ch] include/univ.i
2009-05-25 09:52:29 +00:00
marko
d075e80c49 branches/zip: Split some long lines that were introduced in r5091. 2009-05-25 08:09:45 +00:00
marko
a45e6d2bae branches/zip: Adjust some function comments after r5091. 2009-05-25 05:54:17 +00:00
marko
e49dee377b branches/zip: Convert the function comments to Doxygen format.
This patch was created by running the following commands:

for i in */*[ch]; do doxygenify.pl $i; done
perl -i -pe 's#\*{3} \*/$#****/#' */*[ch]

where doxygenify.pl is
https://svn.innodb.com/svn/misc/trunk/tools/doxygenify.pl r510

Verified the consistency as follows:

(0) not too many /* in: */ or /* out: */ comments left in the code:
grep -l '/\*\s*\(in\|out\)[,:/]' */*[ch]

(1) no difference when ignoring blank lines, after stripping all
C90-style /* comments */, including multi-line ones, before and after
applying this patch:

perl -i -e 'undef $/;while(<ARGV>){s#/\*(.*?)\*/##gs;print}' */*[ch]
diff -I'^\s*$' --exclude .svn -ru TREE1 TREE2

(2) after stripping @return comments and !<, generated a diff and omitted
the hunks where /* out: */ function return comments were removed:

perl -i -e'undef $/;while(<ARGV>){s#!<##g;s#\n\@return\t.*?\*/# \*/#gs;print}'\
 */*[ch]
svn diff|
perl -e 'undef $/;$_=<>;s#\n-\s*/\* out[:,]([^\n]*?)(\n-[^\n]*?)*\*/##gs;print'

Some unintended changes were left.  These will be removed in a
subsequent patch.
2009-05-25 05:30:14 +00:00
marko
288a29458b branches/zip: Clean up some comments. 2009-05-20 10:06:59 +00:00
calvin
319f148e9c branches/zip: remove statically linked libraries from mysql
To make zlib and strings dynamically linked; mysqld will export
additional functions required by InnoDB.

Since the symbols will be resolved dynamically during runtime,
wdl_load_mapfile() is no longer able to make any function calls
to ones in mysqld. As the result, strtoull() (from strings.lib)
is replaced with _strtoui64().

rb://111

Approved by: Marko
2009-04-14 13:47:31 +00:00
calvin
6cf14ddda4 branches/zip: Mantis issue #201 - remove innodb_plugin_init() due to
new option --ignore_builtin_innodb

Starting 5.1.33, MySQL has a new option --ignore_builtin_innodb
for using the dynamic plugin. It is required to remove
innodb_plugin_init() in the plugin.

This patch removes innodb_plugin_init() as well as functions,
variables used by innodb_plugin_init().

rb://98

Approved by: Marko
2009-03-24 15:59:45 +00:00
vasil
8e11468b17 branches/zip:
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal

[Step 3/28]
2009-02-17 08:25:45 +00:00
marko
2f7bcc7d99 branches/zip: In hash table lookups, assert that the traversed items
satisfy some conditions when UNIV_DEBUG is defined.

HASH_SEARCH(): New parameter: ASSERTION. All users will pass an appropriate
ut_ad() or nothing.

dict_table_add_to_columns(): Assert that the table being added to the data
dictionary cache is not already being pointed to by the name_hash and
id_hash tables.

HASH_SEARCH_ALL(): New macro, for use in dict_table_add_to_columns().

dict_mem_table_free(): Set ut_d(table->cached = FALSE), so that we can
check ut_ad(table->cached) when traversing the hash tables, as in
HASH_SEARCH(name_hash, dict_sys->table_hash, ...) and
HASH_SEARCH(id_hash, dict_sys->table_id_hash, ...).

dict_table_get_low(), dict_table_get_on_id_low(): Assert
ut_ad(!table || table->cached).

fil_space_get_by_id(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(hash, fil_system->spaces, ...).

fil_space_get_by_name(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(name_hash, fil_system->name_hash, ...).

buf_buddy_block_free(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->zip_hash, ...).

buf_page_hash_get(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->page_hash, ...).

get_share(), free_share(): Check ut_ad(share->use_count > 0) in
HASH_SEARCH(table_name_hash, innobase_open_tables, ...).

This was posted as rb://75 for tracking down errors similar to Issue #153.
2009-01-13 19:46:22 +00:00
vasil
5bd71ba18b branches/zip:
Fix Mantis issue#130 wdl: does not handle 64-bit address

- Change the call from strtoul() to strtoull()
- Change "%16X" to "%16llx" when scanning preferred load address

rb://58

Submitted by:	Calvin
Approved by:	Marko
2008-11-27 21:26:39 +00:00
calvin
9b11f7d809 branches/zip: ignore the failure when builtin_innobase_plugin is not
available.

External variable builtin_innobase_plugin is not available when mysqld
does not have a builtin InnoDB. The init of the Windows plugin should
not fail in this case. 

Approved by:	Marko (on IM)
2008-11-04 07:15:26 +00:00
vasil
729ff1ad34 branches/zip:
Revert our temporary fix for "Bug#40360 Binlog related errors with binlog off"
(r2935, r2936) and deploy MySQL's one, but put the function
mysql_bin_log_is_engaged() inside mysql_addons.cc instead of in mysql's log.cc
and use a different name for it so there is no collision when MySQL adds this
function in log.cc.

[note from the future: the windows part of this patch went into r2947]

Approved by:	Marko (https://svn.innodb.com/rb/r/41/)
2008-10-31 07:44:16 +00:00
vasil
39b7e02a18 branches/zip:
Non-functional change: convert handler/handler0vars.h and
handler/win_delay_loader.cc from \r\n (dos) to \n (unix) line terminators.
2008-10-30 10:33:28 +00:00
vasil
69977f27fe branches/zip:
Followup to r2935: add the Windows Delay Loader stuff for the MySQL
variable that we are accessing. If someday we have another solution for
Bug#40360 Binlog related errors with binlog off
then this should also be reverted.
2008-10-30 10:24:09 +00:00
calvin
b7d0a7770a branches/zip: fix issue #102 - Windows plugin: resolve dbug functions
during run-time.

Implement wrapper functions in the plugin. The plugin will get the
function entries from mysqld.exe during the init, and invoke the
corresponding functions (in mysqld.exe). The list of functions are:

	_db_pargs_
	_db_doprnt_
	_db_enter_
	_db_return_
	_db_dump_

rb://38

Approved by:	Marko
2008-10-29 06:29:01 +00:00
calvin
fd6831625c branches/zip: implement the delayloading of externals for the plugin
on Windows, which includes:

 * Load mysqld.map and insert all symbol/address pairs into hash for
   quick access
 * Resolves all external data variables. The delayloading mechanism
   in MSVC does not support automatic imports of data variables.
   A workaround is to explicitly handle the data import using the delay
   loader during the initialization of the plugin.
 * Resolves all external functions during run-time, by implementing
   the delayed loading helper function delayLoadHelper2, which is
   called by run-time as well as HrLoadAllImportsForDll. 

The delay loader reuses the hash implementation in InnoDB. The normal
hash_create (in hash0hash.c) creates hash tables in buffer pool. But
the delay loader is invoked before the engine is initialized, and 
buffer pools are not ready yet. Instead, the delay loader has its own
implementation of hash_create() and hash_table_free(), called
wdl_hash_create() and wdl_hash_table_free().

This patch should be used with other two patches in order to build
a dynamically linked plugin on Windows:
 * patch for tmpfile functions (r2886)
 * patch for "build" files (to be committed)
 
The list of file changed:

handler/handler0vars.h: new file, defines a list of external data
variables (no external functions).

handler/win_delay_loader.cc: new file, the implementation of the delay
loader for Windows plugin.

handler/ha_innodb.cc: add a header file, and changes for copying the
system variables.

handler/handler0alter.cc: add a header file

handler/i_s.cc: add a header file

rb://27

Reviewed by:	Sunny, Marko
Approved by:	Sunny
2008-10-27 20:48:29 +00:00