Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
20969aa4
Commit
20969aa4
authored
Nov 09, 2022
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
8fb176c3
6b91792a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
10 deletions
+28
-10
storage/connect/mysql-test/connect/r/odbc_postgresql.result
storage/connect/mysql-test/connect/r/odbc_postgresql.result
+9
-0
storage/connect/mysql-test/connect/t/odbc_postgresql.test
storage/connect/mysql-test/connect/t/odbc_postgresql.test
+9
-0
storage/connect/odbconn.cpp
storage/connect/odbconn.cpp
+1
-1
storage/connect/tabext.cpp
storage/connect/tabext.cpp
+2
-2
storage/innobase/btr/btr0btr.cc
storage/innobase/btr/btr0btr.cc
+2
-2
storage/innobase/dict/dict0defrag_bg.cc
storage/innobase/dict/dict0defrag_bg.cc
+2
-2
storage/innobase/dict/dict0stats.cc
storage/innobase/dict/dict0stats.cc
+3
-3
No files found.
storage/connect/mysql-test/connect/r/odbc_postgresql.result
View file @
20969aa4
...
...
@@ -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;
storage/connect/mysql-test/connect/t/odbc_postgresql.test
View file @
20969aa4
...
...
@@ -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
;
storage/connect/odbconn.cpp
View file @
20969aa4
...
...
@@ -2582,7 +2582,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
)
{
...
...
storage/connect/tabext.cpp
View file @
20969aa4
...
...
@@ -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
);
...
...
storage/innobase/btr/btr0btr.cc
View file @
20969aa4
...
...
@@ -614,7 +614,7 @@ btr_get_size(
ut_ad
(
srv_read_only_mode
||
mtr_memo_contains
(
mtr
,
dict_index_get_lock
(
index
),
MTR_MEMO_S_LOCK
));
MTR_MEMO_S
X
_LOCK
));
if
(
index
->
page
==
FIL_NULL
||
dict_index_is_online_ddl
(
index
)
...
...
@@ -668,7 +668,7 @@ btr_get_size_and_reserved(
ulint
dummy
;
ut_ad
(
mtr_memo_contains
(
mtr
,
dict_index_get_lock
(
index
),
MTR_MEMO_S_LOCK
));
MTR_MEMO_S
X
_LOCK
));
ut_a
(
flag
==
BTR_N_LEAF_PAGES
||
flag
==
BTR_TOTAL_SIZE
);
...
...
storage/innobase/dict/dict0defrag_bg.cc
View file @
20969aa4
/*****************************************************************************
Copyright (c) 2016, 20
19
, MariaDB Corporation.
Copyright (c) 2016, 20
22
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -280,7 +280,7 @@ dict_stats_save_defrag_stats(
ulint
n_leaf_pages
;
ulint
n_leaf_reserved
;
mtr
.
start
();
mtr_s_lock_index
(
index
,
&
mtr
);
mtr_s
x
_lock_index
(
index
,
&
mtr
);
n_leaf_reserved
=
btr_get_size_and_reserved
(
index
,
BTR_N_LEAF_PAGES
,
&
n_leaf_pages
,
&
mtr
);
mtr
.
commit
();
...
...
storage/innobase/dict/dict0stats.cc
View file @
20969aa4
/*****************************************************************************
Copyright (c) 2009, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 202
1
, MariaDB Corporation.
Copyright (c) 2015, 202
2
, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
...
...
@@ -851,7 +851,7 @@ dict_stats_update_transient_for_index(
ulint
size
;
mtr
.
start
();
mtr_s_lock_index
(
index
,
&
mtr
);
mtr_s
x
_lock_index
(
index
,
&
mtr
);
size
=
btr_get_size
(
index
,
BTR_TOTAL_SIZE
,
&
mtr
);
if
(
size
!=
ULINT_UNDEFINED
)
{
...
...
@@ -1944,7 +1944,7 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index)
DEBUG_PRINTF
(
" %s(index=%s)
\n
"
,
__func__
,
index
->
name
());
mtr
.
start
();
mtr_s_lock_index
(
index
,
&
mtr
);
mtr_s
x
_lock_index
(
index
,
&
mtr
);
size
=
btr_get_size
(
index
,
BTR_TOTAL_SIZE
,
&
mtr
);
if
(
size
!=
ULINT_UNDEFINED
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment