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
30ddc47a
Commit
30ddc47a
authored
Feb 07, 2006
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
parents
67835c13
b4f8b1b3
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
113 additions
and
18 deletions
+113
-18
mysql-test/r/information_schema.result
mysql-test/r/information_schema.result
+1
-1
mysql-test/r/information_schema_db.result
mysql-test/r/information_schema_db.result
+1
-1
mysql-test/r/join_nested.result
mysql-test/r/join_nested.result
+23
-0
mysql-test/r/rpl_ignore_table.result
mysql-test/r/rpl_ignore_table.result
+16
-0
mysql-test/t/join_nested.test
mysql-test/t/join_nested.test
+28
-0
mysql-test/t/rpl_ignore_table-slave.opt
mysql-test/t/rpl_ignore_table-slave.opt
+1
-0
mysql-test/t/rpl_ignore_table.test
mysql-test/t/rpl_ignore_table.test
+28
-0
mysys/my_init.c
mysys/my_init.c
+1
-0
sql/ha_archive.cc
sql/ha_archive.cc
+8
-11
sql/sql_select.cc
sql/sql_select.cc
+2
-1
sql/sql_show.cc
sql/sql_show.cc
+2
-2
sql/table.h
sql/table.h
+2
-2
No files found.
mysql-test/r/information_schema.result
View file @
30ddc47a
...
@@ -57,8 +57,8 @@ TABLES
...
@@ -57,8 +57,8 @@ TABLES
TABLE_CONSTRAINTS
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TABLE_PRIVILEGES
TRIGGERS
TRIGGERS
VIEWS
USER_PRIVILEGES
USER_PRIVILEGES
VIEWS
binlog_index
binlog_index
columns_priv
columns_priv
db
db
...
...
mysql-test/r/information_schema_db.result
View file @
30ddc47a
...
@@ -20,8 +20,8 @@ TABLES
...
@@ -20,8 +20,8 @@ TABLES
TABLE_CONSTRAINTS
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TABLE_PRIVILEGES
TRIGGERS
TRIGGERS
VIEWS
USER_PRIVILEGES
USER_PRIVILEGES
VIEWS
show tables from INFORMATION_SCHEMA like 'T%';
show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_information_schema (T%)
Tables_in_information_schema (T%)
TABLES
TABLES
...
...
mysql-test/r/join_nested.result
View file @
30ddc47a
...
@@ -1481,3 +1481,26 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -1481,3 +1481,26 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 5 test.t1.a 1
1 SIMPLE t2 ref a a 5 test.t1.a 1
1 SIMPLE t3 ref a a 5 test.t2.a 1
1 SIMPLE t3 ref a a 5 test.t2.a 1
drop table t1, t2, t3;
drop table t1, t2, t3;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));
CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));
CREATE TABLE t3 (cid int NOT NULL PRIMARY KEY,
id int NOT NULL,
pid int NOT NULL);
INSERT INTO t1 VALUES (1, 'A'), (3, 'C');
INSERT INTO t2 VALUES (1, 'A'), (3, 'C');
INSERT INTO t3 VALUES (1, 1, 1), (3, 3, 3);
SELECT * FROM t1 p LEFT JOIN (t3 JOIN t1)
ON (t1.id=t3.id AND t1.type='B' AND p.id=t3.id)
LEFT JOIN t2 ON (t3.pid=t2.pid)
WHERE p.id=1;
id type cid id pid id type pid type
1 A NULL NULL NULL NULL NULL NULL NULL
CREATE VIEW v1 AS
SELECT t3.* FROM t3 JOIN t1 ON t1.id=t3.id AND t1.type='B';
SELECT * FROM t1 p LEFT JOIN v1 ON p.id=v1.id
LEFT JOIN t2 ON v1.pid=t2.pid
WHERE p.id=1;
id type cid id pid pid type
1 A NULL NULL NULL NULL NULL
DROP VIEW v1;
DROP TABLE t1,t2,t3;
mysql-test/r/rpl_ignore_table.result
0 → 100644
View file @
30ddc47a
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** Test case for BUG#16487 ****
**** Master ****
CREATE TABLE test.t4 (a int);
CREATE TABLE test.t1 (a int);
UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5;
**** Slave ****
SELECT * FROM t4;
a
DROP TABLE t1;
DROP TABLE t4;
mysql-test/t/join_nested.test
View file @
30ddc47a
...
@@ -914,3 +914,31 @@ explain select * from t1 left join
...
@@ -914,3 +914,31 @@ explain select * from t1 left join
on
(
t1
.
a
=
t2
.
a
);
on
(
t1
.
a
=
t2
.
a
);
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
# Bug #16260: single row table in the inner nest of an outer join
#
CREATE
TABLE
t1
(
id
int
NOT
NULL
PRIMARY
KEY
,
type
varchar
(
10
));
CREATE
TABLE
t2
(
pid
int
NOT
NULL
PRIMARY
KEY
,
type
varchar
(
10
));
CREATE
TABLE
t3
(
cid
int
NOT
NULL
PRIMARY
KEY
,
id
int
NOT
NULL
,
pid
int
NOT
NULL
);
INSERT
INTO
t1
VALUES
(
1
,
'A'
),
(
3
,
'C'
);
INSERT
INTO
t2
VALUES
(
1
,
'A'
),
(
3
,
'C'
);
INSERT
INTO
t3
VALUES
(
1
,
1
,
1
),
(
3
,
3
,
3
);
SELECT
*
FROM
t1
p
LEFT
JOIN
(
t3
JOIN
t1
)
ON
(
t1
.
id
=
t3
.
id
AND
t1
.
type
=
'B'
AND
p
.
id
=
t3
.
id
)
LEFT
JOIN
t2
ON
(
t3
.
pid
=
t2
.
pid
)
WHERE
p
.
id
=
1
;
CREATE
VIEW
v1
AS
SELECT
t3
.*
FROM
t3
JOIN
t1
ON
t1
.
id
=
t3
.
id
AND
t1
.
type
=
'B'
;
SELECT
*
FROM
t1
p
LEFT
JOIN
v1
ON
p
.
id
=
v1
.
id
LEFT
JOIN
t2
ON
v1
.
pid
=
t2
.
pid
WHERE
p
.
id
=
1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
,
t3
;
mysql-test/t/rpl_ignore_table-slave.opt
0 → 100644
View file @
30ddc47a
--replicate-ignore-table=test.t1 --replicate-ignore-table=test.t2 --replicate-ignore-table=test.t3
mysql-test/t/rpl_ignore_table.test
0 → 100644
View file @
30ddc47a
source
include
/
master
-
slave
.
inc
;
#
# BUG#16487
#
# Requirement:
# Multi-updates on ignored tables should not fail even if the slave does
# not have the ignored tables.
#
# Note table t1, t2, and t3 are ignored in the option file to this test.
#
--
echo
****
Test
case
for
BUG
#16487 ****
--
echo
****
Master
****
connection
master
;
CREATE
TABLE
test
.
t4
(
a
int
);
CREATE
TABLE
test
.
t1
(
a
int
);
# Expect: The row must *not* by updated on slave, since t1 is ignored
UPDATE
test
.
t4
NATURAL
JOIN
test
.
t1
SET
t1
.
a
=
5
;
--
echo
****
Slave
****
sync_slave_with_master
;
SELECT
*
FROM
t4
;
connection
master
;
DROP
TABLE
t1
;
DROP
TABLE
t4
;
mysys/my_init.c
View file @
30ddc47a
...
@@ -152,6 +152,7 @@ void my_end(int infoflag)
...
@@ -152,6 +152,7 @@ void my_end(int infoflag)
DBUG_PRINT
(
"error"
,(
"%s"
,
errbuff
[
0
]));
DBUG_PRINT
(
"error"
,(
"%s"
,
errbuff
[
0
]));
}
}
}
}
free_charsets
();
my_once_free
();
my_once_free
();
if
((
infoflag
&
MY_GIVE_INFO
)
||
print_info
)
if
((
infoflag
&
MY_GIVE_INFO
)
||
print_info
)
...
...
sql/ha_archive.cc
View file @
30ddc47a
...
@@ -520,7 +520,7 @@ const char **ha_archive::bas_ext() const
...
@@ -520,7 +520,7 @@ const char **ha_archive::bas_ext() const
Init out lock.
Init out lock.
We open the file we will read from.
We open the file we will read from.
*/
*/
int
ha_archive
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
int
ha_archive
::
open
(
const
char
*
name
,
int
mode
,
uint
open_options
)
{
{
DBUG_ENTER
(
"ha_archive::open"
);
DBUG_ENTER
(
"ha_archive::open"
);
...
@@ -535,7 +535,10 @@ int ha_archive::open(const char *name, int mode, uint test_if_locked)
...
@@ -535,7 +535,10 @@ int ha_archive::open(const char *name, int mode, uint test_if_locked)
DBUG_RETURN
(
HA_ERR_CRASHED_ON_USAGE
);
DBUG_RETURN
(
HA_ERR_CRASHED_ON_USAGE
);
}
}
if
(
open_options
&
HA_OPEN_FOR_REPAIR
)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
share
->
crashed
?
HA_ERR_CRASHED_ON_USAGE
:
0
);
}
}
...
@@ -1340,7 +1343,8 @@ int ha_archive::delete_all_rows()
...
@@ -1340,7 +1343,8 @@ int ha_archive::delete_all_rows()
*/
*/
bool
ha_archive
::
is_crashed
()
const
bool
ha_archive
::
is_crashed
()
const
{
{
return
share
->
crashed
;
DBUG_ENTER
(
"ha_archive::is_crashed"
);
DBUG_RETURN
(
share
->
crashed
);
}
}
/*
/*
...
@@ -1402,12 +1406,5 @@ bool ha_archive::check_and_repair(THD *thd)
...
@@ -1402,12 +1406,5 @@ bool ha_archive::check_and_repair(THD *thd)
check_opt
.
init
();
check_opt
.
init
();
if
(
check
(
thd
,
&
check_opt
)
==
HA_ADMIN_CORRUPT
)
{
DBUG_RETURN
(
repair
(
thd
,
&
check_opt
));
DBUG_RETURN
(
repair
(
thd
,
&
check_opt
));
}
else
{
DBUG_RETURN
(
HA_ADMIN_OK
);
}
}
}
sql/sql_select.cc
View file @
30ddc47a
...
@@ -2214,7 +2214,8 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds,
...
@@ -2214,7 +2214,8 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds,
if
(
eq_part
.
is_prefix
(
table
->
key_info
[
key
].
key_parts
)
&&
if
(
eq_part
.
is_prefix
(
table
->
key_info
[
key
].
key_parts
)
&&
((
table
->
key_info
[
key
].
flags
&
(
HA_NOSAME
|
HA_END_SPACE_KEY
))
==
((
table
->
key_info
[
key
].
flags
&
(
HA_NOSAME
|
HA_END_SPACE_KEY
))
==
HA_NOSAME
)
&&
HA_NOSAME
)
&&
!
table
->
fulltext_searched
)
!
table
->
fulltext_searched
&&
!
table
->
pos_in_table_list
->
embedding
)
{
{
if
(
const_ref
==
eq_part
)
if
(
const_ref
==
eq_part
)
{
// Found everything for ref.
{
// Found everything for ref.
...
...
sql/sql_show.cc
View file @
30ddc47a
...
@@ -5073,12 +5073,12 @@ ST_SCHEMA_TABLE schema_tables[]=
...
@@ -5073,12 +5073,12 @@ ST_SCHEMA_TABLE schema_tables[]=
fill_schema_table_privileges
,
0
,
0
,
-
1
,
-
1
,
0
},
fill_schema_table_privileges
,
0
,
0
,
-
1
,
-
1
,
0
},
{
"TRIGGERS"
,
triggers_fields_info
,
create_schema_table
,
{
"TRIGGERS"
,
triggers_fields_info
,
create_schema_table
,
get_all_tables
,
make_old_format
,
get_schema_triggers_record
,
5
,
6
,
0
},
get_all_tables
,
make_old_format
,
get_schema_triggers_record
,
5
,
6
,
0
},
{
"USER_PRIVILEGES"
,
user_privileges_fields_info
,
create_schema_table
,
fill_schema_user_privileges
,
0
,
0
,
-
1
,
-
1
,
0
},
{
"VARIABLES"
,
variables_fields_info
,
create_schema_table
,
fill_variables
,
{
"VARIABLES"
,
variables_fields_info
,
create_schema_table
,
fill_variables
,
make_old_format
,
0
,
-
1
,
-
1
,
1
},
make_old_format
,
0
,
-
1
,
-
1
,
1
},
{
"VIEWS"
,
view_fields_info
,
create_schema_table
,
{
"VIEWS"
,
view_fields_info
,
create_schema_table
,
get_all_tables
,
0
,
get_schema_views_record
,
1
,
2
,
0
},
get_all_tables
,
0
,
get_schema_views_record
,
1
,
2
,
0
},
{
"USER_PRIVILEGES"
,
user_privileges_fields_info
,
create_schema_table
,
fill_schema_user_privileges
,
0
,
0
,
-
1
,
-
1
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
};
};
...
...
sql/table.h
View file @
30ddc47a
...
@@ -354,9 +354,9 @@ enum enum_schema_tables
...
@@ -354,9 +354,9 @@ enum enum_schema_tables
SCH_TABLE_NAMES
,
SCH_TABLE_NAMES
,
SCH_TABLE_PRIVILEGES
,
SCH_TABLE_PRIVILEGES
,
SCH_TRIGGERS
,
SCH_TRIGGERS
,
SCH_USER_PRIVILEGES
,
SCH_VARIABLES
,
SCH_VARIABLES
,
SCH_VIEWS
,
SCH_VIEWS
SCH_USER_PRIVILEGES
};
};
...
...
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