Skip to content

Commit

Permalink
Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mdev9864
Browse files Browse the repository at this point in the history
  • Loading branch information
igorbabaev committed Aug 31, 2016
2 parents 2250e9e + 1eb58ff commit f11e892
Show file tree
Hide file tree
Showing 42 changed files with 3,406 additions and 220 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)

INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.LESSER COPYING.thirdparty
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.LESSER COPYING.thirdparty
EXCEPTIONS-CLIENT COMPONENT Readme)
# MDEV-6526 these files are not installed anymore
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
Expand Down
17 changes: 16 additions & 1 deletion README → README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## MariaDB: drop-in replacement for MySQL

MariaDB is designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.

Expand All @@ -24,10 +26,17 @@ https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
As MariaDB is a full replacement of MySQL, the MySQL manual at
http://dev.mysql.com/doc is generally applicable.

Help:
-----

More help is available from the Maria Discuss mailing list
https://launchpad.net/~maria-discuss
and the #maria IRC channel on Freenode.


License:
--------

***************************************************************************

NOTE:
Expand All @@ -42,7 +51,8 @@ and COPYING.thirdparty files.

***************************************************************************

IMPORTANT:
Bug Reports:
------------

Bug and/or error reports regarding MariaDB should be submitted at
http://mariadb.org/jira
Expand All @@ -53,3 +63,8 @@ The code for MariaDB, including all revision history, can be found at:
https://github.com/MariaDB/server

***************************************************************************

Code status:
------------

* [![tests status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.2)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.2 branch)
2 changes: 1 addition & 1 deletion debian/mariadb-client-10.2.docs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
debian/additions/innotop/changelog.innotop
README
README.md
10 changes: 10 additions & 0 deletions include/mysql.h.pp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@
MYSQL_OPTION_MULTI_STATEMENTS_ON,
MYSQL_OPTION_MULTI_STATEMENTS_OFF
};
enum enum_session_state_type
{
SESSION_TRACK_SYSTEM_VARIABLES,
SESSION_TRACK_SCHEMA,
SESSION_TRACK_STATE_CHANGE,
SESSION_TRACK_GTIDS,
SESSION_TRACK_TRANSACTION_CHARACTERISTICS,
SESSION_TRACK_TRANSACTION_STATE,
SESSION_TRACK_always_at_the_end
};
my_bool my_net_init(NET *net, Vio* vio, void *thd, unsigned int my_flags);
void my_net_local_init(NET *net);
void net_end(NET *net);
Expand Down
47 changes: 46 additions & 1 deletion include/mysql_com.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
#define INDEX_COMMENT_MAXLEN 1024
#define TABLE_PARTITION_COMMENT_MAXLEN 1024

/*
Maximum length of protocol packet.
OK packet length limit also restricted to this value as any length greater
than this value will have first byte of OK packet to be 254 thus does not
provide a means to identify if this is OK or EOF packet.
*/
#define MAX_PACKET_LENGTH (256L*256L*256L-1)

/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
username and hostname parts of the user identifier with trailing zero in
Expand Down Expand Up @@ -221,6 +229,14 @@ enum enum_server_command
/* Don't close the connection for a connection with expired password. */
#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)

/**
Capable of handling server state change information. Its a hint to the
server to include the state change information in Ok packet.
*/
#define CLIENT_SESSION_TRACK (1UL << 23)
/* Client no longer needs EOF packet */
#define CLIENT_DEPRECATE_EOF (1UL << 24)

#define CLIENT_PROGRESS_OBSOLETE (1UL << 29)
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
/*
Expand Down Expand Up @@ -276,6 +292,8 @@ enum enum_server_command
MARIADB_CLIENT_PROGRESS | \
CLIENT_PLUGIN_AUTH | \
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \
CLIENT_SESSION_TRACK |\
CLIENT_DEPRECATE_EOF |\
CLIENT_CONNECT_ATTRS |\
MARIADB_CLIENT_COM_MULTI)

Expand Down Expand Up @@ -340,6 +358,11 @@ enum enum_server_command
*/
#define SERVER_STATUS_IN_TRANS_READONLY 8192

/**
This status flag, when on, implies that one of the state information has
changed on the server because of the execution of the last statement.
*/
#define SERVER_SESSION_STATE_CHANGED (1UL << 14)

