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
cfdf3db4
Commit
cfdf3db4
authored
Oct 03, 2008
by
Chad MILLER
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for Bug#35754.
parents
bf3a149e
bf996620
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
23 deletions
+27
-23
mysql-test/r/join.result
mysql-test/r/join.result
+7
-5
mysql-test/r/rpl_grant.result
mysql-test/r/rpl_grant.result
+8
-8
mysql-test/t/join.test
mysql-test/t/join.test
+6
-4
mysql-test/t/rpl_grant.test
mysql-test/t/rpl_grant.test
+4
-4
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_data.sql
+2
-2
No files found.
mysql-test/r/join.result
View file @
cfdf3db4
...
...
@@ -747,11 +747,13 @@ select t1.b from v1a;
ERROR 42S22: Unknown column 't1.b' in 'field list'
select * from v1a join v1b on t1.b = t2.b;
ERROR 42S22: Unknown column 't1.b' in 'on clause'
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
select
statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.CARDINALITY, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT,
columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.COLUMN_COMMENT
from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
user User NULL mysql 0 mysql PRIMARY 2 A 2 NULL NULL BTREE NULL mysql NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
drop table t1;
drop table t2;
drop table t3;
...
...
mysql-test/r/rpl_grant.result
View file @
cfdf3db4
...
...
@@ -12,18 +12,18 @@ user host
dummy localhost
dummy1 localhost
dummy2 localhost
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user
WHERE user != 'root' or (host != 'localhost' and host != @hostname)
;
COUNT(*)
6
3
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root';
user host
dummy localhost
dummy1 localhost
dummy2 localhost
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user
WHERE user != 'root' or (host != 'localhost' and host != @hostname)
;
COUNT(*)
6
3
**** On Master ****
DROP USER nonexisting@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
...
...
@@ -32,15 +32,15 @@ ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user != 'root';
user host
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user
WHERE user != 'root' or (host != 'localhost' and host != @hostname)
;
COUNT(*)
3
0
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root';
user host
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user
WHERE user != 'root' or (host != 'localhost' and host != @hostname)
;
COUNT(*)
3
0
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
...
...
mysql-test/t/join.test
View file @
cfdf3db4
...
...
@@ -546,10 +546,12 @@ select * from v1a join v1b on t1.b = t2.b;
#
# Bug #17523 natural join and information_schema
#
# We mask out the Privileges column because it differs with embedded server
--
replace_column
31
#
select
*
from
information_schema
.
statistics
join
information_schema
.
columns
using
(
table_name
,
column_name
)
where
table_name
=
'user'
;
# Omit columns.PRIVILIGES as it may vary with embedded server.
# Omit columns.ORDINAL_POSITION as it may vary with hostname='localhost'.
select
statistics
.
TABLE_NAME
,
statistics
.
COLUMN_NAME
,
statistics
.
TABLE_CATALOG
,
statistics
.
TABLE_SCHEMA
,
statistics
.
NON_UNIQUE
,
statistics
.
INDEX_SCHEMA
,
statistics
.
INDEX_NAME
,
statistics
.
SEQ_IN_INDEX
,
statistics
.
COLLATION
,
statistics
.
CARDINALITY
,
statistics
.
SUB_PART
,
statistics
.
PACKED
,
statistics
.
NULLABLE
,
statistics
.
INDEX_TYPE
,
statistics
.
COMMENT
,
columns
.
TABLE_CATALOG
,
columns
.
TABLE_SCHEMA
,
columns
.
COLUMN_DEFAULT
,
columns
.
IS_NULLABLE
,
columns
.
DATA_TYPE
,
columns
.
CHARACTER_MAXIMUM_LENGTH
,
columns
.
CHARACTER_OCTET_LENGTH
,
columns
.
NUMERIC_PRECISION
,
columns
.
NUMERIC_SCALE
,
columns
.
CHARACTER_SET_NAME
,
columns
.
COLLATION_NAME
,
columns
.
COLUMN_TYPE
,
columns
.
COLUMN_KEY
,
columns
.
EXTRA
,
columns
.
COLUMN_COMMENT
from
information_schema
.
statistics
join
information_schema
.
columns
using
(
table_name
,
column_name
)
where
table_name
=
'user'
;
drop
table
t1
;
drop
table
t2
;
...
...
mysql-test/t/rpl_grant.test
View file @
cfdf3db4
...
...
@@ -10,11 +10,11 @@ CREATE USER dummy@localhost;
CREATE
USER
dummy1
@
localhost
,
dummy2
@
localhost
;
SELECT
user
,
host
FROM
mysql
.
user
WHERE
user
!=
'root'
;
# root host non-determ
SELECT
COUNT
(
*
)
FROM
mysql
.
user
;
SELECT
COUNT
(
*
)
FROM
mysql
.
user
WHERE
user
!=
'root'
or
(
host
!=
'localhost'
and
host
!=
@
hostname
)
;
sync_slave_with_master
;
--
echo
****
On
Slave
****
SELECT
user
,
host
FROM
mysql
.
user
WHERE
user
!=
'root'
;
# root host non-determ
SELECT
COUNT
(
*
)
FROM
mysql
.
user
;
SELECT
COUNT
(
*
)
FROM
mysql
.
user
WHERE
user
!=
'root'
or
(
host
!=
'localhost'
and
host
!=
@
hostname
)
;
--
echo
****
On
Master
****
connection
master
;
...
...
@@ -31,11 +31,11 @@ DROP USER nonexisting@localhost, dummy@localhost;
DROP
USER
dummy1
@
localhost
,
dummy2
@
localhost
;
SELECT
user
,
host
FROM
mysql
.
user
WHERE
user
!=
'root'
;
# root host non-determ
SELECT
COUNT
(
*
)
FROM
mysql
.
user
;
SELECT
COUNT
(
*
)
FROM
mysql
.
user
WHERE
user
!=
'root'
or
(
host
!=
'localhost'
and
host
!=
@
hostname
)
;
sync_slave_with_master
;
--
echo
****
On
Slave
****
SELECT
user
,
host
FROM
mysql
.
user
WHERE
user
!=
'root'
;
# root host non-determ
SELECT
COUNT
(
*
)
FROM
mysql
.
user
;
SELECT
COUNT
(
*
)
FROM
mysql
.
user
WHERE
user
!=
'root'
or
(
host
!=
'localhost'
and
host
!=
@
hostname
)
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 8 # 9 # 23 # 33 #
...
...
scripts/mysql_system_tables_data.sql
View file @
cfdf3db4
...
...
@@ -21,9 +21,9 @@ DROP TABLE tmp_db;
-- from local machine if "users" table didn't exist before
CREATE
TEMPORARY
TABLE
tmp_user
LIKE
user
;
INSERT
INTO
tmp_user
VALUES
(
'localhost'
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
REPLACE
INTO
tmp_user
VALUES
(
@
current_hostname
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
)
;
REPLACE
INTO
tmp_user
SELECT
@
current_hostname
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
FROM
dual
WHERE
LOWER
(
@
current_hostname
)
!=
'localhost'
;
REPLACE
INTO
tmp_user
VALUES
(
'127.0.0.1'
,
'root'
,
''
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
'Y'
,
''
,
''
,
''
,
''
,
0
,
0
,
0
,
0
);
INSERT
INTO
tmp_user
(
host
,
user
)
VALUES
(
'localhost'
,
''
);
INSERT
INTO
tmp_user
(
host
,
user
)
VALUES
(
@
current_hostname
,
''
)
;
INSERT
INTO
tmp_user
(
host
,
user
)
SELECT
@
current_hostname
,
''
FROM
dual
WHERE
LOWER
(
@
current_hostname
)
!=
'localhost'
;
INSERT
INTO
user
SELECT
*
FROM
tmp_user
WHERE
@
had_user_table
=
0
;
DROP
TABLE
tmp_user
;
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