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
3b598218
Commit
3b598218
authored
May 28, 2007
by
lars/lthalmann@dl145h.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
parents
d5422980
636490e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
12 deletions
+48
-12
heap/hp_hash.c
heap/hp_hash.c
+17
-8
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+12
-0
mysql-test/r/rpl_loaddata.result
mysql-test/r/rpl_loaddata.result
+4
-0
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
mysql-test/t/rpl_loaddata.test
mysql-test/t/rpl_loaddata.test
+12
-0
sql/sql_load.cc
sql/sql_load.cc
+3
-3
No files found.
heap/hp_hash.c
View file @
3b598218
...
@@ -379,7 +379,13 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
...
@@ -379,7 +379,13 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
ulong
hp_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
byte
*
key
)
ulong
hp_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
byte
*
key
)
{
{
register
ulong
nr
=
0
;
/*
Note, if a key consists of a combination of numeric and
a text columns, it most likely won't work well.
Making text columns work with NEW_HASH_FUNCTION
needs also changes in strings/ctype-xxx.c.
*/
ulong
nr
=
1
,
nr2
=
4
;
HA_KEYSEG
*
seg
,
*
endseg
;
HA_KEYSEG
*
seg
,
*
endseg
;
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
...
@@ -401,14 +407,15 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
...
@@ -401,14 +407,15 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
}
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
{
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
,
((
uchar
*
)
key
)
-
pos
,
&
nr
,
&
nr2
);
}
}
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
{
{
uint
pack_length
=
2
;
/* Key packing is constant */
uint
pack_length
=
2
;
/* Key packing is constant */
uint
length
=
uint2korr
(
pos
);
uint
length
=
uint2korr
(
pos
);
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
length
,
&
nr
,
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
length
,
NULL
);
&
nr
,
&
nr2
);
key
+=
pack_length
;
key
+=
pack_length
;
}
}
else
else
...
@@ -428,7 +435,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
...
@@ -428,7 +435,7 @@ ulong hp_hashnr(register HP_KEYDEF *keydef, register const byte *key)
ulong
hp_rec_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
byte
*
rec
)
ulong
hp_rec_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
byte
*
rec
)
{
{
register
ulong
nr
=
0
;
ulong
nr
=
1
,
nr2
=
4
;
HA_KEYSEG
*
seg
,
*
endseg
;
HA_KEYSEG
*
seg
,
*
endseg
;
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
...
@@ -444,14 +451,16 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
...
@@ -444,14 +451,16 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const byte *rec)
}
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
{
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
,((
uchar
*
)
key
)
-
pos
,
&
nr
,
NULL
);
uint
char_length
=
seg
->
length
;
/* TODO: fix to use my_charpos() */
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
,
char_length
,
&
nr
,
&
nr2
);
}
}
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
{
{
uint
pack_length
=
seg
->
bit_start
;
uint
pack_length
=
seg
->
bit_start
;
uint
length
=
(
pack_length
==
1
?
(
uint
)
*
(
uchar
*
)
pos
:
uint2korr
(
pos
));
uint
length
=
(
pack_length
==
1
?
(
uint
)
*
(
uchar
*
)
pos
:
uint2korr
(
pos
));
seg
->
charset
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
length
,
&
nr
,
NULL
);
length
,
&
nr
,
&
nr2
);
}
}
else
else
{
{
...
...
mysql-test/mysql-test-run.pl
View file @
3b598218
...
@@ -1792,6 +1792,18 @@ sub environment_setup () {
...
@@ -1792,6 +1792,18 @@ sub environment_setup () {
$ENV
{'
CHARSETSDIR
'}
=
$path_charsetsdir
;
$ENV
{'
CHARSETSDIR
'}
=
$path_charsetsdir
;
$ENV
{'
UMASK
'}
=
"
0660
";
# The octal *string*
$ENV
{'
UMASK
'}
=
"
0660
";
# The octal *string*
$ENV
{'
UMASK_DIR
'}
=
"
0770
";
# The octal *string*
$ENV
{'
UMASK_DIR
'}
=
"
0770
";
# The octal *string*
#
# MySQL tests can produce output in various character sets
# (especially, ctype_xxx.test). To avoid confusing Perl
# with output which is incompatible with the current locale
# settings, we reset the current values of LC_ALL and LC_CTYPE to "C".
# For details, please see
# Bug#27636 tests fails if LC_* variables set to *_*.UTF-8
#
$ENV
{'
LC_ALL
'}
=
"
C
";
$ENV
{'
LC_CTYPE
'}
=
"
C
";
$ENV
{'
LC_COLLATE
'}
=
"
C
";
$ENV
{'
LC_COLLATE
'}
=
"
C
";
$ENV
{'
USE_RUNNING_SERVER
'}
=
$opt_extern
;
$ENV
{'
USE_RUNNING_SERVER
'}
=
$opt_extern
;
$ENV
{'
MYSQL_TEST_DIR
'}
=
$glob_mysql_test_dir
;
$ENV
{'
MYSQL_TEST_DIR
'}
=
$glob_mysql_test_dir
;
...
...
mysql-test/r/rpl_loaddata.result
View file @
3b598218
...
@@ -80,3 +80,7 @@ ERROR 23000: Duplicate entry '2003-03-22' for key 1
...
@@ -80,3 +80,7 @@ ERROR 23000: Duplicate entry '2003-03-22' for key 1
drop table t2;
drop table t2;
drop table t2;
drop table t2;
drop table t1;
drop table t1;
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
ERROR 23000: Duplicate entry 'Aarhus' for key 1
DROP TABLE IF EXISTS t1;
mysql-test/t/disabled.def
View file @
3b598218
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
#
#
##############################################################################
##############################################################################
ndb_load : Bug#17233
user_limits : Bug#23921 random failure of user_limits.test
user_limits : Bug#23921 random failure of user_limits.test
im_life_cycle : Bug#27851: Instance manager test im_life_cycle fails randomly
im_life_cycle : Bug#27851: Instance manager test im_life_cycle fails randomly
im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly
im_daemon_life_cycle : Bug#20294: Instance manager tests fail randomly
mysql-test/t/rpl_loaddata.test
View file @
3b598218
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986)
source
include
/
master
-
slave
.
inc
;
source
include
/
master
-
slave
.
inc
;
source
include
/
have_innodb
.
inc
;
connection
slave
;
connection
slave
;
reset
master
;
reset
master
;
...
@@ -150,5 +151,16 @@ drop table t2;
...
@@ -150,5 +151,16 @@ drop table t2;
connection
master
;
connection
master
;
drop
table
t2
;
drop
table
t2
;
drop
table
t1
;
drop
table
t1
;
# BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed
CREATE
TABLE
t1
(
word
CHAR
(
20
)
NOT
NULL
PRIMARY
KEY
)
ENGINE
=
INNODB
;
--
error
1062
LOAD
DATA
INFILE
"../std_data_ln/words.dat"
INTO
TABLE
t1
;
--
disable
warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable
warnings
sync_with_master
;
sync_with_master
;
# End of 4.1 tests
# End of 4.1 tests
sql/sql_load.cc
View file @
3b598218
...
@@ -414,9 +414,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -414,9 +414,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if
(
error
)
if
(
error
)
{
{
if
(
transactional_table
)
ha_autocommit_or_rollback
(
thd
,
error
);
if
(
read_file_from_client
)
if
(
read_file_from_client
)
while
(
!
read_info
.
next_line
())
while
(
!
read_info
.
next_line
())
;
;
...
@@ -460,6 +457,9 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -460,6 +457,9 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
}
}
}
}
#endif
/*!EMBEDDED_LIBRARY*/
#endif
/*!EMBEDDED_LIBRARY*/
if
(
transactional_table
)
ha_autocommit_or_rollback
(
thd
,
error
);
error
=
-
1
;
// Error on read
error
=
-
1
;
// Error on read
goto
err
;
goto
err
;
}
}
...
...
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