Commit graph

912 commits

Author SHA1 Message Date
Ashish Agarwal
d75c58e11f WL#7076: Backporting wl6715 to support both formats
in 5.5, 5.6, 5.7.
2013-08-23 09:07:09 +05:30
Ashish Agarwal
f5b5e6b951 WL#7076: Backporting wl6715 to support both formats in 5.5, 5.6, 5.7
Backporting wl6715 to mysql-5.5
2013-07-02 11:58:39 +05:30
Murthy Narkedimilli
e36dbbab02 Correcting the permissions of the executable files. 2013-03-20 17:50:15 +01:00
Murthy Narkedimilli
d978016d93 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Bjorn Munch
556a508f4a mysql_client_test did not build within limbysqld/examples 2012-07-10 10:07:46 +02:00
Bjorn Munch
fcc53fa77c mysql_client_test did not build within limbysqld/examples 2012-07-10 10:04:57 +02:00
Mayank Prasad
ab60905887 BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLD
Merge : 5.1->5.5
2012-04-06 17:06:05 +05:30
Mayank Prasad
fccf669818 BUG#13738989 : 62136 : FAILED TO FETCH SELECT RESULT USING EMBEDDED MYSQLD
Background : 
In mysql-5.1, in a fix for bug#47485, code has been changed for 
mysql client (libmysql/libmysql.c) but corresponding code was not
changed for embedded mysql. In that code change, after execution
of a statement, mysql_stmt_store_result() checks for mysql->state
to be MYSQL_STATUS_STATEMENT_GET_RESULT, instead of
MYSQL_STATUS_GET_RESULT (earlier).

Reason:
In embedded mysql code, after execution, mysql->state was not
set to MYSQL_STATUS_STATEMENT_GET_RESULT, so it was throwing
OUT_OF_SYNC error.

Fix:
Fixed the code in libmysqld/lib_sql.cc to have mysql->state
to be set to MYSQL_STATUS_STATEMENT_GET_RESULT after execution.
2012-04-06 17:03:13 +05:30
MySQL Build Team
5734bae576 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
Kent Boortz
79535de206 Updated/added copyright headers 2012-02-15 17:21:38 +01:00
Tor Didriksen
d9b1886f92 Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS
handle_segfault is the signal handler code of mysqld.  however, it makes
calls to potentially unsafe functions localtime_r, fprintf, fflush.
2011-12-02 14:16:48 +01:00
Tor Didriksen
31aa2b6f3c Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS
handle_segfault is the signal handler code of mysqld.  however, it makes
calls to potentially unsafe functions localtime_r, fprintf, fflush.
2011-11-30 15:39:29 +01:00
Sunanda Menon
a31dc61865 #41836: Eventum Request to enable the mysql_embedded binary 2011-07-19 09:35:14 +02:00
Davi Arnaut
017281da24 Bug#12727287: Maintainer mode compilation fails with gcc 4.6
GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled
by -Wall, that causes GCC to emit a warning whenever a local variable
is assigned to, but otherwise unused (aside from its declaration).

Since the maintainer mode uses -Wall and -Werror, source code which
triggers these warnings will be rejected. That is, these warnings
become hard errors.

The solution is to fix the code which triggers these specific warnings.
In most of the cases, this is a welcome cleanup as code which triggers
this warning is probably dead anyway.
2011-07-07 08:22:43 -03: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
Mayank Prasad
55d3381cc7 Bug#11764633 : 57491: THD->MAIN_DA.IS_OK() ASSERT IN EMBEDDED
Issue:
While running embedded server, if client issues TEE command (\T foo/bar) and
"foo/bar" directory doesn't exist, it is suppose to give error. But it was
aborting.  This was happening because wrong error handler was being called.

Solution:
Modified calls to correct error handler. In embedded server case, there are 
two error handler (client and server) which are supposed to be called based 
on which context code is in. If it is in client context, client error handler
should be called otherwise server.

