Commit graph

23 commits

Author SHA1 Message Date
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Monty
a7e352b54d Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things:
- thd->db and thd->db_length
- TABLE_LIST tablename, db, alias and schema_name
- Audit plugin database name
- lex->db
- All db and table names in Alter_table_ctx
- st_select_lex db

Other things:
- Changed a lot of functions to take const LEX_CSTRING* as argument
  for db, table_name and alias. See init_one_table() as an example.
- Changed some function arguments from LEX_CSTRING to const LEX_CSTRING
- Changed some lists from LEX_STRING to LEX_CSTRING
- threads_mysql.result changed because process list_db wasn't always
  correctly updated
- New append_identifier() function that takes LEX_CSTRING* as arguments
- Added new element tmp_buff to Alter_table_ctx to separate temp name
  handling from temporary space
- Ensure we store the length after my_casedn_str() of table/db names
- Removed not used version of rename_table_in_stat_tables()
- Changed Natural_join_column::table_name and db_name() to never return
  NULL (used for print)
- thd->get_db() now returns db as a printable string (thd->db.str or "")
2018-01-30 21:33:55 +02:00
Sergei Golubchik
4749d40c63 5.5 merge 2013-06-06 17:51:28 +02:00
Vladislav Vaintroub
1d130cc697 Fix build on Windows 2013-04-25 15:11:59 +02:00
Sergei Golubchik
b9b3d5330a MDEV-260 auditing table accesses 2013-04-19 12:50:16 +02:00
Sergei Golubchik
775e82638b put status variables in the proper pluginname_ scope
(but support the scopeless mysql style too).
always output status/system variables in the correct lettercase
2013-04-09 23:27:33 +02:00
Sergei Golubchik
06365bf841 rename plugin null_audit -> audit_null (to match status variable names)
create audit_null.test
2012-11-07 19:07:47 +01:00
Vladislav Vaintroub
49d6568aae Reduce size of windows MSI by approx. 50%
- Mark test components, plugins etc with COMPONENT Test, to get them excluded from the MSI
- Only include debug symbols for client and embedded libs and also
  mysqld.exe and server plugins (so we can still can get a callstack in case of crash)

The rest (all *.pdbs, test components, MTR) can be obtained from the big ZIP distribution, if required.
2012-03-16 20:52:17 +01:00
Mats Kindahl
cf5e5f837a Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
Georgi Kodinov
ca57b15b42 Bug #12633140 : AUDIT PLUGIN SOURCE FILES HAVE OUT OF DATE
COPYRIGHT NOTICE

Fixed copyright headers of updated files.
2011-06-13 15:08:28 +03:00
Sergey Vojtovich
95963dd20a BUG#12611785 - AUDIT INTERFACE STRICT-ALIASING WARNINGS
The types mysql_event_general/mysql_event_connection are
being cast to the incompatible type mysql_event. The way
mysql_event and the other types are designed are prone to
strict aliasing violations and can break things depending
on how compilers optimizes this code.

This patch fixes audit interface, so it confirms to strict-
aliasing rules. It introduces incompatible changes to audit
interface:
- mysql_event type has been removed;
- event_class has been removed from mysql_event_generic and
  mysql_event_connection types;
- st_mysql_audit::event_notify() second argument is event_class;
- st_mysql_audit::event_notify() third argument is event of type
  (const void *).

"Writing Audit Plugins" section of manual should be updated:
http://dev.mysql.com/doc/refman/5.5/en/writing-audit-plugins.html

include/mysql/plugin_audit.h:
  event_class has been moved out of mysql_event types.
include/mysql/plugin_audit.h.pp:
  event_class has been moved out of mysql_event types.
plugin/audit_null/audit_null.c:
  event_class has been moved out of mysql_event types.
sql/sql_audit.cc:
  event_class has been moved out of mysql_event types.