/**
Server status flags that must be cleared when starting
Expand All @@ -356,7 +379,8 @@ enum enum_server_command
SERVER_QUERY_WAS_SLOW |\
SERVER_STATUS_DB_DROPPED |\
SERVER_STATUS_CURSOR_EXISTS|\
SERVER_STATUS_LAST_ROW_SENT)
SERVER_STATUS_LAST_ROW_SENT|\
SERVER_SESSION_STATE_CHANGED)

#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */
Expand Down Expand Up @@ -523,6 +547,26 @@ enum enum_mysql_set_option
MYSQL_OPTION_MULTI_STATEMENTS_OFF
};

/*
Type of state change information that the server can include in the Ok
packet.
*/
enum enum_session_state_type
{
SESSION_TRACK_SYSTEM_VARIABLES, /* Session system variables */
SESSION_TRACK_SCHEMA, /* Current schema */
SESSION_TRACK_STATE_CHANGE, /* track session state changes */
SESSION_TRACK_GTIDS,
SESSION_TRACK_TRANSACTION_CHARACTERISTICS, /* Transaction chistics */
SESSION_TRACK_TRANSACTION_STATE, /* Transaction state */
SESSION_TRACK_always_at_the_end /* must be last */
};

#define SESSION_TRACK_BEGIN SESSION_TRACK_SYSTEM_VARIABLES

#define IS_SESSION_STATE_TYPE(T) \
(((int)(T) >= SESSION_TRACK_BEGIN) && ((T) < SESSION_TRACK_always_at_the_end))

#define net_new_transaction(net) ((net)->pkt_nr=0)

#ifdef __cplusplus
Expand Down Expand Up @@ -641,6 +685,7 @@ my_ulonglong net_field_length_ll(uchar **packet);
my_ulonglong safe_net_field_length_ll(uchar **packet, size_t packet_len);
uchar *net_store_length(uchar *pkg, ulonglong length);
uchar *safe_net_store_length(uchar *pkg, size_t pkg_len, ulonglong length);
unsigned int net_length_size(ulonglong num);
#endif

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions libmysqld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_windowfunc.cc ../sql/sql_window.cc
../sql/sql_cte.cc
../sql/temporary_tables.cc
../sql/session_tracker.cc
${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE}
)
Expand Down
2 changes: 1 addition & 1 deletion libmysqld/lib_sql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ bool
net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message,
bool unused __attribute__((unused)))
bool, bool)
{
DBUG_ENTER("emb_net_send_ok");
MYSQL_DATA *data;
Expand Down
14 changes: 7 additions & 7 deletions mysql-test/r/mysqld--help,win.rdiff
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
+ --shared-memory Enable the shared memory
+ --shared-memory-base-name=name
+ Base name of shared memory
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
--session-track-schema
Track changes to the default schema.
(Defaults to on; use --skip-session-track-schema to disable.)
@@ -1015,6 +1018,10 @@
Log slow queries to given log file. Defaults logging to
'hostname'-slow.log. Must be enabled to activate other
Expand Down Expand Up @@ -103,12 +103,12 @@
@@ -1387,6 +1381,8 @@
secure-auth TRUE
secure-file-priv (No default value)
server-id 0
server-id 1
+shared-memory FALSE
+shared-memory-base-name MYSQL
show-slave-auth-info FALSE
silent-startup FALSE
skip-grant-tables TRUE
session-track-schema TRUE
session-track-state-change FALSE
session-track-system-variables
@@ -1411,6 +1407,7 @@
slave-type-conversions
slow-launch-time 2
Expand Down
24 changes: 24 additions & 0 deletions mysql-test/r/mysqld--help.result
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,26 @@ The following options may be given as the first argument:
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
--session-track-schema
Track changes to the default schema.
(Defaults to on; use --skip-session-track-schema to disable.)
--session-track-state-change
Track changes to the session state.
--session-track-system-variables=name
Track changes in registered system variables. For
compatibility with MySQL defaults this variable should be
set to "autocommit, character_set_client,
character_set_connection, character_set_results,
time_zone"
--session-track-transaction-info=name
Track changes to the transaction attributes. OFF to
disable; STATE to track just transaction state (Is there
an active transaction? Does it have any data? etc.);
CHARACTERISTICS to track transaction state and report all
statements needed to start a transaction withthe same
characteristics (isolation level, read only/read
write,snapshot - but not any work done / data modified
within the transaction).
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
Expand Down Expand Up @@ -1392,6 +1412,10 @@ safe-user-create FALSE
secure-auth TRUE
secure-file-priv (No default value)
server-id 1
session-track-schema TRUE
session-track-state-change FALSE
session-track-system-variables
session-track-transaction-info OFF
show-slave-auth-info FALSE
silent-startup FALSE
skip-grant-tables TRUE
Expand Down
Loading

0 comments on commit f11e892

Please sign in to comment.