Commit ab44e1f8 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents 2ac1edb1 3278c579
......@@ -13,4 +13,3 @@
rtree_concurrent_srch : MDEV-15284 COUNT(*) mismatch
rtree_recovery : MDEV-15284 COUNT(*) mismatch
rtree_compress2 : MDEV-16269 CHECK TABLE reports wrong count
types : MDEV-22512 recovery runs out of memory before 10.5
recover : MDEV-22512 recovery runs out of memory before 10.5
......@@ -319,3 +319,12 @@ SELECT * from pg_in_maria;
my space column
My value
DROP TABLE pg_in_maria;
#
# MDEV-29397 UPDATE with WHERE on part of two-part primary key causes
# info to turn into error.
#
CREATE TABLE t1 (a VARCHAR(6), b VARCHAR(6), PRIMARY KEY(a, b)) ENGINE=CONNECT TABNAME='schema1.t3' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr';
UPDATE t1 SET a='10' WHERE a='20';
Warnings:
Note 1105 schema1.t3: 0 affected rows
DROP TABLE t1;
......@@ -223,3 +223,12 @@ DROP TABLE t1;
CREATE TABLE pg_in_maria ENGINE=CONNECT TABNAME='schema1.space_in_column_name' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr' quoted=1;
SELECT * from pg_in_maria;
DROP TABLE pg_in_maria;
--echo #
--echo # MDEV-29397 UPDATE with WHERE on part of two-part primary key causes
--echo # info to turn into error.
--echo #
CREATE TABLE t1 (a VARCHAR(6), b VARCHAR(6), PRIMARY KEY(a, b)) ENGINE=CONNECT TABNAME='schema1.t3' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr';
UPDATE t1 SET a='10' WHERE a='20';
DROP TABLE t1;
......@@ -2583,7 +2583,7 @@ int ODBConn::Rewind(char *sql, ODBCCOL *tocols)
int rc, rbuf = -1;
if (!m_hstmt)
rbuf = -1;
rbuf = 0;
else if (m_Full)
rbuf = m_Rows; // No need to "rewind"
else if (m_Scrollable) {
......
......@@ -472,7 +472,7 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
my_len= res - buf + 1;
my_schema_table= (char *) malloc(my_len);
memcpy(my_schema_table, buf, my_len - 1);
my_schema_table[my_len] = 0;
my_schema_table[my_len - 1] = 0;
Query->Append(Quote);
Query->Append(my_schema_table);
Query->Append(Quote);
......@@ -480,7 +480,7 @@ bool TDBEXT::MakeSQL(PGLOBAL g, bool cnt)
Query->Append(".");
// Parse table
my_len= strlen(buf) - my_len + 1;
my_schema_table= (char *) malloc(my_len);
my_schema_table= (char *) malloc(my_len + 1);
memcpy(my_schema_table, ++res, my_len);
my_schema_table[my_len] = 0;
Query->Append(Quote);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment