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
de2fa9ec
Commit
de2fa9ec
authored
Nov 08, 2021
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into bb-10.4-release
parents
a19ab673
227b782a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
5 deletions
+62
-5
VERSION
VERSION
+1
-1
mysql-test/main/long_unique_bugs.result
mysql-test/main/long_unique_bugs.result
+14
-0
mysql-test/main/long_unique_bugs.test
mysql-test/main/long_unique_bugs.test
+16
-0
mysql-test/main/opt_trace.result
mysql-test/main/opt_trace.result
+3
-3
mysql-test/main/opt_trace.test
mysql-test/main/opt_trace.test
+1
-1
mysql-test/main/opt_trace_default.result
mysql-test/main/opt_trace_default.result
+8
-0
mysql-test/main/opt_trace_default.test
mysql-test/main/opt_trace_default.test
+11
-0
sql/field.h
sql/field.h
+3
-0
sql/table.cc
sql/table.cc
+5
-0
No files found.
VERSION
View file @
de2fa9ec
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=4
MYSQL_VERSION_PATCH=2
2
MYSQL_VERSION_PATCH=2
3
SERVER_MATURITY=stable
mysql-test/main/long_unique_bugs.result
View file @
de2fa9ec
...
...
@@ -288,3 +288,17 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t2 0 a 1 a A NULL NULL NULL YES HASH
t2 0 a 2 b A NULL NULL NULL YES HASH
DROP TABLE t1,t2;
#
# MDEV-26453 Assertion `0' failed in row_upd_sec_index_entry & corruption
#
CREATE TABLE t (c INT AUTO_INCREMENT KEY, UNIQUE USING HASH(c));
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the USING HASH clause of `c`
CREATE TABLE t (c INT AUTO_INCREMENT KEY);
CREATE UNIQUE INDEX i USING HASH ON t (c);
ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the USING HASH clause of `c`
INSERT INTO t VALUES (0);
SELECT * FROM t;
c
1
DELETE FROM t;
DROP TABLE t;
mysql-test/main/long_unique_bugs.test
View file @
de2fa9ec
...
...
@@ -368,3 +368,19 @@ show index from t2;
# Cleanup
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# MDEV-26453 Assertion `0' failed in row_upd_sec_index_entry & corruption
--
echo
#
--
error
ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE
TABLE
t
(
c
INT
AUTO_INCREMENT
KEY
,
UNIQUE
USING
HASH
(
c
));
CREATE
TABLE
t
(
c
INT
AUTO_INCREMENT
KEY
);
--
error
ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE
UNIQUE
INDEX
i
USING
HASH
ON
t
(
c
);
INSERT
INTO
t
VALUES
(
0
);
SELECT
*
FROM
t
;
DELETE
FROM
t
;
DROP
TABLE
t
;
mysql-test/main/opt_trace.result
View file @
de2fa9ec
...
...
@@ -4,14 +4,14 @@ OPTIMIZER_TRACE QUERY
OPTIMIZER_TRACE TRACE
OPTIMIZER_TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE
OPTIMIZER_TRACE INSUFFICIENT_PRIVILEGES
show variables like 'optimizer_trace';
Variable_name Value
optimizer_trace enabled=off
set optimizer_trace="enabled=on";
show variables like 'optimizer_trace';
Variable_name Value
optimizer_trace enabled=on
set optimizer_trace="enabled=off";
show variables like 'optimizer_trace';
Variable_name Value
optimizer_trace enabled=off
create table t1 (a int, b int);
insert into t1 values (1,2),(2,3);
create table t2 (b int);
...
...
mysql-test/main/opt_trace.test
View file @
de2fa9ec
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_sequence
.
inc
SELECT
table_name
,
column_name
FROM
information_schema
.
columns
where
table_name
=
"OPTIMIZER_TRACE"
;
show
variables
like
'optimizer_trace'
;
set
optimizer_trace
=
"enabled=on"
;
show
variables
like
'optimizer_trace'
;
set
optimizer_trace
=
"enabled=off"
;
show
variables
like
'optimizer_trace'
;
create
table
t1
(
a
int
,
b
int
);
insert
into
t1
values
(
1
,
2
),(
2
,
3
);
...
...
mysql-test/main/opt_trace_default.result
0 → 100644
View file @
de2fa9ec
# Verify that compile-time default for optimizer trace is OFF (enabled=off).
select
global_value_origin,
default_value
from
INFORMATION_SCHEMA.SYSTEM_VARIABLES where variable_name='optimizer_trace';
global_value_origin default_value
COMPILE-TIME enabled=off
mysql-test/main/opt_trace_default.test
0 → 100644
View file @
de2fa9ec
if
(
`SELECT 'COMPILE-TIME'<>GLOBAL_VALUE_ORIGIN from INFORMATION_SCHEMA.SYSTEM_VARIABLES where variable_name='optimizer_trace'`
)
{
--
Skip
Needs
optimizer_trace
default
to
be
the
compile
-
time
default
}
--
echo
# Verify that compile-time default for optimizer trace is OFF (enabled=off).
select
global_value_origin
,
default_value
from
INFORMATION_SCHEMA
.
SYSTEM_VARIABLES
where
variable_name
=
'optimizer_trace'
;
sql/field.h
View file @
de2fa9ec
...
...
@@ -475,6 +475,7 @@ enum enum_vcol_info_type
{
VCOL_GENERATED_VIRTUAL
,
VCOL_GENERATED_STORED
,
VCOL_DEFAULT
,
VCOL_CHECK_FIELD
,
VCOL_CHECK_TABLE
,
VCOL_USING_HASH
,
/* Additional types should be added here */
/* Following is the highest value last */
VCOL_TYPE_NONE
=
127
// Since the 0 value is already in use
...
...
@@ -492,6 +493,8 @@ static inline const char *vcol_type_name(enum_vcol_info_type type)
case
VCOL_CHECK_FIELD
:
case
VCOL_CHECK_TABLE
:
return
"CHECK"
;
case
VCOL_USING_HASH
:
return
"USING HASH"
;
case
VCOL_TYPE_NONE
:
return
"UNTYPED"
;
}
...
...
sql/table.cc
View file @
de2fa9ec
...
...
@@ -1065,6 +1065,8 @@ static void mysql57_calculate_null_position(TABLE_SHARE *share,
}
}
static
bool
fix_and_check_vcol_expr
(
THD
*
thd
,
TABLE
*
table
,
Virtual_column_info
*
vcol
);
/** Parse TABLE_SHARE::vcol_defs
...
...
@@ -1256,6 +1258,9 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
Virtual_column_info
*
v
=
new
(
mem_root
)
Virtual_column_info
();
field
->
vcol_info
=
v
;
field
->
vcol_info
->
expr
=
hash_item
;
field
->
vcol_info
->
set_vcol_type
(
VCOL_USING_HASH
);
if
(
fix_and_check_vcol_expr
(
thd
,
table
,
v
))
goto
end
;
key
->
user_defined_key_parts
=
key
->
ext_key_parts
=
key
->
usable_key_parts
=
1
;
key
->
key_part
+=
parts
;
...
...
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