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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
268c1a2e
Commit
268c1a2e
authored
Jul 31, 2004
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix for alter table and auto_increment
parent
08196b80
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
17 deletions
+30
-17
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+1
-1
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+10
-6
mysql-test/r/ndb_lock.result
mysql-test/r/ndb_lock.result
+5
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+1
-1
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+7
-6
mysql-test/t/ndb_lock.test
mysql-test/t/ndb_lock.test
+5
-2
ndb/src/ndbapi/NdbDictionaryImpl.cpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp
+1
-1
No files found.
mysql-test/r/ndb_alter_table.result
View file @
268c1a2e
...
...
@@ -15,7 +15,7 @@ col2 varchar(30) not null,
col3 varchar (20) not null,
col4 varchar(4) not null,
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
col6 int not null, to_be_deleted int);
col6 int not null, to_be_deleted int)
ENGINE=ndbcluster
;
insert into t1 values (2,4,3,5,"PENDING",1,7);
alter table t1
add column col4_5 varchar(20) not null after col4,
...
...
mysql-test/r/ndb_basic.result
View file @
268c1a2e
...
...
@@ -6,20 +6,20 @@ attr2 INT,
attr3 VARCHAR(10)
) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
SELECT pk1 FROM t1;
SELECT pk1 FROM t1
ORDER BY pk1
;
pk1
9410
9411
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1 attr2 attr3
9410 9412 NULL 9412
9411 9413 17 9413
SELECT t1.* FROM t1;
SELECT t1.* FROM t1
ORDER BY pk1
;
pk1 attr1 attr2 attr3
9410 9412 NULL 9412
9411 9413 17 9413
UPDATE t1 SET attr1=1 WHERE pk1=9410;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1 attr2 attr3
9410 1 NULL 9412
9411 9413 17 9413
...
...
@@ -115,13 +115,17 @@ SELECT * FROM t1;
id id2
1234 7890
DELETE FROM t1;
INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890);
SELECT * FROM t1;
INSERT INTO t1 values(3456, 7890), (3456, 7890), (3456, 7890)
, (3454, 7890)
;
SELECT * FROM t1
ORDER BY id
;
id id2
3454 7890
3456 7890
3456 7890
3456 7890
DELETE FROM t1 WHERE id = 3456;
SELECT * FROM t1 ORDER BY id;
id id2
3454 7890
DROP TABLE t1;
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
...
...
mysql-test/r/ndb_lock.result
View file @
268c1a2e
...
...
@@ -11,6 +11,11 @@ x y
2 two
start transaction;
insert into t1 values (3,'three');
select * from t1 order by x;
x y
1 one
2 two
3 three
start transaction;
select * from t1 order by x;
x y
...
...
mysql-test/t/ndb_alter_table.test
View file @
268c1a2e
...
...
@@ -29,7 +29,7 @@ col2 varchar(30) not null,
col3
varchar
(
20
)
not
null
,
col4
varchar
(
4
)
not
null
,
col5
enum
(
'PENDING'
,
'ACTIVE'
,
'DISABLED'
)
not
null
,
col6
int
not
null
,
to_be_deleted
int
);
col6
int
not
null
,
to_be_deleted
int
)
ENGINE
=
ndbcluster
;
insert
into
t1
values
(
2
,
4
,
3
,
5
,
"PENDING"
,
1
,
7
);
alter
table
t1
add
column
col4_5
varchar
(
20
)
not
null
after
col4
,
...
...
mysql-test/t/ndb_basic.test
View file @
268c1a2e
...
...
@@ -21,13 +21,13 @@ CREATE TABLE t1 (
INSERT
INTO
t1
VALUES
(
9410
,
9412
,
NULL
,
'9412'
),
(
9411
,
9413
,
17
,
'9413'
);
SELECT
pk1
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
t1
.*
FROM
t1
;
SELECT
pk1
FROM
t1
ORDER
BY
pk1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
SELECT
t1
.*
FROM
t1
ORDER
BY
pk1
;
# Update on record by primary key
UPDATE
t1
SET
attr1
=
1
WHERE
pk1
=
9410
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Update primary key
UPDATE
t1
SET
pk1
=
2
WHERE
attr1
=
1
;
...
...
@@ -85,9 +85,10 @@ UPDATE t1 SET id=1234 WHERE id2=7890;
SELECT
*
FROM
t1
;
DELETE
FROM
t1
;
INSERT
INTO
t1
values
(
3456
,
7890
),
(
3456
,
7890
),
(
3456
,
7890
);
SELECT
*
FROM
t1
;
INSERT
INTO
t1
values
(
3456
,
7890
),
(
3456
,
7890
),
(
3456
,
7890
)
,
(
3454
,
7890
)
;
SELECT
*
FROM
t1
ORDER
BY
id
;
DELETE
FROM
t1
WHERE
id
=
3456
;
SELECT
*
FROM
t1
ORDER
BY
id
;
DROP
TABLE
t1
;
...
...
mysql-test/t/ndb_lock.test
View file @
268c1a2e
...
...
@@ -25,10 +25,13 @@ connection con2;
select
*
from
t1
order
by
x
;
connection
con1
;
start
transaction
;
insert
into
t1
values
(
3
,
'three'
);
start
transaction
;
insert
into
t1
values
(
3
,
'three'
);
select
*
from
t1
order
by
x
;
connection
con2
;
start
transaction
;
select
*
from
t1
order
by
x
;
start
transaction
;
select
*
from
t1
order
by
x
;
connection
con1
;
commit
;
...
...
ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
268c1a2e
...
...
@@ -1452,7 +1452,7 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
alterTable
(
&
tSignal
,
ptr
)
:
createTable
(
&
tSignal
,
ptr
);
if
(
haveAutoIncrement
)
{
if
(
!
alter
&&
haveAutoIncrement
)
{
// if (!ndb.setAutoIncrementValue(impl.m_internalName.c_str(), autoIncrementValue)) {
if
(
!
ndb
.
setAutoIncrementValue
(
impl
.
m_externalName
.
c_str
(),
autoIncrementValue
))
{
m_error
.
code
=
4336
;
...
...
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