now mysql_server_init is called from mysql_init with fake parameters
mysql_once_init code included to mysql_server_init.
embedded-specific initialization is in init_embedded_server function
Cleaned up (and disabled part of) date/time/datetime format patch. One can't anymore change default read/write date/time/formats.
This is becasue the non standard datetime formats can't be compared as strings and MySQL does still a lot of datetime comparisons as strings
Changed flag argument to str_to_TIME() and get_date() from bool to uint
Removed THD from str_to_xxxx functions and Item class.
Fixed core dump when doing --print-defaults
Move some common string functions to strfunc.cc
Dates as strings are now of type my_charset_bin instead of default_charset()
Introduce IDENT_QUOTED to not have to create an extra copy of simple identifiers (all chars < 128)
Removed xxx_FORMAT_TYPE enums and replaced them with the old TIMESTAMP_xxx enums
Renamed some TIMESTAMP_xxx enums to more appropriate names
Use defines instead of integers for date/time/datetime string lengths
Added to build system and use the new my_strtoll10() function.
handling of init-file option added to embedded library
main problem was killing of output (resulting recordsets etc)
i added checks for empty output in Protocol:: methods
better solution could be special Protocol_nul class to redirect
results to nowhere
WL#604 Privileges in embedded library
code added to check privileges in embedded library
NO_EMBEDDED_ACCESS_CHECKS macros inserted in code so we can exclude
access-checking parts. Actually we now can exclude these parts from
standalone server as well. Do we need it?
Access checks are disabled in embedded server by default. One should
edit libmysqld/Makefile manually to get this working.
We definitely need the separate configure for embedded server
null_string wasn't known in libmysqld/lib_sql.cc, that caused compiler's error
i put the declaration of the null_string in mysql_priv.h and renamed it
to my_null_string to reduce the probability of name's intersections
embedded library
some dirty places cleaned:
uint removed from mysql.h as Miguel suggested
empty_string renamed as my_empty_string to get rid of name's intersections
using embedded library
embedded library
I decided to get rid of #define mysql_some_function in mysql.h
It puzzles users and makes problems with dynamic libraries
Finally, there are only two functions left, that are covered with
the #define-s and it won't hurt performance at all
Prepared statements in embedded server
Several changes in library code with two goals:
to make mysql_prepare_stmt working in embedded server
to get rid of #define mysql_interface_func mysql->methods->interface_func
in user's interface
- removed "-traditional-cpp" from the darwin6 compile flags, as it broke
compilation with gcc-3.3 on Mac OS X and does not seem to be required
in general.
- make sure to link libmysqld/examples/mysqltest.c with a C++ compiler,
as the embedded server library (libmysqld.a) includes C++ code. This
broke compilation with non-gcc compilers.
mysql_fetch_length fixed for embedded library. Now data length is stored
before the data. Pointers in row still points to the data so you have to
get *(uint*)(data_ptr - sizeof(uint)) to get data length
client capabilities included into libmysqld
some API methods became "virtual"
lots of duplicated code removed
IMHO all the above made library's code way more pleasant to look at, didn't it?
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
symbol in libmysqlclient) (thanks to Dennis Haney for the initial patch)
- cleanup: removed client/password.c (not used at all) and
libmysql/password.c (should rather be a symlink to sql/password.c instead)
- applied HPUX11 portability fix for char_val declaration to sql/password.c
(taken from libmysql/password.c)
Portability fixes
Added new client function: mysql_get_server_version()
New server help code (From Victor Vagin)
Fixed wrong usage of binary()
Disabled RTREE usage for now.
MIN(key_column) could in some cases return NULL on a column with NULL and other values.
MIN(key_column) and MAX(key_column) could in some cases return wrong values when used in OUTER JOIN.
Don't use new password format if mysql.user has old format
tables_priv was not reset on FLUSH PRIVILEGES if tables_priv was empty
Portability fixes for Windows
Class for sending data from server to client (Protocol)
This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.
Made keybuff_size longlong (To make show variables work similar on 32
and 64 bit systems)
Fixed some 'not initalized variable errors' in multi-table-update.
Fixed memory leak in multi-table-update.
Now all tests works under valgrind without any errors.
Fixed reference to freed memory in acl_init()/grant_init()
Fixed possible memory leak. (Could only happen in very strange circumstances)
Fixed bug in ALTER TABLE with BDB tables
Updated mysql-test for valgrind
Warning handling and initial prepared statement handling (last not complete yet)
Changed a lot of functions that returned 0/1 to my_bool type.
GRANT handling now uses read/write locks instead of mutex
Change basic net functions to use THD instead of NET
(needed for 4.1 protocol)
Use my_sprintf instead of sprintf() + strlen()
Added alloc_query() to be able to chare query initialization code with
prepared statements.
Cleanup handling of SHOW COUNT(*) WARNINGS and SELECT LAST_INSERT_ID()
Note that the following test fails (will be fixed ASAP):
sub_select, union, rpl_rotate_logs and rpl_mystery22
Fixed bug in SELECT ... ORDER BY ... LIMIT
Fixed bug in ALTER TABLE and RENAME TABLE with --lower-case-table-names
Fixed hang when using --with-openssl
Fixed that GRANT ... REQUIRE options are not forgot when doing new GRANT
Changed fn_ext to point at first '.' after directory.
FLUSH LOGS removed numerical extension for all future update logs.
Fixed the mysqld --help reports right values for --datadir and --bind-address
--log-binary=a.b.c now properly strips of .b.c
Fix that one can DROP UDF functions that was not loaded at startup
Made AND optional in REQUIRE
Added REQUIRE NONE
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
Changed option variables to my_bool (to avoid bugs in my_getopt())
Added new thread specific mutex LOCK_delete to be able to free LOCK_thread_count early.
Changed usage of LOCK_thread_count -> LOCK_status for statistics variables
Fixed bugs in my last changeset that made MySQL hard to compile.
Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables.
Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions
Extended my_chsize() to allow one to specify a filler character.
Extend vio_blocking to return the old state (This made some usage of this function much simpler)
Added testing for some functions that they caller have got the required mutexes before calling the function.
Use setrlimit() to ensure that we can write core file if one specifies --core-file.
Added --slave-compressed-protocol
Made 2 the minimum length for ft_min_word_len
Added variables foreign_key_checks & unique_checks.
Less logging from replication code (if not started with --log-warnings)
Changed that SHOW INNODB STATUS requre the SUPER privilege
More DBUG statements and a lot of new code comments
New fields in CHARSET_INFO for more nice SHOW CHARACTER SET
Dynamic charsets are now handled in faster way
SHOW CHARACTER SET now displays not only compiled charsets but dynamic charsets too
Made a some new buffers thread specific and changeable.
Resize of key_buffer.
AUTO_COMMIT -> AUTOCOMMIT
Fixed mutex bug in DROP DATABASE
Fixed bug when using auto_increment as second part of a key where first part could include NULL.
Split handler->extra() to extra() and extra_opt() to be able to support thread specific buffers.
Don't write message to error log when slave reconnects becasue of timeout.
Fixed possible update problem when using DELETE/UPDATE on small tables
(In some cases we used index even if table scanning would be better)
A lot of minior code cleanups
Added statistics information for alarms (for bug tracking)
Don't store "incomplete" in the xxx.cfg file if we are not using --restart. (Crash-me)
Enlarged STACK_BUF_ALLOC becasue of failed crash-me test
Aded new script mysql_tableinfo to make a system directory.
fixed too quick timeout in mysql-test-run which caused a race with the
new server getting started before the old one completely finished
shutdown. This should fix the pid warning we've been getting as well as
inconsistent results when running tests with the manager
first pull, merge,test, and get it to work.
The main change is the new replication code - now we have two slave threads
SQL thread and I/O thread. I have also re-written a lot of the code to
prepare for multi-master implementation.
I also documented IO_CACHE quite extensively and to some extend, THD class.
Fixes for building MySQL with gcc 3.0
Added SIGNED / UNSIGNED casts
Fixed core dump bug in net_clear() with libmysqld.
Back to using semaphores in query cache.
Added 'Null' and 'Index_type' to SHOW INDEX.
One more notice:
limiting number of queries per hour for different users has been done
on 4.0.1 , but I can port it to 3.23.*
This will require only certain changes, like number of columns in user
table.
I will also make a test case for it, after it is approved by Monty,
as result file will depend on the error message text.
* multi-table updates
* new paid feature for limiting number of queries per hour for users
* optional syntax for multi-table deletes
* optimization for SQL_CALC_FOUND_ROWS
* a small addition for CREATE .. SELECT that will be of future use
I know that all this will require many additions to documentation,
which I have not done, but I am at Arjen's disposal to help him document
all this.
This wrapper noew will include all the necessary, system specific files,
which makes all normal source files much easier to write and maintain.
Portability fixes.
Speed up column-completion in 'mysql'
Don't use ISAM if HAVE_ISAM is not defined
A lot of fixes for the embedded version. All libraries are now included in libmysqld.a
Changed arguments to convert_dirname() to make it more general.
Renamed files in the 'merge' directory to all use a common prefix.
Don't compile both assembler and C functions on x86
Fixes for embedded server
Made key_cache more configurable
Fixed that one can change key blocksize in MyISAM
A lot of optimizations to make MyISAM slightly faster
mysql test suite.
A few minor libmysqld fixes.
Add mysql_server_init() and _end() to mysql.cc and mysqltest.c, so they
can be linked against libmysqlclient or libmysqld.
There is now a mysql_server_init() function which needs to be
called at the beginning of the program (and _end() for the end
of the program). This routine handles argument parsing for the
embedded server.
Use the embedded version of mysql_load_file() (ignore the LOCAL
argument, since the client and server are the same program).
There are now mysql_thread_init/end() functions for the client
to use in a multi-threaded app. They are just wrappers for
my_thread_init/end().