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
d0930b8e
Commit
d0930b8e
authored
Oct 15, 2004
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1
parents
105a2c1c
d07ade55
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
34 deletions
+38
-34
innobase/dict/dict0dict.c
innobase/dict/dict0dict.c
+1
-1
innobase/include/dict0dict.h
innobase/include/dict0dict.h
+12
-0
innobase/row/row0ins.c
innobase/row/row0ins.c
+14
-17
innobase/row/row0sel.c
innobase/row/row0sel.c
+10
-16
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+1
-0
No files found.
innobase/dict/dict0dict.c
View file @
d0930b8e
...
@@ -2244,7 +2244,7 @@ dict_foreign_add_to_cache(
...
@@ -2244,7 +2244,7 @@ dict_foreign_add_to_cache(
Scans from pointer onwards. Stops if is at the start of a copy of
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity. Stops
'string' where characters are compared without case sensitivity. Stops
also at '\0'. */
also at '\0'. */
static
const
char
*
const
char
*
dict_scan_to
(
dict_scan_to
(
/*=========*/
/*=========*/
...
...
innobase/include/dict0dict.h
View file @
d0930b8e
...
@@ -891,6 +891,18 @@ dict_tables_have_same_db(
...
@@ -891,6 +891,18 @@ dict_tables_have_same_db(
const
char
*
name2
);
/* in: table name in the form
const
char
*
name2
);
/* in: table name in the form
dbname '/' tablename */
dbname '/' tablename */
/*************************************************************************
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity. Stops
also at '\0'. */
const
char
*
dict_scan_to
(
/*=========*/
/* out: scanned up to this */
const
char
*
ptr
,
/* in: scan from */
const
char
*
string
);
/* in: look for this */
/* Buffers for storing detailed information about the latest foreign key
/* Buffers for storing detailed information about the latest foreign key
and unique key errors */
and unique key errors */
extern
FILE
*
dict_foreign_err_file
;
extern
FILE
*
dict_foreign_err_file
;
...
...
innobase/row/row0ins.c
View file @
d0930b8e
...
@@ -1482,9 +1482,9 @@ row_ins_scan_sec_index_for_duplicate(
...
@@ -1482,9 +1482,9 @@ row_ins_scan_sec_index_for_duplicate(
ulint
err
=
DB_SUCCESS
;
ulint
err
=
DB_SUCCESS
;
ibool
moved
;
ibool
moved
;
mtr_t
mtr
;
mtr_t
mtr
;
trx_t
*
trx
;
trx_t
*
trx
;
ibool
success
;
const
char
*
ptr
;
n_unique
=
dict_index_get_n_unique
(
index
);
n_unique
=
dict_index_get_n_unique
(
index
);
/* If the secondary index is unique, but one of the fields in the
/* If the secondary index is unique, but one of the fields in the
...
@@ -1523,9 +1523,11 @@ row_ins_scan_sec_index_for_duplicate(
...
@@ -1523,9 +1523,11 @@ row_ins_scan_sec_index_for_duplicate(
trx
=
thr_get_trx
(
thr
);
trx
=
thr_get_trx
(
thr
);
ut_ad
(
trx
);
ut_ad
(
trx
);
dict_accept
(
*
trx
->
mysql_query_str
,
"REPLACE"
,
&
success
);
if
(
success
)
{
ptr
=
dict_scan_to
(
*
(
trx
->
mysql_query_str
),
"REPLACE"
);
if
(
ptr
&&
*
ptr
!=
'\0'
)
{
/* The manual defines the REPLACE semantics that it
/* The manual defines the REPLACE semantics that it
is either an INSERT or DELETE(s) for duplicate key
is either an INSERT or DELETE(s) for duplicate key
...
@@ -1605,7 +1607,7 @@ row_ins_duplicate_error_in_clust(
...
@@ -1605,7 +1607,7 @@ row_ins_duplicate_error_in_clust(
page_t
*
page
;
page_t
*
page
;
ulint
n_unique
;
ulint
n_unique
;
trx_t
*
trx
=
thr_get_trx
(
thr
);
trx_t
*
trx
=
thr_get_trx
(
thr
);
ibool
success
;
const
char
*
ptr
;
UT_NOT_USED
(
mtr
);
UT_NOT_USED
(
mtr
);
...
@@ -1639,10 +1641,9 @@ row_ins_duplicate_error_in_clust(
...
@@ -1639,10 +1641,9 @@ row_ins_duplicate_error_in_clust(
sure that in roll-forward we get the same duplicate
sure that in roll-forward we get the same duplicate
errors as in original execution */
errors as in original execution */
dict_accept
(
*
trx
->
mysql_query_str
,
"REPLACE"
,
ptr
=
dict_scan_to
(
*
(
trx
->
mysql_query_str
),
"REPLACE"
);
&
success
);
if
(
success
)
{
if
(
ptr
&&
*
ptr
!=
'\0'
)
{
/* The manual defines the REPLACE semantics
/* The manual defines the REPLACE semantics
that it is either an INSERT or DELETE(s)
that it is either an INSERT or DELETE(s)
...
@@ -1683,15 +1684,11 @@ row_ins_duplicate_error_in_clust(
...
@@ -1683,15 +1684,11 @@ row_ins_duplicate_error_in_clust(
/* The manual defines the REPLACE semantics that it
/* The manual defines the REPLACE semantics that it
is either an INSERT or DELETE(s) for duplicate key
is either an INSERT or DELETE(s) for duplicate key
+ INSERT. Therefore, we should take X-lock for
+ INSERT. Therefore, we should take X-lock for
duplicates.
duplicates. */
*/
/* Is the first word in MySQL query REPLACE ? */
ptr
=
dict_scan_to
(
*
(
trx
->
mysql_query_str
),
"REPLACE"
);
dict_accept
(
*
trx
->
mysql_query_str
,
"REPLACE"
,
if
(
ptr
&&
*
ptr
!=
'\0'
)
{
&
success
);
if
(
success
)
{
err
=
row_ins_set_exclusive_rec_lock
(
err
=
row_ins_set_exclusive_rec_lock
(
LOCK_REC_NOT_GAP
,
LOCK_REC_NOT_GAP
,
...
...
innobase/row/row0sel.c
View file @
d0930b8e
...
@@ -2794,7 +2794,7 @@ row_search_for_mysql(
...
@@ -2794,7 +2794,7 @@ row_search_for_mysql(
rec_t
*
index_rec
;
rec_t
*
index_rec
;
rec_t
*
clust_rec
;
rec_t
*
clust_rec
;
rec_t
*
old_vers
;
rec_t
*
old_vers
;
ulint
err
;
ulint
err
=
DB_SUCCESS
;
ibool
moved
;
ibool
moved
;
ibool
cons_read_requires_clust_rec
;
ibool
cons_read_requires_clust_rec
;
ibool
was_lock_wait
;
ibool
was_lock_wait
;
...
@@ -3203,26 +3203,20 @@ rec_loop:
...
@@ -3203,26 +3203,20 @@ rec_loop:
if
(
prebuilt
->
select_lock_type
!=
LOCK_NONE
if
(
prebuilt
->
select_lock_type
!=
LOCK_NONE
&&
set_also_gap_locks
)
{
&&
set_also_gap_locks
)
{
/* Try to place a lock on the index record */
/* Try to place a lock on the index record */
/* If innodb_locks_unsafe_for_binlog option is used,
/* If innodb_locks_unsafe_for_binlog option is used,
we lock only the record, i.e. next-key locking is
we do not lock gaps. Supremum record is really
not used.
a gap and therefore we do not set locks there. */
*/
if
(
srv_locks_unsafe_for_binlog
)
if
(
srv_locks_unsafe_for_binlog
==
FALSE
)
{
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
LOCK_REC_NOT_GAP
,
thr
);
}
else
{
{
err
=
sel_set_rec_lock
(
rec
,
index
,
err
=
sel_set_rec_lock
(
rec
,
index
,
prebuilt
->
select_lock_type
,
prebuilt
->
select_lock_type
,
LOCK_ORDINARY
,
thr
);
LOCK_ORDINARY
,
thr
);
}
}
if
(
err
!=
DB_SUCCESS
)
{
if
(
err
!=
DB_SUCCESS
)
{
goto
lock_wait_or_error
;
goto
lock_wait_or_error
;
}
}
...
...
mysql-test/t/ctype_utf8.test
View file @
d0930b8e
...
@@ -568,6 +568,7 @@ DROP TABLE t1;
...
@@ -568,6 +568,7 @@ DROP TABLE t1;
#
#
# Bug #5723: length(<varchar utf8 field>) returns varying results
# Bug #5723: length(<varchar utf8 field>) returns varying results
#
#
--
disable_warnings
SET
NAMES
utf8
;
SET
NAMES
utf8
;
--
disable_warnings
--
disable_warnings
CREATE
TABLE
t1
(
CREATE
TABLE
t1
(
...
...
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