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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b7079ed0
Commit
b7079ed0
authored
May 18, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Resolve merge from 4.1
parents
3f6aad90
816e84c1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
5 deletions
+38
-5
mysql-test/r/grant_cache.result
mysql-test/r/grant_cache.result
+2
-0
mysql-test/r/merge.result
mysql-test/r/merge.result
+10
-0
mysql-test/t/grant_cache-master.opt
mysql-test/t/grant_cache-master.opt
+0
-1
mysql-test/t/grant_cache.test
mysql-test/t/grant_cache.test
+4
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+12
-0
sql/ha_myisammrg.h
sql/ha_myisammrg.h
+1
-1
sql/handler.h
sql/handler.h
+1
-0
sql/sql_insert.cc
sql/sql_insert.cc
+1
-1
sql/table.cc
sql/table.cc
+7
-2
No files found.
mysql-test/r/grant_cache.result
View file @
b7079ed0
drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
drop database if exists mysqltest;
set GLOBAL query_cache_size=1355776;
reset query cache;
flush status;
show grants for current_user;
...
...
@@ -206,3 +207,4 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
flush privileges;
drop table test.t1,mysqltest.t1,mysqltest.t2;
drop database mysqltest;
set GLOBAL query_cache_size=default;
mysql-test/r/merge.result
View file @
b7079ed0
...
...
@@ -683,3 +683,13 @@ t3 1 a 1 a A NULL NULL NULL YES BTREE
t3 1 a 2 b A NULL NULL NULL YES BTREE
t3 1 a 3 c A NULL NULL NULL YES BTREE
drop table t1, t2, t3;
CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), UNIQUE (b) )
ENGINE=MyISAM;
CREATE TABLE t2 ( a INT AUTO_INCREMENT, b VARCHAR(10), INDEX (a), INDEX (b) )
ENGINE=MERGE UNION (t1) INSERT_METHOD=FIRST;
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=2;
INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=3;
SELECT b FROM t2;
b
3
DROP TABLE t1, t2;
mysql-test/t/grant_cache-master.opt
deleted
100644 → 0
View file @
3f6aad90
--set-variable=query_cache_size=1355776
mysql-test/t/grant_cache.test
View file @
b7079ed0
...
...
@@ -10,6 +10,8 @@ drop table if exists test.t1,mysqltest.t1,mysqltest.t2;
drop
database
if
exists
mysqltest
;
--
enable_warnings
set
GLOBAL
query_cache_size
=
1355776
;
reset
query
cache
;
flush
status
;
connect
(
root
,
localhost
,
root
,,
test
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
...
...
@@ -145,3 +147,5 @@ delete from mysql.columns_priv where user in ("mysqltest_1","mysqltest_2","mysql
flush
privileges
;
drop
table
test
.
t1
,
mysqltest
.
t1
,
mysqltest
.
t2
;
drop
database
mysqltest
;
set
GLOBAL
query_cache_size
=
default
;
mysql-test/t/merge.test
View file @
b7079ed0
...
...
@@ -308,3 +308,15 @@ show index from t3;
drop
table
t1
,
t2
,
t3
;
#
# Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
#
CREATE
TABLE
t1
(
a
INT
AUTO_INCREMENT
PRIMARY
KEY
,
b
VARCHAR
(
10
),
UNIQUE
(
b
)
)
ENGINE
=
MyISAM
;
CREATE
TABLE
t2
(
a
INT
AUTO_INCREMENT
,
b
VARCHAR
(
10
),
INDEX
(
a
),
INDEX
(
b
)
)
ENGINE
=
MERGE
UNION
(
t1
)
INSERT_METHOD
=
FIRST
;
INSERT
INTO
t2
(
b
)
VALUES
(
1
)
ON
DUPLICATE
KEY
UPDATE
b
=
2
;
INSERT
INTO
t2
(
b
)
VALUES
(
1
)
ON
DUPLICATE
KEY
UPDATE
b
=
3
;
SELECT
b
FROM
t2
;
DROP
TABLE
t1
,
t2
;
sql/ha_myisammrg.h
View file @
b7079ed0
...
...
@@ -37,7 +37,7 @@ class ha_myisammrg: public handler
{
return
(
HA_REC_NOT_IN_SEQ
|
HA_AUTO_PART_KEY
|
HA_READ_RND_SAME
|
HA_NULL_IN_KEY
|
HA_CAN_INDEX_BLOBS
|
HA_FILE_BASED
|
HA_CAN_INSERT_DELAYED
);
HA_CAN_INSERT_DELAYED
|
HA_ANY_INDEX_MAY_BE_UNIQUE
);
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
{
...
...
sql/handler.h
View file @
b7079ed0
...
...
@@ -87,6 +87,7 @@
#define HA_NO_VARCHAR (1 << 27)
#define HA_CAN_BIT_FIELD (1 << 28)
/* supports bit fields */
#define HA_NEED_READ_RANGE_BUFFER (1 << 29)
/* for read_multi_range */
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
/* bits in index_flags(index_number) for what you can do with index */
...
...
sql/sql_insert.cc
View file @
b7079ed0
...
...
@@ -948,7 +948,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
err:
if
(
key
)
my_
afree
(
key
);
my_
safe_afree
(
key
,
table
->
max_unique_length
,
MAX_KEY_LENGTH
);
info
->
last_errno
=
error
;
table
->
file
->
print_error
(
error
,
MYF
(
0
));
DBUG_RETURN
(
1
);
...
...
sql/table.cc
View file @
b7079ed0
...
...
@@ -739,8 +739,13 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
set_if_bigger
(
share
->
max_key_length
,
keyinfo
->
key_length
+
keyinfo
->
key_parts
);
share
->
total_key_length
+=
keyinfo
->
key_length
;
if
(
keyinfo
->
flags
&
HA_NOSAME
)
set_if_bigger
(
share
->
max_unique_length
,
keyinfo
->
key_length
);
/*
MERGE tables do not have unique indexes. But every key could be
an unique index on the underlying MyISAM table. (Bug #10400)
*/
if
((
keyinfo
->
flags
&
HA_NOSAME
)
||
(
ha_option
&
HA_ANY_INDEX_MAY_BE_UNIQUE
))
set_if_bigger
(
share
->
max_unique_length
,
keyinfo
->
key_length
);
}
if
(
primary_key
<
MAX_KEY
&&
(
share
->
keys_in_use
.
is_set
(
primary_key
)))
...
...
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