mariadb/storage/connect/myconn.cpp

910 lines
30 KiB
C++
Raw Normal View History

/************** MyConn C++ Program Source Code File (.CPP) **************/
/* PROGRAM NAME: MYCONN */
/* ------------- */
/* Version 1.8 */
/* */
/* COPYRIGHT: */
/* ---------- */
/* (C) Copyright to the author Olivier BERTRAND 2007-2014 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
/* Implements a connection to MySQL. */
/* It can optionally use the embedded MySQL library. */
/* */
/* WHAT YOU NEED TO COMPILE THIS PROGRAM: */
/* -------------------------------------- */
/* */
/* REQUIRED FILES: */
/* --------------- */
/* MYCONN.CPP - Source code */
/* MYCONN.H - MYCONN class declaration file */
/* GLOBAL.H - Global declaration file */
/* */
/* REQUIRED LIBRARIES: */
/* ------------------- */
/* Large model C library */
/* */
/* REQUIRED PROGRAMS: */
/* ------------------ */
/* IBM, Borland, GNU or Microsoft C++ Compiler and Linker */
/* */
/************************************************************************/
#include "my_global.h"
#if defined(WIN32)
//#include <windows.h>
#else // !WIN32
#include "osutil.h"
#endif // !WIN32
#include "global.h"
#include "plgdbsem.h"
#include "plgcnx.h" // For DB types
#include "resource.h"
//#include "value.h"
#include "valblk.h"
#define DLL_EXPORT // Items are exported from this DLL
#include "myconn.h"
extern "C" int trace;
extern "C" int zconv;
extern MYSQL_PLUGIN_IMPORT uint mysqld_port;
extern MYSQL_PLUGIN_IMPORT char *mysqld_unix_port;
DllExport void PushWarning(PGLOBAL, THD*, int level = 1);
// Returns the current used port
uint GetDefaultPort(void)
{
return mysqld_port;
} // end of GetDefaultPort
/************************************************************************/
/* MyColumns: constructs the result blocks containing all columns */
/* of a MySQL table or view. */
/* info = TRUE to get catalog column informations. */
/************************************************************************/
PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
const char *user, const char *pwd,
const char *table, const char *colpat,
int port, bool info)
{
int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING, TYPE_INT,
TYPE_STRING, TYPE_SHORT, TYPE_SHORT, TYPE_SHORT,
TYPE_STRING, TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING};
XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME, FLD_PREC,
FLD_KEY, FLD_SCALE, FLD_RADIX, FLD_NULL,
FLD_REM, FLD_NO, FLD_DEFAULT, FLD_EXTRA,
FLD_CHARSET};
unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0};
char *fld, *colname, *chset, *fmt, v, cmd[128], uns[16], zero[16];
int i, n, nf, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec, rc, k = 0;
PQRYRES qrp;
PCOLRES crp;
MYSQLC myc;
if (!port)
port = mysqld_port;
if (!info) {
/********************************************************************/
/* Open the connection with the MySQL server. */
/********************************************************************/
if (myc.Open(g, host, db, user, pwd, port))
return NULL;
/********************************************************************/
/* Do an evaluation of the result size. */
/********************************************************************/
sprintf(cmd, "SHOW FULL COLUMNS FROM %s", table);
strcat(strcat(cmd, " FROM "), (db) ? db : PlgGetUser(g)->DBName);
if (colpat)
strcat(strcat(cmd, " LIKE "), colpat);
if (trace)
htrc("MyColumns: cmd='%s'\n", cmd);
if ((n = myc.GetResultSize(g, cmd)) < 0) {
myc.Close();
return NULL;
} // endif n
/********************************************************************/
/* Get the size of the name and default columns. */
/********************************************************************/
length[0] = myc.GetFieldLength(0);
// length[10] = myc.GetFieldLength(5);
} else {
n = 0;
length[0] = 128;
} // endif info
/**********************************************************************/
/* Allocate the structures used to refer to the result set. */
/**********************************************************************/
if (!(qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3,
buftyp, fldtyp, length, false, true)))
return NULL;
// Some columns must be renamed
for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next)
switch (++i) {
case 2: crp->Nulls = (char*)PlugSubAlloc(g, NULL, n); break;
case 4: crp->Name = "Length"; break;
case 5: crp->Name = "Key"; break;
case 10: crp->Name = "Date_fmt"; break;
case 11: crp->Name = "Default"; break;
case 12: crp->Name = "Extra"; break;
case 13: crp->Name = "Collation"; break;
} // endswitch i
if (info)
return qrp;
/**********************************************************************/
/* Now get the results into blocks. */
/**********************************************************************/
for (i = 0; i < n; /*i++*/) {
if ((rc = myc.Fetch(g, -1)) == RC_FX) {
myc.Close();
return NULL;
} else if (rc == RC_EF)
break;
// Get column name
colname = myc.GetCharField(0);
crp = qrp->Colresp; // Column_Name
crp->Kdata->SetValue(colname, i);
// Get type, type name, precision, unsigned and zerofill
chset = myc.GetCharField(2);
fld = myc.GetCharField(1);
prec = 0;
len = 0;
v = (chset && !strcmp(chset, "binary")) ? 'B' : 0;
*uns = 0;
*zero = 0;
switch ((nf = sscanf(fld, "%[^(](%d,%d", cmd, &len, &prec))) {
case 3:
nf = sscanf(fld, "%[^(](%d,%d) %s %s", cmd, &len, &prec, uns, zero);
break;
case 2:
nf = sscanf(fld, "%[^(](%d) %s %s", cmd, &len, uns, zero) + 1;
break;
case 1:
nf = sscanf(fld, "%s %s %s", cmd, uns, zero) + 2;
break;
default:
sprintf(g->Message, MSG(BAD_FIELD_TYPE), fld);
myc.Close();
return NULL;
} // endswitch nf
if ((type = MYSQLtoPLG(cmd, &v)) == TYPE_ERROR) {
if (v == 'K') {
// Skip this column
sprintf(g->Message, "Column %s skipped (unsupported type %s)",
colname, cmd);
PushWarning(g, thd);
continue;
} // endif v
sprintf(g->Message, "Column %s unsupported type %s", colname, cmd);
myc.Close();
return NULL;
} else if (type == TYPE_STRING) {
if (v == 'X') {
len = zconv;
sprintf(g->Message, "Column %s converted to varchar(%d)",
colname, len);
PushWarning(g, thd);
v = 'V';
} else
len = min(len, 4096);
} // endif type
qrp->Nblin++;
crp = crp->Next; // Data_Type
crp->Kdata->SetValue(type, i);
switch (nf) {
case 5: crp->Nulls[i] = 'Z'; break;
case 4: crp->Nulls[i] = 'U'; break;
default: crp->Nulls[i] = v; break;
} // endswitch nf
crp = crp->Next; // Type_Name
crp->Kdata->SetValue(cmd, i);
if (type == TYPE_DATE) {
// When creating tables we do need info about date columns
fmt = MyDateFmt(cmd);
len = strlen(fmt);
} else
fmt = NULL;
crp = crp->Next; // Precision
crp->Kdata->SetValue(len, i);
crp = crp->Next; // key (was Length)
fld = myc.GetCharField(4);
crp->Kdata->SetValue(fld, i);
crp = crp->Next; // Scale
crp->Kdata->SetValue(prec, i);
crp = crp->Next; // Radix
crp->Kdata->SetValue(0, i);
crp = crp->Next; // Nullable
fld = myc.GetCharField(3);
crp->Kdata->SetValue((toupper(*fld) == 'Y') ? 1 : 0, i);
crp = crp->Next; // Remark
fld = myc.GetCharField(8);
crp->Kdata->SetValue(fld, i);
crp = crp->Next; // Date format
// crp->Kdata->SetValue((fmt) ? fmt : (char*) "", i);
crp->Kdata->SetValue(fmt, i);
crp = crp->Next; // New (default)
fld = myc.GetCharField(5);
crp->Kdata->SetValue(fld, i);
crp = crp->Next; // New (extra)
fld = myc.GetCharField(6);
crp->Kdata->SetValue(fld, i);
crp = crp->Next; // New (charset)
fld = chset;
crp->Kdata->SetValue(fld, i);
i++; // Can be skipped
} // endfor i
#if 0
if (k > 1) {
// Multicolumn primary key
PVBLK vbp = qrp->Colresp->Next->Next->Next->Next->Kdata;
for (i = 0; i < n; i++)
if (vbp->GetIntValue(i))
vbp->SetValue(k, i);
} // endif k
#endif // 0
/**********************************************************************/
/* Close MySQL connection. */
/**********************************************************************/
myc.Close();
/**********************************************************************/
/* Return the result pointer for use by GetData routines. */
/**********************************************************************/
return qrp;
} // end of MyColumns
/************************************************************************/
/* SrcColumns: constructs the result blocks containing all columns */
/* resulting from an SQL source definition query execution. */
/************************************************************************/
PQRYRES SrcColumns(PGLOBAL g, const char *host, const char *db,
const char *user, const char *pwd,
const char *srcdef, int port)
{
char *query;
int w;
MYSQLC myc;
PQRYRES qrp = NULL;
if (!port)
port = mysqld_port;
if (!strnicmp(srcdef, "select ", 7)) {
query = (char *)PlugSubAlloc(g, NULL, strlen(srcdef) + 9);
strcat(strcpy(query, srcdef), " LIMIT 0");
} else
query = (char *)srcdef;
// Open a MySQL connection for this table
if (myc.Open(g, host, db, user, pwd, port))
return NULL;
// Send the source command to MySQL
if (myc.ExecSQL(g, query, &w) == RC_OK)
- FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
2014-03-18 19:25:50 +01:00
qrp = myc.GetResult(g, true);
myc.Close();
return qrp;
} // end of SrcColumns
/* -------------------------- Class MYSQLC --------------------------- */
/***********************************************************************/
/* Implementation of the MYSQLC class. */
/***********************************************************************/
MYSQLC::MYSQLC(void)
{
m_DB = NULL;
m_Stmt = NULL;
m_Res = NULL;
m_Rows = -1;
m_Row = NULL;
m_Fields = -1;
N = 0;
} // end of MYSQLC constructor
/***********************************************************************/
/* Get the number of lines of the result set. */
/* Currently we send the Select command and return m_Rows */
/* Perhaps should we use Select count(*) ... (?????) */
/* No because here we execute only one query instead of two */
/* (the select count(*) plus the normal query) */
/***********************************************************************/
int MYSQLC::GetResultSize(PGLOBAL g, PSZ sql)
{
if (m_Rows < 0)
if (ExecSQL(g, sql) != RC_OK)
return -1;
return m_Rows;
} // end of GetResultSize
/***********************************************************************/
/* Open a MySQL (remote) connection. */
/***********************************************************************/
int MYSQLC::Open(PGLOBAL g, const char *host, const char *db,
const char *user, const char *pwd,
int pt)
{
const char *pipe = NULL;
uint cto = 6000, nrt = 12000;
m_DB = mysql_init(NULL);
if (!m_DB) {
strcpy(g->Message, "mysql_init failed: no memory");
return RC_FX;
} // endif m_DB
// Removed to do like FEDERATED do
//mysql_options(m_DB, MYSQL_READ_DEFAULT_GROUP, "client-mariadb");
mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
- Commit merged changes added: mysql-test/include/kill_binlog_dump_threads.inc mysql-test/r/ctype_ucs2_query_cache.result mysql-test/r/empty_user_table.result mysql-test/r/grant_4332.result mysql-test/r/init_connection_query_cache.result mysql-test/suite/federated/federated.result mysql-test/suite/federated/federated.test mysql-test/suite/innodb/t/innodb_bug14676111-master.opt mysql-test/suite/maria/distinct.result mysql-test/suite/maria/distinct.test mysql-test/suite/rpl/r/rpl_gtid_master_promote.result mysql-test/suite/rpl/r/rpl_gtid_mdev4474.result mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result mysql-test/suite/rpl/r/rpl_gtid_mdev4485.result mysql-test/suite/rpl/r/rpl_gtid_reconnect.result mysql-test/suite/rpl/r/rpl_gtid_strict.result mysql-test/suite/rpl/r/rpl_gtid_until.result mysql-test/suite/rpl/t/rpl_gtid_master_promote.cnf mysql-test/suite/rpl/t/rpl_gtid_master_promote.test mysql-test/suite/rpl/t/rpl_gtid_mdev4474.cnf mysql-test/suite/rpl/t/rpl_gtid_mdev4474.test mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test mysql-test/suite/rpl/t/rpl_gtid_mdev4485.cnf mysql-test/suite/rpl/t/rpl_gtid_mdev4485.test mysql-test/suite/rpl/t/rpl_gtid_reconnect.test mysql-test/suite/rpl/t/rpl_gtid_strict.test mysql-test/suite/rpl/t/rpl_gtid_until.test mysql-test/suite/sys_vars/r/gtid_binlog_pos_basic.result mysql-test/suite/sys_vars/r/gtid_current_pos_basic.result mysql-test/suite/sys_vars/r/gtid_strict_mode_basic.result mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result mysql-test/suite/sys_vars/t/gtid_binlog_pos_basic.test mysql-test/suite/sys_vars/t/gtid_current_pos_basic.test mysql-test/suite/sys_vars/t/gtid_strict_mode_basic.test mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test mysql-test/t/ctype_ucs2_query_cache-master.opt mysql-test/t/ctype_ucs2_query_cache.test mysql-test/t/empty_user_table.test mysql-test/t/grant_4332.test mysql-test/t/init_connection_query_cache-master.opt mysql-test/t/init_connection_query_cache.test plugin/handler_socket/regtest/test_01_lib/test24.expected plugin/handler_socket/regtest/test_01_lib/test24.pl sql/db.opt renamed: mysql-test/suite/sys_vars/r/gtid_pos_basic.result => mysql-test/suite/sys_vars/r/gtid_slave_pos_basic.result mysql-test/suite/sys_vars/t/gtid_pos_basic.test => mysql-test/suite/sys_vars/t/gtid_slave_pos_basic.test modified: .bzrignore BUILD/FINISH.sh BUILD/compile-amd64-debug-max BUILD/compile-amd64-max BUILD/compile-darwin-mwcc BUILD/compile-hpux11-parisc2-aCC BUILD/compile-irix-mips64-mipspro BUILD/compile-ndb-autotest BUILD/compile-pentium BUILD/compile-pentium-debug-max-no-embedded BUILD/compile-pentium-debug-max-no-ndb BUILD/compile-pentium-max BUILD/compile-ppc-debug BUILD/compile-ppc-debug-max BUILD/compile-ppc-debug-max-no-ndb BUILD/compile-ppc-max BUILD/compile-solaris-amd64-debug CMakeLists.txt VERSION client/client_priv.h client/completion_hash.h client/echo.c client/get_password.c client/mysql.cc client/mysqlcheck.c client/mysqldump.c client/mysqltest.cc client/sql_string.cc.dontuse cmake/configure.pl cmake/cpack_rpm.cmake cmake/create_initial_db.cmake.in cmake/make_dist.cmake.in cmake/mysql_version.cmake cmake/os/FreeBSD.cmake cmake/os/Linux.cmake cmake/package_name.cmake cmake/plugin.cmake cmake/readline.cmake cmake/ssl.cmake cmake/zlib.cmake configure.cmake debian/dist/Debian/control debian/dist/Ubuntu/control extra/charset2html.c extra/yassl/CMakeLists.txt extra/yassl/examples/client/client.cpp extra/yassl/examples/echoclient/echoclient.cpp extra/yassl/examples/echoserver/echoserver.cpp extra/yassl/examples/server/server.cpp extra/yassl/include/buffer.hpp extra/yassl/include/cert_wrapper.hpp extra/yassl/include/lock.hpp extra/yassl/include/openssl/prefix_ssl.h extra/yassl/include/socket_wrapper.hpp extra/yassl/include/yassl_error.hpp extra/yassl/include/yassl_imp.hpp extra/yassl/include/yassl_int.hpp extra/yassl/include/yassl_types.hpp extra/yassl/src/buffer.cpp extra/yassl/src/cert_wrapper.cpp extra/yassl/src/crypto_wrapper.cpp extra/yassl/src/handshake.cpp extra/yassl/src/lock.cpp extra/yassl/src/make.bat extra/yassl/src/socket_wrapper.cpp extra/yassl/src/ssl.cpp extra/yassl/src/yassl.cpp extra/yassl/src/yassl_error.cpp extra/yassl/src/yassl_imp.cpp extra/yassl/taocrypt/benchmark/benchmark.cpp extra/yassl/taocrypt/benchmark/make.bat extra/yassl/taocrypt/include/aes.hpp extra/yassl/taocrypt/include/asn.hpp extra/yassl/taocrypt/include/block.hpp extra/yassl/taocrypt/include/blowfish.hpp extra/yassl/taocrypt/include/des.hpp extra/yassl/taocrypt/include/hash.hpp extra/yassl/taocrypt/include/hc128.hpp extra/yassl/taocrypt/include/integer.hpp extra/yassl/taocrypt/include/kernelc.hpp extra/yassl/taocrypt/include/misc.hpp extra/yassl/taocrypt/include/modes.hpp extra/yassl/taocrypt/include/pwdbased.hpp extra/yassl/taocrypt/include/rabbit.hpp extra/yassl/taocrypt/include/rsa.hpp extra/yassl/taocrypt/include/runtime.hpp extra/yassl/taocrypt/include/types.hpp extra/yassl/taocrypt/mySTL/stdexcept.hpp extra/yassl/taocrypt/mySTL/vector.hpp extra/yassl/taocrypt/src/aes.cpp extra/yassl/taocrypt/src/aestables.cpp extra/yassl/taocrypt/src/algebra.cpp extra/yassl/taocrypt/src/arc4.cpp extra/yassl/taocrypt/src/blowfish.cpp extra/yassl/taocrypt/src/coding.cpp extra/yassl/taocrypt/src/dsa.cpp extra/yassl/taocrypt/src/hash.cpp extra/yassl/taocrypt/src/hc128.cpp extra/yassl/taocrypt/src/make.bat extra/yassl/taocrypt/src/md4.cpp extra/yassl/taocrypt/src/md5.cpp extra/yassl/taocrypt/src/misc.cpp extra/yassl/taocrypt/src/rabbit.cpp extra/yassl/taocrypt/src/random.cpp extra/yassl/taocrypt/src/ripemd.cpp extra/yassl/taocrypt/src/rsa.cpp extra/yassl/taocrypt/src/sha.cpp extra/yassl/taocrypt/src/twofish.cpp extra/yassl/taocrypt/test/make.bat extra/yassl/taocrypt/test/memory.cpp extra/yassl/taocrypt/test/test.cpp extra/yassl/testsuite/make.bat extra/yassl/testsuite/test.hpp extra/yassl/testsuite/testsuite.cpp include/atomic/x86-gcc.h include/base64.h include/ft_global.h include/m_ctype.h include/m_string.h include/my_global.h include/my_md5.h include/my_pthread.h include/my_sys.h include/my_user.h include/my_xml.h include/myisam.h include/myisamchk.h include/myisampack.h include/mysql.h include/mysql/plugin_audit.h include/mysql/plugin_audit.h.pp include/mysql/service_my_snprintf.h include/mysql_com.h include/mysql_time.h include/mysql_version.h.in include/probes_mysql_nodtrace.h include/thread_pool_priv.h include/welcome_copyright_notice.h libmysql/libmysql.c libmysqld/lib_sql.cc mysql-test/collections/default.experimental mysql-test/include/check-testcase.test mysql-test/include/get_relay_log_pos.inc mysql-test/include/mtr_check.sql mysql-test/include/rpl_init.inc mysql-test/include/wait_show_condition.inc mysql-test/mysql-test-run.pl mysql-test/r/1st.result mysql-test/r/cast.result mysql-test/r/connect.result mysql-test/r/create.result mysql-test/r/ctype_cp932_binlog_stm.result mysql-test/r/ctype_utf8mb4.result mysql-test/r/func_compress.result mysql-test/r/func_group.result mysql-test/r/func_math.result mysql-test/r/func_str.result mysql-test/r/func_time_hires.result mysql-test/r/gis-rtree.result mysql-test/r/information_schema.result mysql-test/r/innodb_ext_key.result mysql-test/r/join_nested.result mysql-test/r/join_nested_jcl6.result mysql-test/r/join_outer.result mysql-test/r/join_outer_innodb.result mysql-test/r/join_outer_jcl6.result mysql-test/r/log_slow.result mysql-test/r/log_tables_upgrade.result mysql-test/r/myisam-metadata.result mysql-test/r/myisam.result mysql-test/r/mysql_upgrade.result mysql-test/r/mysql_upgrade_ssl.result mysql-test/r/mysqlcheck.result mysql-test/r/mysqld--help.result mysql-test/r/mysqldump-max.result mysql-test/r/partition.result mysql-test/r/repair.result mysql-test/r/select.result mysql-test/r/select_jcl6.result mysql-test/r/select_pkeycache.result mysql-test/r/show_check.result mysql-test/r/sp.result mysql-test/r/stat_tables_rbr.result mysql-test/r/status_user.result mysql-test/r/subselect_mat.result mysql-test/r/subselect_sj.result mysql-test/r/subselect_sj2_mat.result mysql-test/r/subselect_sj_jcl6.result mysql-test/r/subselect_sj_mat.result mysql-test/r/system_mysql_db.result mysql-test/r/system_mysql_db_fix40123.result mysql-test/r/system_mysql_db_fix50030.result mysql-test/r/system_mysql_db_fix50117.result mysql-test/r/type_datetime.result mysql-test/r/user_var-binlog.result mysql-test/r/varbinary.result mysql-test/r/variables.result mysql-test/suite/binlog/disabled.def mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test mysql-test/suite/federated/federatedx.test mysql-test/suite/funcs_1/r/is_columns_is.result mysql-test/suite/funcs_1/r/is_columns_is_embedded.result mysql-test/suite/funcs_1/r/is_columns_mysql.result mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result mysql-test/suite/funcs_1/r/is_key_column_usage.result mysql-test/suite/funcs_1/r/is_statistics.result mysql-test/suite/funcs_1/r/is_statistics_mysql.result mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result mysql-test/suite/funcs_1/r/is_table_constraints.result mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result mysql-test/suite/funcs_1/r/is_tables_mysql.result mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result mysql-test/suite/funcs_1/r/processlist_priv_ps.result mysql-test/suite/funcs_1/r/processlist_val_no_prot.result mysql-test/suite/funcs_1/r/processlist_val_ps.result mysql-test/suite/handler/interface.result mysql-test/suite/handler/interface.test mysql-test/suite/innodb/r/binlog_consistent.result mysql-test/suite/innodb/r/group_commit_binlog_pos.result mysql-test/suite/innodb/r/group_commit_binlog_pos_no_optimize_thread.result mysql-test/suite/innodb/r/innodb_bug14147491.result mysql-test/suite/innodb/t/innodb_bug12400341.test mysql-test/suite/innodb/t/innodb_bug14147491.test mysql-test/suite/innodb/t/innodb_bug14676111.test mysql-test/suite/maria/maria-autozerofill.result mysql-test/suite/maria/maria-autozerofill.test mysql-test/suite/maria/maria-recovery2.result mysql-test/suite/maria/maria-recovery2.test mysql-test/suite/maria/maria.result mysql-test/suite/maria/maria.test mysql-test/suite/maria/maria3.result mysql-test/suite/multi_source/gtid.result mysql-test/suite/multi_source/gtid.test mysql-test/suite/multi_source/info_logs.result mysql-test/suite/multi_source/multisource.result mysql-test/suite/multi_source/relaylog_events.result mysql-test/suite/multi_source/reset_master_slave.inc mysql-test/suite/multi_source/reset_slave.result mysql-test/suite/multi_source/simple.result mysql-test/suite/multi_source/syntax.result mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result mysql-test/suite/parts/r/partition_alter1_1_innodb.result mysql-test/suite/parts/r/partition_alter1_2_innodb.result mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result mysql-test/suite/parts/r/partition_alter4_innodb.result mysql-test/suite/parts/r/partition_basic_innodb.result mysql-test/suite/parts/r/partition_engine_innodb.result mysql-test/suite/parts/t/partition_basic_innodb.test mysql-test/suite/perfschema/r/digest_table_full.result mysql-test/suite/perfschema/r/statement_digest.result mysql-test/suite/perfschema/r/statement_digest_consumers.result mysql-test/suite/perfschema/r/statement_digest_long_query.result mysql-test/suite/plugins/r/audit_null.result mysql-test/suite/plugins/r/cassandra.result mysql-test/suite/plugins/r/qc_info.result mysql-test/suite/plugins/r/show_all_plugins.result mysql-test/suite/plugins/t/audit_null.test mysql-test/suite/plugins/t/cassandra.test mysql-test/suite/plugins/t/qc_info.test mysql-test/suite/plugins/t/unix_socket.test mysql-test/suite/rpl/disabled.def mysql-test/suite/rpl/r/rpl_charset_sjis.result mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result mysql-test/suite/rpl/r/rpl_gtid_basic.result mysql-test/suite/rpl/r/rpl_gtid_crash.result mysql-test/suite/rpl/r/rpl_gtid_errorhandling.result mysql-test/suite/rpl/r/rpl_gtid_mdev4473.result mysql-test/suite/rpl/r/rpl_gtid_nobinlog.result mysql-test/suite/rpl/r/rpl_gtid_startpos.result mysql-test/suite/rpl/r/rpl_gtid_stop_start.result mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result mysql-test/suite/rpl/r/rpl_mdev382.result mysql-test/suite/rpl/r/rpl_password_boundaries.result mysql-test/suite/rpl/r/rpl_row_until.result mysql-test/suite/rpl/r/rpl_sp_effects.result mysql-test/suite/rpl/r/rpl_stm_until.result mysql-test/suite/rpl/r/rpl_sync.result mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test mysql-test/suite/rpl/t/rpl_charset_sjis.test mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test mysql-test/suite/rpl/t/rpl_gtid_basic.test mysql-test/suite/rpl/t/rpl_gtid_crash.test mysql-test/suite/rpl/t/rpl_gtid_errorhandling.test mysql-test/suite/rpl/t/rpl_gtid_mdev4473.test mysql-test/suite/rpl/t/rpl_gtid_nobinlog.test mysql-test/suite/rpl/t/rpl_gtid_startpos.test mysql-test/suite/rpl/t/rpl_gtid_stop_start.test mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test mysql-test/suite/rpl/t/rpl_password_boundaries.test mysql-test/suite/rpl/t/rpl_row_until.test mysql-test/suite/rpl/t/rpl_sp_effects.test mysql-test/suite/rpl/t/rpl_stm_until.test mysql-test/suite/rpl/t/rpl_sync.test mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test mysql-test/t/cast.test mysql-test/t/ctype_cp932_binlog_stm.test mysql-test/t/ctype_utf8mb4.test mysql-test/t/func_group.test mysql-test/t/func_str.test mysql-test/t/gis-rtree.test mysql-test/t/innodb_ext_key.test mysql-test/t/join_nested.test mysql-test/t/join_outer.test mysql-test/t/join_outer_innodb.test mysql-test/t/log_slow.test mysql-test/t/myisam-metadata.test mysql-test/t/myisam.test mysql-test/t/mysql_plugin.test mysql-test/t/mysqlshow.test mysql-test/t/repair.test mysql-test/t/select.test mysql-test/t/sp.test mysql-test/t/subselect_sj.test mysql-test/t/subselect_sj_mat.test mysql-test/t/system_mysql_db_fix40123.test mysql-test/t/system_mysql_db_fix50030.test mysql-test/t/system_mysql_db_fix50117.test mysql-test/t/type_datetime.test mysql-test/t/varbinary.test mysql-test/t/variables.test mysys/errors.c mysys/mf_format.c mysys/mf_keycache.c mysys/my_lockmem.c mysys/my_malloc.c mysys/my_once.c mysys/my_thr_init.c mysys/my_write.c mysys/thr_alarm.c mysys/thr_mutex.c packaging/WiX/mysql_server.wxs.in packaging/rpm-uln/mysql.spec.sh plugin/audit_null/audit_null.c plugin/handler_socket/docs-en/about-handlersocket.en.txt plugin/handler_socket/docs-en/installation.en.txt plugin/handler_socket/docs-en/perl-client.en.txt plugin/handler_socket/docs-en/protocol.en.txt plugin/handler_socket/docs-ja/installation.ja.txt plugin/handler_socket/docs-ja/perl-client.ja.txt plugin/handler_socket/docs-ja/protocol.ja.txt plugin/handler_socket/handlersocket/database.cpp plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs plugin/handler_socket/regtest/test_01_lib/run.sh plugin/handler_socket/regtest/test_01_lib/test14.pl plugin/handler_socket/regtest/test_01_lib/test17.pl plugin/handler_socket/regtest/test_01_lib/test19.pl plugin/qc_info/qc_info.cc regex/my_regex.h regex/regcomp.c scripts/mysql_system_tables.sql scripts/mysql_system_tables_data.sql sql-common/client.c sql/CMakeLists.txt sql/event_db_repository.cc sql/ha_partition.cc sql/ha_partition.h sql/handler.cc sql/handler.h sql/item.cc sql/item.h sql/item_cmpfunc.cc sql/item_func.cc sql/item_func.h sql/item_strfunc.cc sql/item_strfunc.h sql/item_sum.cc sql/key.cc sql/key.h sql/lex.h sql/log.cc sql/log.h sql/log_event.cc sql/log_event.h sql/mdl.cc sql/multi_range_read.cc sql/mysql_install_db.cc sql/mysqld.cc sql/mysqld.h sql/opt_range.cc sql/partition_element.h sql/partition_info.cc sql/partition_info.h sql/rpl_gtid.cc sql/rpl_gtid.h sql/rpl_mi.cc sql/rpl_mi.h sql/rpl_rli.cc sql/rpl_rli.h sql/rpl_utility.cc sql/set_var.cc sql/set_var.h sql/share/errmsg-utf8.txt sql/slave.cc sql/sp.cc sql/sp_head.cc sql/sql_acl.cc sql/sql_admin.cc sql/sql_admin.h sql/sql_audit.cc sql/sql_audit.h sql/sql_base.cc sql/sql_binlog.cc sql/sql_cache.cc sql/sql_class.cc sql/sql_connect.cc sql/sql_delete.cc sql/sql_error.cc sql/sql_error.h sql/sql_handler.cc sql/sql_insert.cc sql/sql_join_cache.cc sql/sql_lex.cc sql/sql_lex.h sql/sql_parse.cc sql/sql_partition.cc sql/sql_partition.h sql/sql_partition_admin.cc sql/sql_plugin_compat.h sql/sql_prepare.cc sql/sql_repl.cc sql/sql_repl.h sql/sql_select.cc sql/sql_show.cc sql/sql_statistics.cc sql/sql_string.cc sql/sql_string.h sql/sql_table.cc sql/sql_test.cc sql/sql_view.cc sql/sql_yacc.yy sql/sys_vars.cc sql/sys_vars.h sql/threadpool_unix.cc sql/tztime.cc storage/cassandra/cassandra_se.cc storage/cassandra/cassandra_se.h storage/cassandra/ha_cassandra.cc storage/connect/myconn.cpp storage/federated/ha_federated.cc storage/federatedx/ha_federatedx.cc storage/innobase/os/os0file.cc storage/maria/ha_maria.cc storage/maria/ma_blockrec.c storage/maria/ma_blockrec.h storage/maria/ma_check.c storage/maria/ma_delete.c storage/maria/ma_loghandler.c storage/maria/ma_open.c storage/maria/ma_pagecrc.c storage/maria/ma_recovery.c storage/maria/ma_scan.c storage/maria/ma_search.c storage/maria/ma_sort.c storage/maria/ma_state.c storage/maria/ma_state.h storage/maria/ma_test1.c storage/maria/ma_test2.c storage/maria/ma_update.c storage/maria/ma_write.c storage/maria/maria_chk.c storage/maria/maria_def.h storage/maria/maria_ftdump.c storage/maria/maria_read_log.c storage/maria/unittest/ma_test_recovery.expected storage/myisam/ha_myisam.cc storage/myisam/mi_check.c storage/myisam/mi_write.c storage/myisam/myisam_ftdump.c storage/myisam/myisamchk.c storage/myisam/myisamdef.h storage/myisam/myisampack.c storage/myisam/sort.c storage/myisammrg/ha_myisammrg.cc storage/perfschema/pfs_engine_table.cc storage/perfschema/pfs_global.cc storage/perfschema/pfs_global.h storage/sphinx/CMakeLists.txt storage/sphinx/snippets_udf.cc storage/xtradb/btr/btr0btr.c storage/xtradb/btr/btr0cur.c storage/xtradb/btr/btr0pcur.c storage/xtradb/btr/btr0sea.c storage/xtradb/buf/buf0buf.c storage/xtradb/buf/buf0flu.c storage/xtradb/buf/buf0lru.c storage/xtradb/buf/buf0rea.c storage/xtradb/dict/dict0dict.c storage/xtradb/fil/fil0fil.c storage/xtradb/fsp/fsp0fsp.c storage/xtradb/handler/ha_innodb.cc storage/xtradb/include/btr0btr.ic storage/xtradb/include/buf0buf.h storage/xtradb/include/buf0buf.ic storage/xtradb/include/buf0flu.ic storage/xtradb/include/buf0lru.h storage/xtradb/include/fut0fut.ic storage/xtradb/include/log0log.h storage/xtradb/include/log0log.ic storage/xtradb/include/mtr0mtr.h storage/xtradb/include/mtr0mtr.ic storage/xtradb/include/read0read.h storage/xtradb/include/read0read.ic storage/xtradb/include/srv0srv.h storage/xtradb/include/trx0purge.h storage/xtradb/include/trx0sys.h storage/xtradb/include/trx0sys.ic storage/xtradb/include/trx0trx.h storage/xtradb/include/trx0trx.ic storage/xtradb/include/univ.i storage/xtradb/lock/lock0lock.c storage/xtradb/log/log0log.c storage/xtradb/mtr/mtr0mtr.c storage/xtradb/os/os0file.c storage/xtradb/read/read0read.c storage/xtradb/row/row0ins.c storage/xtradb/row/row0merge.c storage/xtradb/row/row0sel.c storage/xtradb/row/row0vers.c storage/xtradb/srv/srv0srv.c storage/xtradb/trx/trx0purge.c storage/xtradb/trx/trx0roll.c storage/xtradb/trx/trx0sys.c storage/xtradb/trx/trx0trx.c strings/ctype-bin.c strings/ctype-mb.c strings/ctype-simple.c strings/ctype-uca.c strings/ctype-utf8.c strings/ctype.c strings/decimal.c support-files/MySQL-shared-compat.spec.sh support-files/compiler_warnings.supp support-files/mysql.spec.sh tests/mysql_client_test.c vio/viosocket.c vio/viossl.c win/packaging/ca/CustomAction.cpp win/packaging/extra.wxs.in win/packaging/heidisql.cmake mysql-test/suite/sys_vars/r/gtid_slave_pos_basic.result mysql-test/suite/sys_vars/t/gtid_slave_pos_basic.test pending merges: Alexander Barkov 2013-06-08 Enabling Connect tests Alexander Barkov 2013-06-08 [merge] Merge from 10.0-connect Sergei Golubchik 2013-06-06 [merge] 10.0-base merge Sergei Golubchik 2013-06-06 [merge] 5.5 merge Vladislav Vaintroub 2013-06-01 Fix a compile warning on NetBSD Vladislav Vaintroub 2013-06-01 MDEV-4607 : libreadline-related compil... sanja@montyprogra... 2013-05-30 MDEV-4520: Assertion `0' fails in Quer... Sergei Golubchik 2013-05-28 followup for revision 3751 "centos5 gcc 4.... sanja@montyprogra... 2013-05-23 MDEV-4520: Assertion `0' fails in Quer... Vladislav Vaintroub 2013-05-22 MDEV-4548 - compile sphinx.so/dll and i... Vladislav Vaintroub 2013-05-27 MDEV-4553 - Fixes for compilation under... Sergei Golubchik 2013-05-24 MDEV-4516 SELECT from I_S.QUERY_CACHE_INFO... Sergei Golubchik 2013-05-21 fix for compiled-in FederatedX Sergei Golubchik 2013-05-21 MDEV-388 Creating a federated table with a... Sergei Golubchik 2013-05-21 [merge] 5.3 merge Sergei Golubchik 2013-05-21 fixes for buildbot Sergei Golubchik 2013-05-20 MDEV-388 Creating a federated table with a... Sergei Golubchik 2013-05-20 increase MAX_HA (number of simultaneously ... Sergei Golubchik 2013-05-20 [merge] 5.3 merge. Sergei Golubchik 2013-05-20 [merge] 5.2 merge Sergei Golubchik 2013-05-20 [merge] 5.1 merge Michael Widenius 2013-05-11 Fixed compiler failure on solaris Michael Widenius 2013-05-11 Fixed compiler warning Michael Widenius 2013-05-11 MDEV-4280: Assertion `empty_size == empty_... sanja@askmonty.org 2013-04-09 MDEV-4326 fix. Vladislav Vaintroub 2013-05-19 MDEV-4544 - update MSI to include Heidi... Vladislav Vaintroub 2013-05-19 Fix cpack error - safe_process.pl does ... Sergei Golubchik 2013-05-08 MDEV-4462 mysqld gets SIGFPE when mysql.us... sanja@askmonty.org 2013-05-03 MDEV-4290: Sergey Petrunya 2013-05-05 [merge] Merge Vladislav Vaintroub 2013-05-19 remove start menu shortcut to upgrade w... Vladislav Vaintroub 2013-05-19 MDEV-4544 : Update MSI installer to use... Alexander Barkov 2013-05-17 Bug#MDEV-4518 Server crashes in is_white_s... Michael Widenius 2013-05-15 - Solaris fixes: Alexey Botchkov 2013-05-15 MDEV-4266 Server upgrade via apt-get instal... Alexey Botchkov 2013-05-15 MDEV-4521 MBRContains, MBRWithin no longer ... Michael Widenius 2013-05-14 When one does 'REPAIR TABLE', update uuid(... knielsen@knielsen... 2013-05-14 Fix test failure in plugins.unix_socke... Sergei Golubchik 2013-05-13 MDEV-4514 After increasing user name lengt... Sergei Golubchik 2013-05-13 MDEV-4505 Buffer overrun when processing -... Sergei Golubchik 2013-05-13 MDEV-4199 Installing postfix on CentOS 5.9... Sergei Golubchik 2013-05-13 fix test cases Michael Widenius 2013-05-13 Fixed MDEV-4291: Assertion `trid >= info->... Michael Widenius 2013-05-12 MDEV-3999: Valgrind errors 'invalid write'... Michael Widenius 2013-05-11 Fixed that SHOW PROCESSLIST and informatio... Michael Widenius 2013-05-11 MDEV-4231: Possible bug in function _ma_ap... Vladislav Vaintroub 2013-05-09 Fix compile error Vladislav Vaintroub 2013-05-09 Small mysql_install_db.exe fixes Vladislav Vaintroub 2013-05-08 MDEV-4206 : log all slow statements (do... Alexander Barkov 2013-05-08 The bug Sergei Golubchik 2013-05-08 [merge] Merge with XtraDB as of Percona-Se... Sergei Golubchik 2013-05-08 Percona-Server-5.5.30-rel30.2.tar.gz Sergei Golubchik 2013-05-07 centos5 gcc 4.1 asm bug Sergei Golubchik 2013-05-07 Compilation warnings. Sergei Golubchik 2013-05-07 [merge] mysql-5.5.31 merge Balasubramanian K... 2013-04-12 Updated mysql.spec.sh for rpm-uln Balasubramanian K... 2013-03-25 Reverted MySQL Release Engineering mai... Balasubramanian K... 2013-03-21 Added SuSE RPM Build fix mysql-builder@ora... 2013-03-08 Balasubramanian K... 2013-03-06 [merge] Added fix for Bug#16445097 Balasubramanian K... 2013-03-06 Added fix for Bug#16445097 Balasubramanian K... 2013-03-05 [merge] Updated Code for Bug#16235828 ... Balasubramanian K... 2013-03-05 Updated Code for Bug#16235828 2013-03-01 Updated mysql.spec.sh file for br16298542 balasubramanian.k... 2013-02-28 Updated release number in mysql.spec.s... balasubramanian.k... 2013-02-28 Updated mysql.spec.sh file for br16298542 Marc Alff 2013-03-01 [merge] L0ocal merge Venkatesh Duggirala 2013-03-01 BUG#11753923-SQL THREAD CRASHES ON DISK... Jon Olav Hauglid 2013-02-28 Bug#16385711: HANDLER, CREATE TABLE IF NOT... Marc Alff 2013-02-28 Bug#16414644 ASSERTION FAILED: SIZE == PFS_ALLOCA... mysql-builder@ora... 2013-02-28 mysql-builder@ora... 2013-02-28 [merge] mysql-builder@ora... 2013-02-28 [merge] mysql-builder@ora... 2012-09-14 Gleb Shchepa 2013-02-28 [merge] Manual up-merge (16311231 backport) Gleb Shchepa 2013-02-27 Bug #16311231: MISSING DATA ON SUBQUERY WITH W... kevin.lewis@oracl... 2013-02-27 Bug #16305265 HANG IN RENAME TABLE Marko Mäkelä 2013-02-27 [merge] Merge mysql-5.1 to mysql-5.5. Marko Mäkelä 2013-02-27 Bug#16400920 INNODB TRIES TO PASS EMPTY BUFFER... Harin Vadodaria 2013-02-26 [merge] Bug#16372927: STACK OVERFLOW WITH L... Harin Vadodaria 2013-02-26 Bug#16372927: STACK OVERFLOW WITH LONG DATA... Tor Didriksen 2013-02-25 Bug#16062056 REMOVE THE "DUMMY.BAK" FILE FRO... Aditya A 2013-02-26 Bug#14653504 CRASH WHEN TRUNCATING PARTITIONS FRO... Murthy Narkedimilli 2013-02-26 [merge] Updated/added copyright headers Murthy Narkedimilli 2013-02-25 Updated/added copyright headers. Akhila Maddukuri 2013-02-25 Bug#16103072 TEST MYSQL_PLUGIN USES UNSAFE... mysql-builder@ora... 2013-02-25 Annamalai Gurusami 2013-02-25 Bug #16044655 CRASH: SETTING DEFAULT VAL... Murthy Narkedimilli 2013-02-23 [merge] Upmerging the changes from 5.1 ... mysql-builder@ora... 2013-02-23 mysql-builder@ora... 2013-02-23 Satya Bodapati 2013-02-23 Testcase fix for Bug#14147491 sayantan.dutta@or... 2013-02-22 Bug #13619394 - MAKE TEST FAILS ON MY_... Daniel Fischer 2013-02-22 [merge] merge Daniel Fischer 2013-02-20 Bug #13071597: MYSQL SERVER COMMUNITY TO ADV... Annamalai Gurusami 2013-02-22 [merge] Merge from mysql-5.1 to mysql-5.5 Annamalai Gurusami 2013-02-22 Bug #14211565 CRASH WHEN ATTEMPTING TO S... Tor Didriksen 2013-02-20 Bug#14300733 CMAKE DOES NOT CHECK FOR ZLIB VE... Satya Bodapati 2013-02-21 Testcase fix for Bug#14147491 Satya Bodapati 2013-02-20 Testcase fix for BUG#14147491 Sujatha Sivakumar 2013-02-19 [merge] Merge from mysq-5.1 to mysql-5.5 Sujatha Sivakumar 2013-02-19 Bug#11746817:MYSQL_INSTALL_DB CREATES WIL... Harin Vadodaria 2013-02-19 [merge] Bug#16235681: TURN OFF DEFAULT COMP... Harin Vadodaria 2013-02-19 Bug#16235681: TURN OFF DEFAULT COMPRESSION ... Annamalai Gurusami 2013-02-19 [merge] Null merge from mysql-5.1 to mys... mysql-builder@ora... 2013-02-19 Shivji Kumar Jha 2013-02-19 BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2, Pedro Gomes 2013-02-18 [merge] BUG#13545447: RPL_ROTATE_LOGS FAILS DUE... Pedro Gomes 2013-02-18 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONC... Anirudh Mangipudi 2013-02-18 Bug #12546953 "SHOW VARIABLES LIKE 'DAT... Tor Didriksen 2013-02-18 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CO... mysql-builder@ora... 2013-02-18 Shivji Kumar Jha 2013-02-17 [merge] BUG#15965353- RPL.RPL_ROW_UNTIL FA... Shivji Kumar Jha 2013-02-17 BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2, Pedro Gomes 2013-02-15 [merge] BUG#13545447: RPL_ROTATE_LOGS FAILS DUE... Pedro Gomes 2013-02-15 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONC... Alexander Nozdrin 2013-02-15 Bug#16056537: MYSQLD CRASHES IN ITEM_FUNC... Harin Vadodaria 2013-02-15 [merge] Bug#16218104: MYSQL YASSL - LUCKY T... Harin Vadodaria 2013-02-15 Bug#16218104: MYSQL YASSL - LUCKY THIRTEEN:... Shivji Kumar Jha 2013-02-15 [merge] BUG#12359942- REPLICATION TEST FRO... Shivji Kumar Jha 2013-02-15 BUG#12359942- REPLICATION TEST FROM ENGINE... Mattias Jonsson 2013-02-14 Bug#16274455: CAN NOT ACESS PARTITIONED TAB... Annamalai Gurusami 2013-02-14 [merge] Merge from mysql-5.1 to mysql-5.5 Annamalai Gurusami 2013-02-14 For the error code ER_TOO_LONG_IDENT, th... Annamalai Gurusami 2013-02-12 [merge] Merge from mysql-5.1 to mysql-5.5. Annamalai Gurusami 2013-02-12 Bug #11753153 INNODB GENERATES SYMBOLS T... Mattias Jonsson 2013-02-04 post-push test result update for bug#14521864. Venkatesh Duggirala 2013-02-08 [merge] BUG#16247322-MTR NOT RUNNING SY... Venkatesh Duggirala 2013-02-08 BUG#16247322-MTR NOT RUNNING SYS_VARS T... Venkatesh Duggirala 2013-02-08 [merge] BUG#16247322-MTR NOT RUNNING SY... Venkatesh Duggirala 2013-02-08 BUG#16247322-MTR NOT RUNNING SYS_VARS T... Marko Mäkelä 2013-02-08 [merge] Merge mysql-5.1 to mysql-5.5. Marko Mäkelä 2013-02-08 Add missing linkage specifiers, so that ha_inn... Marko Mäkelä 2013-02-08 Bug#16292043 RACE CONDITION IN SRV_EXPORT_INNO... Igor Solodovnikov 2013-02-07 [merge] Null-merge from mysql-5.1 Igor Solodovnikov 2013-02-07 bug#14163155 COM_CHANGE_USER DOESN'T WORK... Tor Didriksen 2013-02-07 [merge] merge 5.1 => 5.5 Tor Didriksen 2013-02-07 Bug#16192219 CRASH IN TEST_IF_SKIP_SORT_ORDER... Venkatesh Duggirala 2013-02-07 [merge] Bug #16247322 MTR NOT RUNNING S... Venkatesh Duggirala 2013-02-07 Bug#16247322- MTR NOT RUNNING SYS_VARS ... kevin.lewis@oracl... 2013-02-06 Bug#16263506 - INNODB; USE ABORT() ON ... Ravinder Thakur 2013-02-06 Bug#14711808 MSI INSTALLATION / UPGRADE CAN... sayantan.dutta@or... 2013-02-06 [merge] 13625278 5.1 => 5.5 sayantan.dutta@or... 2013-02-06 BUG #13625278 - PB2 SHOULD PROVIDE MOR... Hery Ramilison 2013-02-05 [merge] Upmerge of the 5.1.68 build hery.ramilison@or... 2013-02-05 [merge] Merge from mysql-5.1.68-release sunanda.menon@ora... 2013-02-05 [merge] Merge from mysql-5.5.30-release sayantan.dutta@or... 2013-02-05 [merge] 13625278 5.1=> 5.5 sayantan.dutta@or... 2013-02-05 BUG #13625278 - PB2 SHOULD PROVIDE MOR... Thayumanavar 2013-02-05 BUG#16196591 - CLIENTS CANNOT CONNECT TO MYSQL sayantan.dutta@or... 2013-02-04 [merge] 16190704 5.1 => 5.5 nullmerge sayantan.dutta@or... 2013-02-04 Bug #16190704: MTR STILL LOSES THE FAI... Inaam Rana 2013-02-01 Bug#16249505 INNODB REPORTS THAT IT'S GOING TO W... sayantan.dutta@or... 2013-02-01 BUG #16190704 - MTR STILL LOSES THE FA... Nisha Gopalakrishnan 2013-02-01 BUG#16207679: MISSING ERROR WHEN RESIG... Gleb Shchepa 2013-01-31 [merge] Bug #11827369: ASSERTION FAILED: !THD-... Gleb Shchepa 2013-01-31 [merge] Bug #11827369: ASSERTION FAILED: !THD-... Gleb Shchepa 2013-01-23 Bug #11827369: ASSERTION FAILED: !THD->LEX->CO... Yasufumi Kinoshita 2013-01-31 [merge] merge to mysql-5.5 from mysql-5.1 Yasufumi Kinoshita 2013-01-31 Bug #16220051 : INNODB_BUG12400341 FAILS... Chaithra Gopalareddy 2013-01-31 [merge] Bug#14096619: UNABLE TO RESTOR... Chaithra Gopalareddy 2013-01-31 Bug#14096619: UNABLE TO RESTORE DATABA... Mattias Jonsson 2013-01-30 [merge] Bug#14521864: MYSQL 5.1 TO 5.5 BUGS... mysql-builder@ora... 2013-01-30 [merge] mysql-builder@ora... 2013-01-04 mysql-builder@ora... 2013-01-30 Aditya A 2013-01-30 Bug#14756795 SELECT FROM NEW INNODB I_S TABLES CR... Krunal Bauskar 2013-01-30 [merge] - BUG#1608883: KILLING A QUERY INSI... Krunal Bauskar 2013-01-30 - BUG#1608883: KILLING A QUERY INSIDE INNOD... Neeraj Bisht 2013-01-29 [merge] Bug#16208709 - CRASH IN GET_SEL_ARG_FO... Neeraj Bisht 2013-01-29 Bug#16208709 - CRASH IN GET_SEL_ARG_FOR_KEYPAR... Nuno Carvalho 2013-01-28 [merge] BUG#16200555: EMPTY NAME FOR USER VAR... Nuno Carvalho 2013-01-28 BUG#16200555: EMPTY NAME FOR USER VARIABLE IS... Satya Bodapati 2013-01-28 Bug#16183892 - INNODB PURGE BUFFERING IS NOT... Venkatesh Duggirala 2013-01-28 [merge] Bug#16084594 USER_VAR ITEM IN '... Venkatesh Duggirala 2013-01-28 Bug#16084594 USER_VAR ITEM IN 'LOAD FIL... Venkatesh Duggirala 2013-01-26 Bug#16056813-MEMORY LEAK ON FILTERED SLAVE mysql-builder@ora... 2013-01-24 [merge] Venkata Sidagam 2013-01-24 BUG#11908153 CRASH AND/OR VALGRIND ERRORS I... Venkata Sidagam 2013-01-24 [merge] Bug #11752803 SERVER CRASHES IF MA... Venkata Sidagam 2013-01-24 Bug #11752803 SERVER CRASHES IF MAX_CONNEC... Venkatesh Duggirala 2013-01-24 BUG#14798572: REMOVE UNUSED VARIABLE BI... Yasufumi Kinoshita 2013-01-23 [merge] Merge mysql-5.1 to mysql-5.5. Yasufumi Kinoshita 2013-01-23 Bug #16089381 : POSSIBLE NUMBER UNDERFLO... Marko Mäkelä 2013-01-21 [merge] Merge mysql-5.1 to mysql-5.5. Marko Mäkelä 2013-01-21 Bug#16067973 DROP TABLE SLOW WHEN IT DECOMPRES... Venkatesh Duggirala 2013-01-19 [merge] BUG#11752707-SLAVE CRASHES IF R... Venkatesh Duggirala 2013-01-19 Bug#11752707-SLAVE CRASHES IF RBR HAS A... Astha Pareek 2013-01-18 BUG#11761680 mysql-builder@ora... 2013-01-18 Astha Pareek 2013-01-18 Description Marko Mäkelä 2013-01-17 Bug#16138582 MTR_MEMO_RELEASE AND DYN_ARRAY TO... Anirudh Mangipudi 2013-01-16 [merge] BUG#14117025: UNABLE TO RESTORE DUMP Anirudh Mangipudi 2013-01-16 BUG#14117025: UNABLE TO RESTORE DUMP Neeraj Bisht 2013-01-16 [merge] Bug#11751794 MYSQL GIVES THE WRONG RES... Neeraj Bisht 2013-01-16 Bug#11751794 MYSQL GIVES THE WRONG RESULT WITH... mysql-builder@ora... 2013-01-16 Nisha Gopalakrishnan 2013-01-15 Bug#11757464:SERVER CRASH IN RECURSIVE... Neeraj Bisht 2013-01-15 [merge] Bug#11758009 - UNION EXECUTION ORDER W... Neeraj Bisht 2013-01-15 Bug#11758009 - UNION EXECUTION ORDER WRONG ? mysql-builder@ora... 2013-01-15 Neeraj Bisht 2013-01-14 [merge] BUG#14303860 - EXECUTING A SELECT QUER... Neeraj Bisht 2013-01-14 BUG#14303860 - EXECUTING A SELECT QUERY WITH TOO Olav Sandstaa 2013-01-14 Fix for Bug#14636211 WRONG RESULT (EXTRA ROW)... Krunal Bauskar 2013-01-14 [merge] Merge from mysql-5.1 to mysql-5.5 Krunal Bauskar 2013-01-14 - BUG#1608883: KILLING A QUERY INSIDE INNOD... Nisha Gopalakrishnan 2013-01-12 [merge] BUG#11757250: REPLACE(...) INS... Nisha Gopalakrishnan 2013-01-12 BUG#11757250: REPLACE(...) INSIDE A ST... Aditya A 2013-01-11 [merge] Bug#15843818 PARTITIONING BY RANGE WITH T... Aditya A 2013-01-11 Bug#15843818 PARTITIONING BY RANGE WITH TO_DAYS A... Chaithra Gopalareddy 2013-01-11 [merge] Merge from 5.1 to 5.5 Chaithra Gopalareddy 2013-01-10 Bug#11760726: LEFT JOIN OPTIMIZED INTO... Venkata Sidagam 2013-01-10 Bug #14553380 MYSQL C API LIBRARY EXITS AT ... Praveenkumar Hula... 2013-01-10 [merge] Merge from 5.1 to 5.5 Praveenkumar Hula... 2013-01-10 Bug#11749556: DEBUG ASSERTION WHEN ACC... Annamalai Gurusami 2013-01-10 Bug #16004999 ASSERT STATE == TRX_STATE_... prabakaran thirum... 2013-01-10 Bug#16064876 MAIN.KILL FAILS OCCASI... Sunny Bains 2013-01-10 [merge] Merge from mysql-5.1 to mysql-5.5. Sunny Bains 2013-01-10 Bug#13997024 SEGV IN SYNC_ARRAY_CELL_PRINT PRIN... Hery Ramilison 2013-01-08 [merge] Empty version change upmerge hery.ramilison@or... 2013-01-08 Raise version number after cloning 5.1.68 Sunanda Menon 2013-01-08 Raise version number after cloning 5.5.30 Michael Widenius 2013-05-06 If one declared several continue handler f... Sergey Petrunya 2013-05-05 [merge] MDEV-4482 fix null-merged to 5.5 Sergey Petrunya 2013-05-05 [merge] Merge Sergey Petrunya 2013-05-05 MDEV-4482: main.windows test fails in build... Igor Babaev 2013-05-04 [merge] Merge 5.3->5.5 Igor Babaev 2013-05-03 Fixed bug mdev-4336. Igor Babaev 2013-05-03 Made consistent handling of the predicates of t... Igor Babaev 2013-04-29 Fixed bug mdev-4274. Sergey Petrunya 2013-05-04 MDEV-4071: Valgrind warnings 'Invalid read'... Sergey Petrunya 2013-05-04 MDEV-389: Wrong result (missing row) with s... Sergey Petrunya 2013-05-04 Update testcase result Sergey Petrunya 2013-05-04 MDEV-4270: crash in fix_semijoin_strategies... Sergey Petrunya 2013-05-04 MDEV-621: LP:693329 - Assertion `!is_interl... Sergey Petrunya 2013-05-03 MDEV-4465: Reproducible crash (mysqld got s... Vladislav Vaintroub 2013-04-30 MDEV-4458 - Windows installer does not ... Vladislav Vaintroub 2013-04-28 fix test on Windows Igor Babaev 2013-04-27 Fixed bug mdev-4340. Vladislav Vaintroub 2013-04-25 Fix build on Windows knielsen@knielsen... 2013-04-25 Fix unsigned/signed conversion bug in ... knielsen@knielsen... 2013-04-22 MDEV-4396: Fix sporadic failure of tes... Sergei Golubchik 2013-04-19 MDEV-260 auditing table accesses Vladislav Vaintroub 2013-04-19 MDEV-4398 - Sergei Golubchik 2013-04-18 MDEV-4332 Increase username length from 16... Sergei Golubchik 2013-04-17 strmake_buf(X,Y) helper, equivalent to str... Vladislav Vaintroub 2013-06-06 fix compile error Michael Widenius 2013-06-06 Fixed timing failure in myisam-metadata.test knielsen@knielsen... 2013-06-05 Fix two small problems in previous push. knielsen@knielsen... 2013-06-05 MDEV-26: Global transaction ID. knielsen@knielsen... 2013-06-03 MDEV-4605: Failing to load GTID slave ... knielsen@knielsen... 2013-05-29 MDEV-4485: Incorrect error handling in... knielsen@knielsen... 2013-05-29 MDEV-4485: Master did not allow slave ... Michael Widenius 2013-06-05 - Fixed compiler warning knielsen@knielsen... 2013-05-28 [merge] merge compile fix 10.0-base ->... knielsen@knielsen... 2013-05-28 Fix type-typo which caused windows bui... knielsen@knielsen... 2013-05-28 [merge] Merge 10.0-base -> 10.0 knielsen@knielsen... 2013-05-28 [merge] Merge 10.0-base -> 10.0 knielsen@knielsen... 2013-05-28 MDEV-4478: Implement GTID "strict mode" knielsen@knielsen... 2013-05-25 MDEV-4475 follow-up patch: Add forgott... knielsen@knielsen... 2013-05-24 MDEV-4475: Replication from MariaDB 10... knielsen@knielsen... 2013-05-22 MDEV-26: Global transaction ID. knielsen@knielsen... 2013-05-16 Fix race condition in binlog dump thre... knielsen@knielsen... 2013-05-15 MDEV-26: Global transaction ID. Michael Widenius 2013-05-10 Merge of patch lp:~ahiguti100/maria/handle... Michael Widenius 2013-05-10 Added some fixes that should make MyISAM &... knielsen@knielsen... 2013-05-06 Fix big problem in previous push. (Rel... Michael Widenius 2013-05-05 Fixed errors and compiler warnings found b... Sergey Petrunya 2013-05-28 MDEV-4001: Cassandra: server crashes in ha_... Sergey Petrunya 2013-05-28 MDEV-4443: Cassandra SE: ERROR 1928 (HY000)...
2013-06-08 13:04:21 +02:00
mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto);
mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt);
//mysql_options(m_DB, MYSQL_OPT_WRITE_TIMEOUT, ...);
#if defined(WIN32)
if (!strcmp(host, ".")) {
mysql_options(m_DB, MYSQL_OPT_NAMED_PIPE, NULL);
pipe = mysqld_unix_port;
} // endif host
#else // !WIN32
if (!strcmp(host, "localhost"))
pipe = mysqld_unix_port;
#endif // !WIN32
#if 0
if (pwd && !strcmp(pwd, "*")) {
if (GetPromptAnswer(g, "*Enter password:")) {
m_DB = NULL;
return RC_FX;
} else
pwd = g->Message;
} // endif pwd
#endif // 0
if (!mysql_real_connect(m_DB, host, user, pwd, db, pt, pipe, CLIENT_MULTI_RESULTS)) {
#if defined(_DEBUG)
sprintf(g->Message, "mysql_real_connect failed: (%d) %s",
mysql_errno(m_DB), mysql_error(m_DB));
#else // !_DEBUG
sprintf(g->Message, "(%d) %s", mysql_errno(m_DB), mysql_error(m_DB));
#endif // !_DEBUG
mysql_close(m_DB);
m_DB = NULL;
return RC_FX;
} // endif mysql_real_connect
return RC_OK;
} // end of Open
/***********************************************************************/
/* Returns true if the connection is still alive. */
/***********************************************************************/
bool MYSQLC::Connected(void)
{
//int rc;
if (!m_DB)
return FALSE;
//else if ((rc = mysql_ping(m_DB)) == CR_SERVER_GONE_ERROR)
// return FALSE;
else
return TRUE;
} // end of Connected
#if 0 // Not used
/***********************************************************************/
/* Returns the thread ID of the current MySQL connection. */
/***********************************************************************/
ulong MYSQLC::GetThreadID(void)
{
return (m_DB) ? mysql_thread_id(m_DB) : 0;
} // end of GetThreadID
/***********************************************************************/
/* Returns a string that represents the server version number. */
/***********************************************************************/
const char *MYSQLC::ServerInfo(void)
{
return (m_DB) ? mysql_get_server_info(m_DB) : NULL;
} // end of ServerInfo
/***********************************************************************/
/* Returns the version number of the server as a number that */
/* represents the MySQL server version in this format: */
/* major_version*10000 + minor_version *100 + sub_version */
/***********************************************************************/
ulong MYSQLC::ServerVersion(void)
{
return (m_DB) ? mysql_get_server_version(m_DB) : 0;
} // end of ServerVersion
#endif // 0
/**************************************************************************/
/* KillQuery: Send MySQL a Kill Query command. */
/**************************************************************************/
int MYSQLC::KillQuery(ulong id)
{
char kill[20];
sprintf(kill, "KILL QUERY %u", (unsigned int) id);
//return (m_DB) ? mysql_query(m_DB, kill) : 1;
return (m_DB) ? mysql_real_query(m_DB, kill, strlen(kill)) : 1;
} // end of KillQuery
#if defined (MYSQL_PREPARED_STATEMENTS)
/***********************************************************************/
/* Prepare the SQL statement used to insert into a MySQL table. */
/***********************************************************************/
int MYSQLC::PrepareSQL(PGLOBAL g, const char *stmt)
{
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return -4;
} else if (m_Stmt)
return -1; // should not append
#if defined(ALPHA)
if (!(m_Stmt = mysql_prepare(m_DB, stmt, strlen(stmt)))) {
sprintf(g->Message, "mysql_prepare failed: %s [%s]",
mysql_error(m_DB), stmt);
return -1;
} // endif m_Stmt
// Return the parameter count from the statement
return mysql_param_count(m_Stmt);
#else // !ALPHA
if (!(m_Stmt = mysql_stmt_init(m_DB))) {
strcpy(g->Message, "mysql_stmt_init(), out of memory");
return -2;
} // endif m_Stmt
if (mysql_stmt_prepare(m_Stmt, stmt, strlen(stmt))) {
sprintf(g->Message, "mysql_stmt_prepare() failed: (%d) %s",
mysql_stmt_errno(m_Stmt), mysql_stmt_error(m_Stmt));
return -3;
} // endif prepare
// Return the parameter count from the statement
return mysql_stmt_param_count(m_Stmt);
#endif // !ALPHA
} // end of PrepareSQL
/***********************************************************************/
/* Bind the parameter buffers. */
/***********************************************************************/
int MYSQLC::BindParams(PGLOBAL g, MYSQL_BIND *bind)
{
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return RC_FX;
} else
assert(m_Stmt);
#if defined(ALPHA)
if (mysql_bind_param(m_Stmt, bind)) {
sprintf(g->Message, "mysql_bind_param() failed: %s",
mysql_stmt_error(m_Stmt));
#else // !ALPHA
if (mysql_stmt_bind_param(m_Stmt, bind)) {
sprintf(g->Message, "mysql_stmt_bind_param() failed: %s",
mysql_stmt_error(m_Stmt));
#endif // !ALPHA
return RC_FX;
} // endif bind
return RC_OK;
/***********************************************************************/
/* Execute a prepared statement. */
/***********************************************************************/
int MYSQLC::ExecStmt(PGLOBAL g)
{
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return RC_FX;
} // endif m_DB
#if defined(ALPHA)
if (mysql_execute(m_Stmt)) {
sprintf(g->Message, "mysql_execute() failed: %s",
mysql_stmt_error(m_Stmt));
return RC_FX;
} // endif execute
#else // !ALPHA
if (mysql_stmt_execute(m_Stmt)) {
sprintf(g->Message, "mysql_stmt_execute() failed: %s",
mysql_stmt_error(m_Stmt));
return RC_FX;
} // endif execute
#endif // !ALPHA
// Check the total number of affected rows
if (mysql_stmt_affected_rows(m_Stmt) != 1) {
sprintf(g->Message, "Invalid affected rows by MySQL");
return RC_FX;
} // endif affected_rows
return RC_OK;
} // end of ExecStmt
#endif // MYSQL_PREPARED_STATEMENTS
/***********************************************************************/
/* Exec the Select SQL command and get back the result size in rows. */
/***********************************************************************/
int MYSQLC::ExecSQL(PGLOBAL g, const char *query, int *w)
{
int rc = RC_OK;
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return RC_FX;
} // endif m_DB
if (w)
*w = 0;
if (m_Rows >= 0)
return RC_OK; // Already done
//if (mysql_query(m_DB, query) != 0) {
if (mysql_real_query(m_DB, query, strlen(query))) {
char *msg = (char*)PlugSubAlloc(g, NULL, 512 + strlen(query));
sprintf(msg, "(%d) %s [%s]", mysql_errno(m_DB),
mysql_error(m_DB), query);
strncpy(g->Message, msg, sizeof(g->Message) - 1);
g->Message[sizeof(g->Message) - 1] = 0;
rc = RC_FX;
//} else if (mysql_field_count(m_DB) > 0) {
} else if (m_DB->field_count > 0) {
if (!(m_Res = mysql_store_result(m_DB))) {
char *msg = (char*)PlugSubAlloc(g, NULL, 512 + strlen(query));
sprintf(msg, "mysql_store_result failed: %s", mysql_error(m_DB));
strncpy(g->Message, msg, sizeof(g->Message) - 1);
g->Message[sizeof(g->Message) - 1] = 0;
rc = RC_FX;
} else {
m_Fields = mysql_num_fields(m_Res);
m_Rows = (int)mysql_num_rows(m_Res);
} // endif m_Res
} else {
// m_Rows = (int)mysql_affected_rows(m_DB);
m_Rows = (int)m_DB->affected_rows;
sprintf(g->Message, "Affected rows: %d\n", m_Rows);
rc = RC_NF;
} // endif field count
if (w)
//*w = mysql_warning_count(m_DB);
*w = m_DB->warning_count;
return rc;
} // end of ExecSQL
/***********************************************************************/
/* Move to a specific row and column */
/***********************************************************************/
void MYSQLC::DataSeek(my_ulonglong row)
{
MYSQL_ROWS *tmp=0;
//DBUG_PRINT("info",("mysql_data_seek(%ld)",(long) row));
if (m_Res->data)
for (tmp = m_Res->data->data; row-- && tmp; tmp = tmp->next) ;
m_Res->current_row = 0;
m_Res->data_cursor = tmp;
} // end of DataSeek
/***********************************************************************/
/* Fetch one result line from the query result set. */
/***********************************************************************/
int MYSQLC::Fetch(PGLOBAL g, int pos)
{
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return RC_FX;
} // endif m_DB
if (!m_Res) {
// Result set was not initialized
strcpy(g->Message, MSG(FETCH_NO_RES));
return RC_FX;
} else
N++;
if (pos >= 0)
// mysql_data_seek(m_Res, (my_ulonglong)pos);
DataSeek((my_ulonglong)pos);
m_Row = mysql_fetch_row(m_Res);
return (m_Row) ? RC_OK : RC_EF;
} // end of Fetch
/***********************************************************************/
/* Get one field of the current row. */
/***********************************************************************/
char *MYSQLC::GetCharField(int i)
{
if (m_Res && m_Row) {
#if defined(_DEBUG)
// MYSQL_FIELD *fld = mysql_fetch_field_direct(m_Res, i);
#endif // _DEBUG
MYSQL_ROW row = m_Row + i;
return (row) ? (char*)*row : (char*)"<null>";
} else
return NULL;
} // end of GetCharField
/***********************************************************************/
/* Get the max length of the field. */
/***********************************************************************/
int MYSQLC::GetFieldLength(int i)
{
if (m_Res) {
// MYSQL_FIELD *fld = mysql_fetch_field_direct(m_Res, i);
// return fld->max_length;
return (m_Res)->fields[i].max_length;
} else
return 0;
} // end of GetFieldLength
/***********************************************************************/
/* Return next field of the query results. */
/***********************************************************************/
MYSQL_FIELD *MYSQLC::GetNextField(void)
{
return (m_Res->current_field >= m_Res->field_count) ? NULL
: &m_Res->fields[m_Res->current_field++];
} // end of GetNextField
/***********************************************************************/
/* Make a CONNECT result structure from the MySQL result. */
/***********************************************************************/
PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb)
{
- FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
2014-03-18 19:25:50 +01:00
char *fmt, v;
int n;
bool uns;
PCOLRES *pcrp, crp;
PQRYRES qrp;
MYSQL_FIELD *fld;
MYSQL_ROW row;
if (!m_Res || !m_Fields) {
sprintf(g->Message, "%s result", (m_Res) ? "Void" : "No");
return NULL;
} // endif m_Res
/*********************************************************************/
/* Put the result in storage for future retrieval. */
/*********************************************************************/
qrp = (PQRYRES)PlugSubAlloc(g, NULL, sizeof(QRYRES));
pcrp = &qrp->Colresp;
qrp->Continued = FALSE;
qrp->Truncated = FALSE;
qrp->Info = FALSE;
qrp->Suball = TRUE;
qrp->BadLines = 0;
qrp->Maxsize = m_Rows;
qrp->Maxres = m_Rows;
qrp->Nbcol = 0;
qrp->Nblin = 0;
qrp->Cursor = 0;
//for (fld = mysql_fetch_field(m_Res); fld;
// fld = mysql_fetch_field(m_Res)) {
for (fld = GetNextField(); fld; fld = GetNextField()) {
*pcrp = (PCOLRES)PlugSubAlloc(g, NULL, sizeof(COLRES));
crp = *pcrp;
pcrp = &crp->Next;
memset(crp, 0, sizeof(COLRES));
crp->Ncol = ++qrp->Nbcol;
crp->Name = (char*)PlugSubAlloc(g, NULL, fld->name_length + 1);
strcpy(crp->Name, fld->name);
- FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
2014-03-18 19:25:50 +01:00
if ((crp->Type = MYSQLtoPLG(fld->type, &v)) == TYPE_ERROR) {
sprintf(g->Message, "Type %d not supported for column %s",
fld->type, crp->Name);
return NULL;
} else if (crp->Type == TYPE_DATE && !pdb)
// For direct MySQL connection, display the MySQL date string
crp->Type = TYPE_STRING;
- FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
2014-03-18 19:25:50 +01:00
else
crp->Var = v;
crp->Prec = (crp->Type == TYPE_DOUBLE || crp->Type == TYPE_DECIM)
? fld->decimals : 0;
- FIX PIVOT bug MDEV-5869 caused by using fop (field option ptr) when NULL. modified: storage/connect/ha_connect.cc - Suppress the use of connect.in by adding the connect_xtrace system variable. modified: storage/connect/ha_connect.cc - Make column length, varchar, and temporal column types recognized in discovery when using SRCDEF,or PIVOT. modified: storage/connect/ha_connect.cc storage/connect/myconn.cpp storage/connect/myutil.cpp storage/connect/plgdbsem.h - Avoid (rare) crash when using DECIMAL type. (buf was too small) modified: storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/valblk.cpp storage/connect/value.cpp - General cleaning of unused code, standardize tracing, and update version number modified: storage/connect/block.h storage/connect/colblk.cpp storage/connect/connect.cc storage/connect/csort.h storage/connect/filamap.cpp storage/connect/filamdbf.cpp storage/connect/filamfix.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/myconn.cpp storage/connect/mysql-test/connect/r/alter.result storage/connect/mysql-test/connect/r/xml.result storage/connect/myutil.cpp storage/connect/osutil.c storage/connect/plgdbsem.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/reldef.cpp storage/connect/tabcol.cpp storage/connect/tabfmt.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabpivot.cpp storage/connect/tabvct.cpp storage/connect/user_connect.cc storage/connect/valblk.cpp storage/connect/value.cpp storage/connect/xindex.cpp
2014-03-18 19:25:50 +01:00
crp->Length = max(fld->length, fld->max_length);
crp->Clen = GetTypeSize(crp->Type, crp->Length);
uns = (fld->flags & (UNSIGNED_FLAG | ZEROFILL_FLAG)) ? true : false;
if (!(crp->Kdata = AllocValBlock(g, NULL, crp->Type, m_Rows,
crp->Clen, 0, FALSE, TRUE, uns))) {
sprintf(g->Message, MSG(INV_RESULT_TYPE),
GetFormatType(crp->Type));
return NULL;
} else if (crp->Type == TYPE_DATE) {
fmt = MyDateFmt(fld->type);
crp->Kdata->SetFormat(g, fmt, strlen(fmt));
} // endif's
if (fld->flags & NOT_NULL_FLAG)
crp->Nulls = NULL;
else {
crp->Nulls = (char*)PlugSubAlloc(g, NULL, m_Rows);
memset(crp->Nulls, ' ', m_Rows);
} // endelse fld->flags
} // endfor fld
*pcrp = NULL;
assert(qrp->Nbcol == m_Fields);
/*********************************************************************/
/* Now fill the allocated result structure. */
/*********************************************************************/
for (n = 0; n < m_Rows; n++) {
if (!(m_Row = mysql_fetch_row(m_Res))) {
sprintf(g->Message, "Missing row %d from result", n + 1);
return NULL;
} // endif m_Row
for (crp = qrp->Colresp; crp; crp = crp->Next) {
if ((row = m_Row + (crp->Ncol - 1))) {
if (*row)
crp->Kdata->SetValue((PSZ)*row, n);
else {
if (!*row && crp->Nulls)
crp->Nulls[n] = '*'; // Null value
crp->Kdata->Reset(n);
} // endelse *row
}
} // endfor crp
} // endfor n
qrp->Nblin = n;
return qrp;
} // end of GetResult
/***********************************************************************/
/* Free the current result. */
/***********************************************************************/
void MYSQLC::FreeResult(void)
{
if (m_Res) {
mysql_free_result(m_Res);
m_Res = NULL;
} // endif m_Res
// Reset the connection
m_Row = NULL;
m_Rows = -1;
m_Fields = -1;
N = 0;
} // end of FreeResult
/***********************************************************************/
/* Place the cursor at the beginning of the result set. */
/***********************************************************************/
void MYSQLC::Rewind(void)
{
if (m_Res)
DataSeek(0);
} // end of Rewind
/***********************************************************************/
/* Exec the Select SQL command and return ncol or afrws (TDBMYEXC). */
/***********************************************************************/
int MYSQLC::ExecSQLcmd(PGLOBAL g, const char *query, int *w)
{
int rc = RC_OK;
if (!m_DB) {
strcpy(g->Message, "MySQL not connected");
return RC_FX;
} else
*w = 0;
if (!stricmp(query, "Warning") || !stricmp(query, "Note")
|| !stricmp(query, "Error"))
return RC_INFO;
else
m_Afrw = 0;
//if (mysql_query(m_DB, query) != 0) {
if (mysql_real_query(m_DB, query, strlen(query))) {
m_Afrw = (int)mysql_errno(m_DB);
sprintf(g->Message, "Remote: %s", mysql_error(m_DB));
rc = RC_FX;
//} else if (!(m_Fields = mysql_field_count(m_DB))) {
} else if (!(m_Fields = (int)m_DB->field_count)) {
// m_Afrw = (int)mysql_affected_rows(m_DB);
m_Afrw = (int)m_DB->affected_rows;
rc = RC_NF;
} // endif's
//*w = mysql_warning_count(m_DB);
*w = m_DB->warning_count;
return rc;
} // end of ExecSQLcmd
/***********************************************************************/
/* Close the connection. */
/***********************************************************************/
void MYSQLC::Close(void)
{
FreeResult();
mysql_close(m_DB);
m_DB = NULL;
} // end of Close
#if 0 // not used yet
/***********************************************************************/
/* Discard additional results from a stored procedure. */
/***********************************************************************/
void MYSQLC::DiscardResults(void)
{
MYSQL_RES *res;
while (!mysql_next_result(m_DB)) {
res = mysql_store_result(m_DB);
mysql_free_result(res);
} // endwhile next result
} // end of DiscardResults
#endif // 0