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
d6676b0f
Commit
d6676b0f
authored
May 10, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merged ha_ndbcluster.cc
sql/ha_ndbcluster.h: Auto merged
parents
075eb338
e6bec02e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
275 additions
and
135 deletions
+275
-135
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+51
-3
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+16
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+205
-124
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+3
-3
No files found.
mysql-test/r/ndb_basic.result
View file @
d6676b0f
...
@@ -25,11 +25,59 @@ pk1 attr1
...
@@ -25,11 +25,59 @@ pk1 attr1
DELETE FROM t1;
DELETE FROM t1;
SELECT * FROM t1;
SELECT * FROM t1;
pk1 attr1
pk1 attr1
INSERT INTO t1 VALUES (9410,9412);
INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765),
(7,8), (8,9), (9,10), (10,11), (11,12), (12,13), (13,14);
UPDATE t1 SET attr1 = 9999;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9999
8 9999
9 9999
10 9999
11 9999
12 9999
13 9999
9408 9999
9410 9999
9411 9999
UPDATE t1 SET attr1 = 9998 WHERE pk1 < 1000;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9999
9410 9999
9411 9999
UPDATE t1 SET attr1 = 9997 WHERE attr1 = 9999;
SELECT * FROM t1 ORDER BY pk1;
pk1 attr1
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9997
9410 9997
9411 9997
DELETE FROM t1 WHERE pk1 = 9410;
DELETE FROM t1 WHERE pk1 = 9410;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1
pk1 attr1
INSERT INTO t1 VALUES (9410,9412), (9411, 9413), (9408, 8765);
7 9998
8 9998
9 9998
10 9998
11 9998
12 9998
13 9998
9408 9997
9411 9997
DELETE FROM t1;
DELETE FROM t1;
SELECT * FROM t1;
SELECT * FROM t1;
pk1 attr1
pk1 attr1
...
...
mysql-test/t/ndb_basic.test
View file @
d6676b0f
...
@@ -23,6 +23,7 @@ SELECT pk1 FROM t1;
...
@@ -23,6 +23,7 @@ SELECT pk1 FROM t1;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
t1
.*
FROM
t1
;
SELECT
t1
.*
FROM
t1
;
# Update on record by primary key
UPDATE
t1
SET
attr1
=
1
WHERE
pk1
=
9410
;
UPDATE
t1
SET
attr1
=
1
WHERE
pk1
=
9410
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
...
@@ -35,13 +36,23 @@ SELECT * FROM t1;
...
@@ -35,13 +36,23 @@ SELECT * FROM t1;
DELETE
FROM
t1
;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
# Delete the record by specifying pk
# Insert more records and update them all at once
INSERT
INTO
t1
VALUES
(
9410
,
9412
);
INSERT
INTO
t1
VALUES
(
9410
,
9412
),
(
9411
,
9413
),
(
9408
,
8765
),
(
7
,
8
),
(
8
,
9
),
(
9
,
10
),
(
10
,
11
),
(
11
,
12
),
(
12
,
13
),
(
13
,
14
);
UPDATE
t1
SET
attr1
=
9999
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
UPDATE
t1
SET
attr1
=
9998
WHERE
pk1
<
1000
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
UPDATE
t1
SET
attr1
=
9997
WHERE
attr1
=
9999
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Delete one record by specifying pk
DELETE
FROM
t1
WHERE
pk1
=
9410
;
DELETE
FROM
t1
WHERE
pk1
=
9410
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Insert three records and delete the
# Delete all from table
INSERT
INTO
t1
VALUES
(
9410
,
9412
),
(
9411
,
9413
),
(
9408
,
8765
);
DELETE
FROM
t1
;
DELETE
FROM
t1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
...
...
sql/ha_ndbcluster.cc
View file @
d6676b0f
This diff is collapsed.
Click to expand it.
sql/ha_ndbcluster.h
View file @
d6676b0f
...
@@ -152,6 +152,7 @@ class ha_ndbcluster: public handler
...
@@ -152,6 +152,7 @@ class ha_ndbcluster: public handler
const
char
*
get_unique_index_name
(
uint
idx_no
)
const
;
const
char
*
get_unique_index_name
(
uint
idx_no
)
const
;
NDB_INDEX_TYPE
get_index_type
(
uint
idx_no
)
const
;
NDB_INDEX_TYPE
get_index_type
(
uint
idx_no
)
const
;
NDB_INDEX_TYPE
get_index_type_from_table
(
uint
index_no
)
const
;
NDB_INDEX_TYPE
get_index_type_from_table
(
uint
index_no
)
const
;
int
get_ndb_lock_type
();
int
pk_read
(
const
byte
*
key
,
uint
key_len
,
int
pk_read
(
const
byte
*
key
,
uint
key_len
,
byte
*
buf
);
byte
*
buf
);
...
@@ -162,12 +163,10 @@ class ha_ndbcluster: public handler
...
@@ -162,12 +163,10 @@ class ha_ndbcluster: public handler
bool
sorted
,
byte
*
buf
);
bool
sorted
,
byte
*
buf
);
int
full_table_scan
(
byte
*
buf
);
int
full_table_scan
(
byte
*
buf
);
int
next_result
(
byte
*
buf
);
int
next_result
(
byte
*
buf
);
#if 0
int
define_read_attrs
(
byte
*
buf
,
NdbOperation
*
op
);
int
filtered_scan
(
const
byte
*
key
,
uint
key_len
,
int
filtered_scan
(
const
byte
*
key
,
uint
key_len
,
byte
*
buf
,
byte
*
buf
,
enum
ha_rkey_function
find_flag
);
enum
ha_rkey_function
find_flag
);
#endif
void
unpack_record
(
byte
*
buf
);
void
unpack_record
(
byte
*
buf
);
void
set_dbname
(
const
char
*
pathname
);
void
set_dbname
(
const
char
*
pathname
);
...
@@ -212,6 +211,7 @@ class ha_ndbcluster: public handler
...
@@ -212,6 +211,7 @@ class ha_ndbcluster: public handler
ha_rows
rows_to_insert
;
ha_rows
rows_to_insert
;
ha_rows
rows_inserted
;
ha_rows
rows_inserted
;
ha_rows
bulk_insert_rows
;
ha_rows
bulk_insert_rows
;
ha_rows
ops_pending
;
};
};
bool
ndbcluster_init
(
void
);
bool
ndbcluster_init
(
void
);
...
...
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