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
04fc4ead
Commit
04fc4ead
authored
Jun 26, 2019
by
Roman Nozdrin
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CLX-6 Create non-existed schemas at CLX BE on CREATE TABLE to
syncronize the schema list at MDB FE and CLX BE.
parent
82faccc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
mysql-test/suite/clustrixdb/basics.test
mysql-test/suite/clustrixdb/basics.test
+4
-4
storage/clustrixdb/ha_clustrixdb.cc
storage/clustrixdb/ha_clustrixdb.cc
+9
-0
No files found.
mysql-test/suite/clustrixdb/basics.test
View file @
04fc4ead
#
CREATE DATABASE clx;
CREATE
DATABASE
clx
;
#
USE clx;
USE
clx
;
DROP
TABLE
IF
EXISTS
cx1
;
DROP
TABLE
IF
EXISTS
cx1
;
CREATE
TABLE
cx1
(
i
BIGINT
)
ENGINE
=
clustrixdb
;
CREATE
TABLE
cx1
(
i
BIGINT
)
ENGINE
=
clustrixdb
;
...
@@ -15,5 +15,5 @@ DROP TABLE cx1;
...
@@ -15,5 +15,5 @@ DROP TABLE cx1;
--
error
ER_NO_SUCH_TABLE
--
error
ER_NO_SUCH_TABLE
SHOW
CREATE
TABLE
cx1
;
SHOW
CREATE
TABLE
cx1
;
#
USE test;
USE
test
;
#DROP DATABASE cxl
;
DROP
DATABASE
clx
;
storage/clustrixdb/ha_clustrixdb.cc
View file @
04fc4ead
...
@@ -232,6 +232,15 @@ int ha_clustrixdb::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
...
@@ -232,6 +232,15 @@ int ha_clustrixdb::create(const char *name, TABLE *form, HA_CREATE_INFO *info)
if
(
error_code
)
if
(
error_code
)
return
error_code
;
return
error_code
;
// To syncronize the schemas of MDB FE and CLX BE.
if
(
form
->
s
&&
form
->
s
->
db
.
length
)
{
String
createdb_stmt
;
createdb_stmt
.
append
(
"CREATE DATABASE IF NOT EXISTS `"
);
createdb_stmt
.
append
(
form
->
s
->
db
.
str
,
form
->
s
->
db
.
length
);
createdb_stmt
.
append
(
"`"
);
trx
->
clustrix_net
->
create_table
(
createdb_stmt
);
}
error_code
=
trx
->
clustrix_net
->
create_table
(
create_table_stmt
);
error_code
=
trx
->
clustrix_net
->
create_table
(
create_table_stmt
);
return
error_code
;
return
error_code
;
}
}
...
...
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