2011-06-03 11:27:11 +04:00
Davi Arnaut
8664de2230 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.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
2010-11-20 12:47:50 -02:00
Alexander Nozdrin
8b645bed97 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Daniel Fischer
073943cd7d merge 2010-06-18 17:04:15 +02:00
Jonathan Perkin
f9101d98b7 Revert back to new CMake names for audit_null/daemon_example plugins. 2010-05-12 16:32:31 +01:00
Jonathan Perkin
ce2aabb712 Changes to build using CMake according to existing release packages:
- Update/fix file layouts for each package type, add new types for
   native package formats including deb, rpm and svr4.

 - Build all plugins, including debug versions

 - Update compiler flags to match current release

 - Add missing @VAR@ expansions

 - Install correct mysqclient library symlinks

 - Fix icc/ia64 builds

 - Fix install of libmysqld-debug

 - Don't include mysql_embedded

 - Remove unpackaged manual pages to avoid missing files warnings

 - Don't install mtr's test suite
2010-05-12 12:51:23 +01:00
Jonathan Perkin
559c23fde2 Build all plugins.
Try to fix ia64/icc builds.
2010-05-05 13:49:03 +02:00
Sergey Vojtovich
8e7939167d BUG#47059 - In audit plugin I cannot see the event subclasses,
e.g.MYSQL_AUDIT_GENERAL_ERROR

General audit API (MYSQL_AUDIT_GENERAL_CLASS) didn't expose event
subclass to plugins.

This patch exposes event subclass to plugins via
struct mysql_event_general::event_subclass.

This change is not compatible with existing general audit plugins.
Audit interface major version has been incremented.

include/mysql/plugin_audit.h:
  Expose event subclass to audit general plugins.
plugin/audit_null/audit_null.c:
  Added distinct counters for general event sub-classes.
  
  Removed printf() from deinit(). One can easily see number of
  calls via status variables.
  
  To make code nicer, modified class mask to use macro instead
  of hardcoded number.
  
  Incremented audit plugin minor version.
sql/sql_audit.cc:
  Expose event subclass to audit general plugins.
2010-04-15 13:05:17 +04:00
Vladislav Vaintroub
28a5ee8f05 add CMakeLists.txt to EXTRA_DIST for audit_null 2010-01-26 07:54:03 +01:00
Vladislav Vaintroub
9129685e51 merge, add plugin/audit_null/CMakeLists.txt 2010-01-26 05:39:48 +01:00
Sergey Vojtovich
45f2e0a7aa 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.

include/Makefile.am:
  wl3771
    add new headers to distribution
include/mysql/plugin.h:
  wl3771
    define new AUDIT plugin type
    Split out fulltext plugin type into its own header
include/mysql/plugin.h.pp:
  wl3771
    no real API change, just re-arranged some code
include/mysql/plugin_audit.h:
  wl3771
    pluggable audit interface
include/mysql/plugin_ftparser.h:
  wl3771
    Split out fulltext plugin type into its own header
libmysqld/CMakeLists.txt:
  wl3771
    add sql_audit.cc to build
libmysqld/Makefile.am:
  wl3771
    add sql_audit.cc to build
plugin/audit_null:
  wl3771
    an example plugin for testing pluggable audit interface
plugin/audit_null/Makefile.am:
  wl3771
    an example plugin for testing pluggable audit interface
plugin/audit_null/audit_null.c:
  wl3771
    an example plugin for testing pluggable audit interface
plugin/audit_null/plug.in:
  wl3771
    an example plugin for testing pluggable audit interface
sql/CMakeLists.txt:
  wl3771
    add sql_audit.cc to build
sql/Makefile.am:
  wl3771
    add sql_audit.cc to build
sql/event_queue.cc:
  wl3771
    release audit resources before waiting
sql/log.cc:
  wl3771
    add general audit call for log
sql/mysqld.cc:
  wl3771
    add audit initialize/finalize
    add general audit call for error
sql/sql_audit.cc:
  wl3771
    pluggable audit interface implementation
sql/sql_audit.h:
  wl3771
    pluggable audit interface implementation
sql/sql_class.cc:
  wl3771
    add thd audit init/deinit calls
sql/sql_class.h:
  wl3771
    add required data structures for audit to THD
sql/sql_connect.cc:
  wl3771
    release audit resources before waiting
sql/sql_insert.cc:
  wl3771
    release audit plugins before waiting
sql/sql_parse.cc:
  wl3771
    add general audit call for results
sql/sql_plugin.cc:
  wl3771
    add declarations for audit plugin type
2009-12-15 23:52:47 +04:00