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
cba27433
Commit
cba27433
authored
Nov 14, 2008
by
Ramil Kalimullin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge
parents
52b90054
dbc062bf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
2 deletions
+62
-2
client/mysqlcheck.c
client/mysqlcheck.c
+7
-2
mysql-test/r/federated.result
mysql-test/r/federated.result
+9
-0
mysql-test/r/mysqlcheck.result
mysql-test/r/mysqlcheck.result
+7
-0
mysql-test/t/federated.test
mysql-test/t/federated.test
+19
-0
mysql-test/t/mysqlcheck.test
mysql-test/t/mysqlcheck.test
+20
-0
No files found.
client/mysqlcheck.c
View file @
cba27433
...
...
@@ -517,9 +517,14 @@ static int process_all_tables_in_db(char *database)
LINT_INIT
(
res
);
if
(
use_db
(
database
))
return
1
;
if
(
mysql_query
(
sock
,
"SHOW /*!50002 FULL*/ TABLES"
)
||
!
((
res
=
mysql_store_result
(
sock
))))
if
((
mysql_query
(
sock
,
"SHOW /*!50002 FULL*/ TABLES"
)
&&
mysql_query
(
sock
,
"SHOW TABLES"
))
||
!
(
res
=
mysql_store_result
(
sock
)))
{
my_printf_error
(
0
,
"Error: Couldn't get table list for database %s: %s"
,
MYF
(
0
),
database
,
mysql_error
(
sock
));
return
1
;
}
num_columns
=
mysql_num_fields
(
res
);
...
...
mysql-test/r/federated.result
View file @
cba27433
...
...
@@ -2130,6 +2130,15 @@ Table Checksum
test.t1 2465757603
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a TEXT, b TEXT, KEY(b(1)));
INSERT INTO t1 VALUES (NULL, NULL), (NULL, NULL), (NULL, NULL), (NULL, NULL);
CREATE TABLE t1
(a TEXT, b TEXT, KEY(b(1))) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
SELECT t1.a FROM t1, t1 as t2 WHERE t2.b NOT LIKE t1.b;
a
DROP TABLE t1;
DROP TABLE t1;
End of 5.0 tests
create server 's1' foreign data wrapper 'mysql' options (port 3306);
drop server 's1';
...
...
mysql-test/r/mysqlcheck.result
View file @
cba27433
...
...
@@ -104,6 +104,13 @@ Table Op Msg_type Msg_text
test.v1 check status OK
information_schema.routines check note The storage engine for the table doesn't support check
drop view v1;
CREATE TABLE t1(a INT);
CREATE TABLE t2(a INT);
test.t1
Error : Incorrect information in file: './test/t1.frm'
error : Corrupt
test.t2 OK
DROP TABLE t1, t2;
End of 5.0 tests
create table t1(a int);
create view v1 as select * from t1;
...
...
mysql-test/t/federated.test
View file @
cba27433
...
...
@@ -1923,6 +1923,25 @@ DROP TABLE t1;
connection
master
;
DROP
TABLE
t1
;
#
# Bug #34774 key prefix on text field in federated tables can cause
# server to crash!
#
connection
slave
;
CREATE
TABLE
t1
(
a
TEXT
,
b
TEXT
,
KEY
(
b
(
1
)));
INSERT
INTO
t1
VALUES
(
NULL
,
NULL
),
(
NULL
,
NULL
),
(
NULL
,
NULL
),
(
NULL
,
NULL
);
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
CREATE
TABLE
t1
(
a
TEXT
,
b
TEXT
,
KEY
(
b
(
1
)))
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'
;
SELECT
t1
.
a
FROM
t1
,
t1
as
t2
WHERE
t2
.
b
NOT
LIKE
t1
.
b
;
connection
slave
;
DROP
TABLE
t1
;
connection
master
;
DROP
TABLE
t1
;
connection
default
;
--
echo
End
of
5.0
tests
...
...
mysql-test/t/mysqlcheck.test
View file @
cba27433
...
...
@@ -78,6 +78,26 @@ create view v1 as select * from information_schema.routines;
check
table
v1
,
information_schema
.
routines
;
drop
view
v1
;
#
# Bug#37527: mysqlcheck fails to report entire database
# when frm file corruption
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
TABLE
t2
(
a
INT
);
# backup then null t1.frm
--
copy_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
.
bak
--
remove_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
--
write_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
EOF
--
exec
$MYSQL_CHECK
test
# restore t1.frm
--
remove_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
--
copy_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
.
bak
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
--
remove_file
$MYSQLTEST_VARDIR
/
master
-
data
/
test
/
t1
.
frm
.
bak
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
#
...
...
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