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
386276d8
Commit
386276d8
authored
Feb 26, 2006
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups
Don't run upgrade.test with embedded server as it requires mysqlcheck
parent
e6a98314
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
62 deletions
+71
-62
mysql-test/r/upgrade.result
mysql-test/r/upgrade.result
+31
-31
mysql-test/t/upgrade.test
mysql-test/t/upgrade.test
+24
-21
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+11
-5
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+5
-5
No files found.
mysql-test/r/upgrade.result
View file @
386276d8
drop database if exists `
testdb
1`;
drop database if exists `
testdb
-1`;
drop database if exists `#mysql50#
testdb
-1`;
create database `
testdb
1`;
create database `#mysql50#
testdb
-1`;
create table `
testdb
1`.`t1` (a int);
create table `
testdb
1`.`#mysql50#t-1` (a int);
create table `#mysql50#
testdb
-1`.`t1` (a int);
create table `#mysql50#
testdb
-1`.`#mysql50#t-1` (a int);
show create database `
testdb
1`;
drop database if exists `
mysqltest
1`;
drop database if exists `
mysqltest
-1`;
drop database if exists `#mysql50#
mysqltest
-1`;
create database `
mysqltest
1`;
create database `#mysql50#
mysqltest
-1`;
create table `
mysqltest
1`.`t1` (a int);
create table `
mysqltest
1`.`#mysql50#t-1` (a int);
create table `#mysql50#
mysqltest
-1`.`t1` (a int);
create table `#mysql50#
mysqltest
-1`.`#mysql50#t-1` (a int);
show create database `
mysqltest
1`;
Database Create Database
testdb1 CREATE DATABASE `testdb
1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `
testdb
-1`;
ERROR 42000: Unknown database '
testdb
-1'
show create database `#mysql50#
testdb
-1`;
mysqltest1 CREATE DATABASE `mysqltest
1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `
mysqltest
-1`;
ERROR 42000: Unknown database '
mysqltest
-1'
show create database `#mysql50#
mysqltest
-1`;
Database Create Database
#mysql50#
testdb-1 CREATE DATABASE `#mysql50#testdb
-1` /*!40100 DEFAULT CHARACTER SET latin1 */
show tables in `
testdb
1`;
Tables_in_
testdb
1
#mysql50#
mysqltest-1 CREATE DATABASE `#mysql50#mysqltest
-1` /*!40100 DEFAULT CHARACTER SET latin1 */
show tables in `
mysqltest
1`;
Tables_in_
mysqltest
1
#mysql50#t-1
t1
show tables in `#mysql50#
testdb
-1`;
Tables_in_#mysql50#
testdb
-1
show tables in `#mysql50#
mysqltest
-1`;
Tables_in_#mysql50#
mysqltest
-1
#mysql50#t-1
t1
show create database `
testdb
1`;
show create database `
mysqltest
1`;
Database Create Database
testdb1 CREATE DATABASE `testdb
1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `
testdb
-1`;
mysqltest1 CREATE DATABASE `mysqltest
1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `
mysqltest
-1`;
Database Create Database
testdb-1 CREATE DATABASE `testdb
-1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `#mysql50#
testdb
-1`;
ERROR 42000: Unknown database '#mysql50#
testdb
-1'
show tables in `
testdb
1`;
Tables_in_
testdb
1
mysqltest-1 CREATE DATABASE `mysqltest
-1` /*!40100 DEFAULT CHARACTER SET latin1 */
show create database `#mysql50#
mysqltest
-1`;
ERROR 42000: Unknown database '#mysql50#
mysqltest
-1'
show tables in `
mysqltest
1`;
Tables_in_
mysqltest
1
t1
t-1
show tables in `
testdb
-1`;
Tables_in_
testdb
-1
show tables in `
mysqltest
-1`;
Tables_in_
mysqltest
-1
t1
t-1
drop database `
testdb
1`;
drop database `
testdb
-1`;
drop database `
mysqltest
1`;
drop database `
mysqltest
-1`;
mysql-test/t/upgrade.test
View file @
386276d8
--
source
include
/
not_embedded
.
inc
--
disable_warnings
drop
database
if
exists
`
testdb
1`
;
drop
database
if
exists
`
testdb
-1`
;
drop
database
if
exists
`#mysql50#
testdb
-1`
;
drop
database
if
exists
`
mysqltest
1`
;
drop
database
if
exists
`
mysqltest
-1`
;
drop
database
if
exists
`#mysql50#
mysqltest
-1`
;
--
enable_warnings
create
database
`testdb1`
;
create
database
`#mysql50#testdb-1`
;
create
table
`testdb1`
.
`t1`
(
a
int
);
create
table
`testdb1`
.
`#mysql50#t-1`
(
a
int
);
create
table
`#mysql50#testdb-1`
.
`t1`
(
a
int
);
create
table
`#mysql50#testdb-1`
.
`#mysql50#t-1`
(
a
int
);
show
create
database
`testdb1`
;
create
database
`mysqltest1`
;
create
database
`#mysql50#mysqltest-1`
;
create
table
`mysqltest1`
.
`t1`
(
a
int
);
create
table
`mysqltest1`
.
`#mysql50#t-1`
(
a
int
);
create
table
`#mysql50#mysqltest-1`
.
`t1`
(
a
int
);
create
table
`#mysql50#mysqltest-1`
.
`#mysql50#t-1`
(
a
int
);
show
create
database
`mysqltest1`
;
--
error
1049
show
create
database
`
testdb
-1`
;
show
create
database
`#mysql50#
testdb
-1`
;
show
tables
in
`
testdb
1`
;
show
tables
in
`#mysql50#
testdb
-1`
;
show
create
database
`
mysqltest
-1`
;
show
create
database
`#mysql50#
mysqltest
-1`
;
show
tables
in
`
mysqltest
1`
;
show
tables
in
`#mysql50#
mysqltest
-1`
;
--
exec
$MYSQL_CHECK
--
all
-
databases
--
fix
-
db
-
names
--
fix
-
table
-
names
show
create
database
`
testdb
1`
;
show
create
database
`
testdb
-1`
;
show
create
database
`
mysqltest
1`
;
show
create
database
`
mysqltest
-1`
;
--
error
1049
show
create
database
`#mysql50#
testdb
-1`
;
show
tables
in
`
testdb
1`
;
show
tables
in
`
testdb
-1`
;
drop
database
`
testdb
1`
;
drop
database
`
testdb
-1`
;
show
create
database
`#mysql50#
mysqltest
-1`
;
show
tables
in
`
mysqltest
1`
;
show
tables
in
`
mysqltest
-1`
;
drop
database
`
mysqltest
1`
;
drop
database
`
mysqltest
-1`
;
sql/ha_ndbcluster.cc
View file @
386276d8
...
...
@@ -6700,6 +6700,7 @@ NDB_SHARE *ndbcluster_get_share(NDB_SHARE *share)
return
share
;
}
/*
Get a share object for key
...
...
@@ -6714,17 +6715,19 @@ NDB_SHARE *ndbcluster_get_share(NDB_SHARE *share)
have_lock == TRUE, pthread_mutex_lock(&ndbcluster_mutex) already taken
*/
NDB_SHARE
*
ndbcluster_get_share
(
const
char
*
key
,
TABLE
*
table
,
bool
create_if_not_exists
,
bool
have_lock
)
{
DBUG_ENTER
(
"get_share"
);
DBUG_PRINT
(
"info"
,
(
"get_share: key %s"
,
key
));
THD
*
thd
=
current_thd
;
NDB_SHARE
*
share
;
uint
length
=
(
uint
)
strlen
(
key
);
DBUG_ENTER
(
"ndbcluster_get_share"
);
DBUG_PRINT
(
"enter"
,
(
"key: '%s'"
,
key
));
if
(
!
have_lock
)
pthread_mutex_lock
(
&
ndbcluster_mutex
);
uint
length
=
(
uint
)
strlen
(
key
);
if
(
!
(
share
=
(
NDB_SHARE
*
)
hash_search
(
&
ndbcluster_open_tables
,
(
byte
*
)
key
,
length
)))
...
...
@@ -6784,10 +6787,10 @@ NDB_SHARE *ndbcluster_get_share(const char *key, TABLE *table,
dbug_print_open_tables
();
DBUG_PRINT
(
"
get_share
"
,
DBUG_PRINT
(
"
info
"
,
(
"0x%lx key: %s key_length: %d key: %s"
,
share
,
share
->
key
,
share
->
key_length
,
key
));
DBUG_PRINT
(
"
get_share
"
,
DBUG_PRINT
(
"
info
"
,
(
"db.tablename: %s.%s use_count: %d commit_count: %d"
,
share
->
db
,
share
->
table_name
,
share
->
use_count
,
share
->
commit_count
));
...
...
@@ -6796,8 +6799,10 @@ NDB_SHARE *ndbcluster_get_share(const char *key, TABLE *table,
DBUG_RETURN
(
share
);
}
void
ndbcluster_real_free_share
(
NDB_SHARE
**
share
)
{
DBUG_ENTER
(
"ndbcluster_real_free_share"
);
DBUG_PRINT
(
"real_free_share"
,
(
"0x%lx key: %s key_length: %d"
,
(
*
share
),
(
*
share
)
->
key
,
(
*
share
)
->
key_length
));
...
...
@@ -6835,6 +6840,7 @@ void ndbcluster_real_free_share(NDB_SHARE **share)
*
share
=
0
;
dbug_print_open_tables
();
DBUG_VOID_RETURN
;
}
/*
...
...
sql/ha_ndbcluster_binlog.cc
View file @
386276d8
...
...
@@ -245,10 +245,9 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
sql_print_error
(
"Unable to get table share for %s, error=%d"
,
share
->
key
,
error
);
DBUG_PRINT
(
"error"
,
(
"open_table_def failed %d"
,
error
));
free_table_share
(
table_share
);
my_free
((
gptr
)
table_share
,
MYF
(
0
));
table_share
=
0
;
my_free
((
gptr
)
table
,
MYF
(
0
));
table
=
0
;
DBUG_RETURN
(
error
);
}
if
((
error
=
open_table_from_share
(
thd
,
table_share
,
""
,
0
,
...
...
@@ -257,10 +256,9 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
sql_print_error
(
"Unable to open table for %s, error=%d(%d)"
,
share
->
key
,
error
,
my_errno
);
DBUG_PRINT
(
"error"
,
(
"open_table_from_share failed %d"
,
error
));
free_table_share
(
table_share
);
my_free
((
gptr
)
table_share
,
MYF
(
0
));
table_share
=
0
;
my_free
((
gptr
)
table
,
MYF
(
0
));
table
=
0
;
DBUG_RETURN
(
error
);
}
assign_new_table_id
(
table
);
...
...
@@ -304,6 +302,7 @@ void ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table)
THD
*
thd
=
current_thd
;
MEM_ROOT
*
mem_root
=
&
share
->
mem_root
;
int
do_event_op
=
ndb_binlog_running
;
DBUG_ENTER
(
"ndbcluster_binlog_init_share"
);
share
->
op
=
0
;
share
->
table
=
0
;
...
...
@@ -342,7 +341,7 @@ void ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table)
{
share
->
flags
|=
NSF_NO_BINLOG
;
}
return
;
DBUG_VOID_RETURN
;
}
while
(
1
)
{
...
...
@@ -358,6 +357,7 @@ void ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table)
share
->
flags
|=
NSF_BLOB_FLAG
;
break
;
}
DBUG_VOID_RETURN
;
}
/*****************************************************************
...
...
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