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
6c08ff3e
Commit
6c08ff3e
authored
Jun 20, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/5.5' into 10.0
parents
5f2a67a6
170b43c1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
164 additions
and
3 deletions
+164
-3
mysql-test/r/auto_increment.result
mysql-test/r/auto_increment.result
+29
-0
mysql-test/suite/heap/heap_auto_increment.result
mysql-test/suite/heap/heap_auto_increment.result
+29
-0
mysql-test/suite/heap/heap_auto_increment.test
mysql-test/suite/heap/heap_auto_increment.test
+25
-0
mysql-test/suite/maria/maria.result
mysql-test/suite/maria/maria.result
+29
-0
mysql-test/suite/maria/maria.test
mysql-test/suite/maria/maria.test
+24
-0
mysql-test/t/auto_increment.test
mysql-test/t/auto_increment.test
+25
-0
storage/heap/hp_hash.c
storage/heap/hp_hash.c
+1
-1
storage/maria/ma_key.c
storage/maria/ma_key.c
+1
-1
storage/myisam/mi_key.c
storage/myisam/mi_key.c
+1
-1
No files found.
mysql-test/r/auto_increment.result
View file @
6c08ff3e
...
...
@@ -537,3 +537,32 @@ pk
-5
1
drop table t1;
#
# Start of 5.5 tests
#
#
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
#
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
id name
-1 dog
2 cat
DROP TABLE t1;
#
# End of 5.5 tests
#
mysql-test/suite/heap/heap_auto_increment.result
View file @
6c08ff3e
...
...
@@ -39,3 +39,32 @@ _rowid _rowid skey sval
1 1 1 hello
2 2 2 hey
drop table t1;
#
# Start of 5.5 tests
#
#
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
#
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MEMORY;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
id name
-1 dog
2 cat
DROP TABLE t1;
#
# End of 5.5 tests
#
mysql-test/suite/heap/heap_auto_increment.test
View file @
6c08ff3e
...
...
@@ -33,3 +33,28 @@ select _rowid,t1._rowid,skey,sval from t1;
drop
table
t1
;
# End of 4.1 tests
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
--
echo
#
CREATE
TABLE
t1
(
id
TINYINT
NOT
NULL
AUTO_INCREMENT
,
name
CHAR
(
30
)
NOT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
MEMORY
;
SHOW
CREATE
TABLE
t1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'dog'
);
UPDATE
t1
SET
id
=-
1
WHERE
id
=
1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'cat'
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
mysql-test/suite/maria/maria.result
View file @
6c08ff3e
...
...
@@ -2707,6 +2707,35 @@ INSERT INTO t1 (b) VALUES ('');
ALTER TABLE t1 ENABLE KEYS;
DROP TABLE t1;
#
# Start of 5.5 tests
#
#
#
MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
#
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
)
ENGINE=ARIA;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
id name
-1 dog
2 cat
DROP TABLE t1;
#
# End of 5.5 tests
#
#
#
BUG#47444 - --myisam_repair_threads > 1 can result in all index
#
cardinalities=1
#
...
...
mysql-test/suite/maria/maria.test
View file @
6c08ff3e
...
...
@@ -1982,6 +1982,30 @@ ALTER TABLE t1 ENABLE KEYS;
# Cleanup
DROP
TABLE
t1
;
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
--
echo
#
CREATE
TABLE
t1
(
id
TINYINT
NOT
NULL
AUTO_INCREMENT
,
name
CHAR
(
30
)
NOT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
ARIA
;
SHOW
CREATE
TABLE
t1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'dog'
);
UPDATE
t1
SET
id
=-
1
WHERE
id
=
1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'cat'
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
--
echo
#
--
echo
# BUG#47444 - --myisam_repair_threads > 1 can result in all index
--
echo
# cardinalities=1
...
...
mysql-test/t/auto_increment.test
View file @
6c08ff3e
...
...
@@ -397,3 +397,28 @@ insert into t1 values(null);
select
last_insert_id
();
select
*
from
t1
;
drop
table
t1
;
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
--
echo
#
CREATE
TABLE
t1
(
id
TINYINT
NOT
NULL
AUTO_INCREMENT
,
name
CHAR
(
30
)
NOT
NULL
,
PRIMARY
KEY
(
id
)
)
ENGINE
=
MyISAM
;
SHOW
CREATE
TABLE
t1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'dog'
);
UPDATE
t1
SET
id
=-
1
WHERE
id
=
1
;
INSERT
INTO
t1
(
name
)
VALUES
(
'cat'
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
storage/heap/hp_hash.c
View file @
6c08ff3e
...
...
@@ -1022,7 +1022,7 @@ void heap_update_auto_increment(HP_INFO *info, const uchar *record)
switch
(
info
->
s
->
auto_key_type
)
{
case
HA_KEYTYPE_INT8
:
s_value
=
(
longlong
)
*
(
c
har
*
)
key
;
s_value
=
(
longlong
)
*
(
c
onst
signed
char
*
)
key
;
break
;
case
HA_KEYTYPE_BINARY
:
value
=
(
ulonglong
)
*
(
uchar
*
)
key
;
...
...
storage/maria/ma_key.c
View file @
6c08ff3e
...
...
@@ -728,7 +728,7 @@ ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type)
switch
(
key_type
)
{
case
HA_KEYTYPE_INT8
:
s_value
=
(
longlong
)
*
(
const
char
*
)
key
;
s_value
=
(
longlong
)
*
(
const
signed
char
*
)
key
;
break
;
case
HA_KEYTYPE_BINARY
:
value
=
(
ulonglong
)
*
key
;
...
...
storage/myisam/mi_key.c
View file @
6c08ff3e
...
...
@@ -553,7 +553,7 @@ ulonglong retrieve_auto_increment(MI_INFO *info,const uchar *record)
switch
(
keyseg
->
type
)
{
case
HA_KEYTYPE_INT8
:
s_value
=
(
longlong
)
*
(
c
har
*
)
key
;
s_value
=
(
longlong
)
*
(
c
onst
signed
char
*
)
key
;
break
;
case
HA_KEYTYPE_BINARY
:
value
=
(
ulonglong
)
*
(
uchar
*
)
key
;
...
...
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