Test case:
Test case automation is not possible as current (following) code doesn't 
allow '\T' to be executed from command line (OR command read from a file):
[client/mysql.cc]
...
 static int
 com_tee(String *buffer __attribute__((unused)),
         char *line __attribute__((unused)))
 {
   char file_name[FN_REFLEN], *end, *param;

   if (status.batch) << THIS IS TRUE WHILE EXECUTING FROM COMMAND LINE.
      return 0;
 ...
So, not adding test case in GA. WIll add a test case in mysql-trunk after 
removing above code so that this could be properly tested before GA.
2011-05-18 20:10:01 +05:30
Kent Boortz
0f03af653c Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Mayank Prasad
061983f9f3 BUG#12561297:LIBMYSQLD/EXAMPLE/MYSQL_EMBEDDED IS ABORTING.
Issue:
When libmysqld/example/mysql_embedded is executed, it was getting abort. Its a
regression as it was working in 5.1 and failed in 5.5. Issue is there because 
remaining_argc/remaining_argv were not getting assigned correctly in 
init_embedded_server() which were being used later in init_common_variable().

Solution:
Rectified code to pass correct argc/argv to be used in init_common_variable().
2011-06-14 00:11:24 +05:30
Mayank Prasad
359549beab merge from 5.1 for bug#11764633 2011-05-18 19:47:29 +05:30
Kent Boortz
94cde4c951 Merge 2010-12-29 01:26:31 +01:00
Kent Boortz
920d185fd8 Merge 2010-12-29 00:47:05 +01:00
Kent Boortz
fddb1f1b13 - Added/updated copyright headers
- Removed files specific to compiling on OS/2
- Removed files specific to SCO Unix packaging
- Removed "libmysqld/copyright", text is included in documentation
- Removed LaTeX headers for NDB Doxygen documentation
- Removed obsolete NDB files
- Removed "mkisofs" binaries
- Removed the "cvs2cl.pl" script
- Changed a few GPL texts to use "program" instead of "library"
2010-12-28 19:57:23 +01:00
Magnus Blåudd
b3f9f0c388 Merge 5.5-bug58158 into 5.5-bugteam 2010-11-24 11:49:10 +01:00
Davi Arnaut
f6deb00a56 WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.
2010-11-20 12:47:50 -02:00
Magnus Blåudd
fb140a87d3 Bug#58158 LINK_LIBRARIES for MYSQL_ADD_PLUGIN is not added to libmysqld
- Add ARG_LINK_LIBRARIES to MYSQLD_STATIC_PLUGIN_LIBS in
    MYSQL_ADD_PLUGIN so that any libraries listed by the plugin is
    added to libmysqld
  - remove the variables NDB_CLIENT_LIBS and NDB_CLUSTER_INCLUDES
    from libmysqld/CMakeLists.txt since those are just old remnants
2010-11-16 10:05:54 +01:00
Mats Kindahl
d817b7cb8a BUG#57108: mysqld crashes when I attempt to install plugin
If a relative path is supplied to option --defaults-file or
--defaults-extra-file, the server will crash when executing
an INSTALL PLUGIN command. The reason is that the defaults
file is initially read relative the current working directory
when the server is started, but when INSTALL PLUGIN is executed,
the server has changed working directory to the data directory.
Since there is no check that the call to my_load_defaults()
inside mysql_install_plugin(), the subsequence call to
free_defaults() will crash the server.

This patch fixes the problem by:

- Prepending the current working directory to the file name when
  a relative path is given to the --defaults-file or --defaults-
  extra-file option the first time my_load_defaults() is called,
  which is just after the server has started in main().

- Adding a check of the return value of my_load_defaults() inside
  mysql_install_plugin() and aborting command (with an error) if
  an error is returned.

- It also adds a check of the return value for load_defaults in
  lib_sql.cc for the embedded server since that was missing.

To test that the relative files for the options --defaults-file and
--defaults-extra-file is handled properly, mysql-test-run.pl is also
changed to not add a --defaults-file option if one is provided in the
tests *.opt file.
2010-11-04 11:00:59 +01:00
Georgi Kodinov
dd2e3db48f merge 2010-10-04 15:42:16 +03:00
Georgi Kodinov
dc0b8f7ada merge of mysql-5.5 into mysql-5.5-wl1054 2010-09-20 17:17:32 +03:00
Alexey Botchkov
3886c3a46d Bug#53251 mysql_library_init fails on second execution with embedded library
thread-specific variables weren't set when we load error message files.

per-file comments:
  libmysqld/lib_sql.cc
Bug#53251      mysql_library_init fails on second execution with embedded library
      we need to call my_thread_init() once more. Normally it's called at the my_init()
      stage but that doesn't happen on the second my_init() call.

  sql/derror.cc
Bug#53251      mysql_library_init fails on second execution with embedded library
     use default errors for the embedded server.

  sql/mysqld.cc
Bug#53251      mysql_library_init fails on second execution with embedded library
        unregister server errors in clean_up(). Without it the error list contains
        that on the second mysql_server_init() which is not good.

  sql/set_var.cc
Bug#53251      mysql_library_init fails on second execution with embedded library
        sys_var::cleanup() call instead of the destructor

  sql/set_var.h
Bug#53251      mysql_library_init fails on second execution with embedded library
        sys_var::cleanup() introduced instead of the destructor
        
  sql/sys_vars.h
Bug#53251      mysql_library_init fails on second execution with embedded library
        Sys_var_charptr::cleanup() implemented
2010-09-02 23:37:04 +05:00
Alexey Botchkov
a334004420 Bug#54906 Inconsistent license of libmysqld
made libmysqld/Makefile.am to have same licence as libmysqld/CMakeLists.txt

per-file comments:
  libmysqld/Makefile.am
Bug#54906      Inconsistent license of libmysqld
        Added GPL license header instead of Library GPL.
2010-09-01 08:38:53 +05:00
Jon Olav Hauglid
5139bf6c8f Manual merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-08-18 13:29:04 +02:00
Georgi Kodinov
5c81e2cf16 merged mysql-5.5 into WL1054-5.5 2010-08-16 18:16:07 +03:00
Mattias Jonsson
1be8280b84 merge 2010-08-16 16:27:25 +02:00
Mattias Jonsson
2b2c7ae6de Rename of sql_alter_table -> sql_alter and sql_table_maintenance -> sql_admin 2010-08-16 16:25:23 +02:00
Mattias Jonsson
7641dd7b4b merge 2010-08-16 14:58:38 +02:00
Mattias Jonsson
25ae81f133 Bug#49907: ALTER TABLE ... TRUNCATE PARTITION does not wait for
locks on the table

Fixing the partitioning specifics after TRUNCATE TABLE in
bug-42643 was fixed.

Reorganize of code to decrease the size of the giant switch
in mysql_execute_command, and to prepare for future parser
reengineering. Moved code into Sql_statement objects.

Updated patch according to davi's review comments.
2010-08-16 14:53:30 +02:00
Konstantin Osipov
4e935a5329 Extract reload_acl_and_cache() and flush_tables_with_read_lock()
into an own implementation file.
2010-08-13 13:51:48 +04:00
Alexander Nozdrin
13ec2a1625 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Georgi Kodinov
881a76699e WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Davi Arnaut
e83f1d37c4 WL#5498: Remove dead and unused source code
Remove unused source code and associated paraphernalia.
2010-07-23 17:14:35 -03:00
Ramil Kalimullin
2ae6d370a9 Automerge. 2010-07-16 12:43:17 +04:00
Ramil Kalimullin
a9b8eb4255 Fix for bug #50667: The InnoDB plugin prevents initialization
of the "embedded" server

Problem: mysqltest_embedded failed to load ha_innodb_plugin library
on some platforms (due to some unresolved references).

Fix: on FreeBSD use -export-dynamic flag building mysqltest_embedded.
That allows to use its global symbols to resolve references in the
dynamically loaded plugin library.
2010-07-16 11:15:22 +04:00
Davi Arnaut
8fcaea9afb WL#5486: Remove code for unsupported platforms
Restore hack necessary to setup a libmysqld archive.
2010-07-15 15:44:15 -03:00
Davi Arnaut
8df20918d6 WL#5486: Remove code for unsupported platforms
Remove OS/2 specific code.
2010-07-15 08:33:27 -03:00
Davi Arnaut
b3d22cef93 WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
2010-07-15 08:16:06 -03:00
Davi Arnaut
f54a118249 WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
a10ae35328 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
2010-07-08 18:20:08 -03:00