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
f231d982
Commit
f231d982
authored
Feb 02, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
just tried to find all 'skipp' and replace it with 'skip'.
parent
32436780
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
83 additions
and
83 deletions
+83
-83
client/sql_string.cc
client/sql_string.cc
+6
-6
dbug/dbug.c
dbug/dbug.c
+1
-1
myisam/mi_create.c
myisam/mi_create.c
+9
-9
myisam/mi_dynrec.c
myisam/mi_dynrec.c
+5
-5
myisam/mi_packrec.c
myisam/mi_packrec.c
+9
-9
myisam/mi_rrnd.c
myisam/mi_rrnd.c
+4
-4
myisam/mi_statrec.c
myisam/mi_statrec.c
+3
-3
myisam/mi_test1.c
myisam/mi_test1.c
+1
-1
myisam/myisampack.c
myisam/myisampack.c
+4
-4
myisam/rt_test.c
myisam/rt_test.c
+1
-1
myisam/sp_test.c
myisam/sp_test.c
+1
-1
mysys/default.c
mysys/default.c
+1
-1
mysys/mf_iocache.c
mysys/mf_iocache.c
+1
-1
mysys/mf_pack.c
mysys/mf_pack.c
+1
-1
mysys/mf_wcomp.c
mysys/mf_wcomp.c
+1
-1
mysys/typelib.c
mysys/typelib.c
+1
-1
sql/filesort.cc
sql/filesort.cc
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+4
-4
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/opt_range.h
sql/opt_range.h
+1
-1
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+7
-7
sql/sql_string.cc
sql/sql_string.cc
+6
-6
sql/sql_update.cc
sql/sql_update.cc
+2
-2
strings/ctype-bin.c
strings/ctype-bin.c
+2
-2
strings/ctype-simple.c
strings/ctype-simple.c
+2
-2
strings/r_strinstr.c
strings/r_strinstr.c
+2
-2
strings/strinstr.c
strings/strinstr.c
+2
-2
strings/strstr.c
strings/strstr.c
+2
-2
No files found.
client/sql_string.cc
View file @
f231d982
...
...
@@ -415,7 +415,7 @@ int String::strstr(const String &s,uint32 offset)
register
const
char
*
search
=
s
.
ptr
();
const
char
*
end
=
Ptr
+
str_length
-
s
.
length
()
+
1
;
const
char
*
search_end
=
s
.
ptr
()
+
s
.
length
();
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
*
str
++
==
*
search
)
...
...
@@ -423,7 +423,7 @@ skipp:
register
char
*
i
,
*
j
;
i
=
(
char
*
)
str
;
j
=
(
char
*
)
search
+
1
;
while
(
j
!=
search_end
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
return
(
int
)
(
str
-
Ptr
)
-
1
;
}
}
...
...
@@ -447,7 +447,7 @@ int String::strstr_case(const String &s,uint32 offset)
register
const
char
*
search
=
s
.
ptr
();
const
char
*
end
=
Ptr
+
str_length
-
s
.
length
()
+
1
;
const
char
*
search_end
=
s
.
ptr
()
+
s
.
length
();
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
str_charset
->
sort_order
[
*
str
++
]
==
str_charset
->
sort_order
[
*
search
])
...
...
@@ -457,7 +457,7 @@ skipp:
while
(
j
!=
search_end
)
if
(
str_charset
->
sort_order
[
*
i
++
]
!=
str_charset
->
sort_order
[
*
j
++
])
goto
skip
p
;
goto
skip
;
return
(
int
)
(
str
-
Ptr
)
-
1
;
}
}
...
...
@@ -480,7 +480,7 @@ int String::strrstr(const String &s,uint32 offset)
const
char
*
end
=
Ptr
+
s
.
length
()
-
2
;
const
char
*
search_end
=
s
.
ptr
()
-
1
;
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
*
str
--
==
*
search
)
...
...
@@ -488,7 +488,7 @@ skipp:
register
char
*
i
,
*
j
;
i
=
(
char
*
)
str
;
j
=
(
char
*
)
search
-
1
;
while
(
j
!=
search_end
)
if
(
*
i
--
!=
*
j
--
)
goto
skip
p
;
if
(
*
i
--
!=
*
j
--
)
goto
skip
;
return
(
int
)
(
i
-
Ptr
)
+
1
;
}
}
...
...
dbug/dbug.c
View file @
f231d982
...
...
@@ -1640,7 +1640,7 @@ static char *static_strtok (char *s1, pchar separator)
cpy
--
;
/* Point at separator */
break
;
}
end
++
;
/* Two separators in a row, skip
p
one */
end
++
;
/* Two separators in a row, skip one */
}
}
while
(
*
end
!=
EOS
);
*
cpy
=
EOS
;
/* Replace last separator */
...
...
myisam/mi_create.c
View file @
f231d982
...
...
@@ -42,7 +42,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
int
errpos
,
save_errno
;
myf
create_flag
;
uint
fields
,
length
,
max_key_length
,
packed
,
pointer
,
key_length
,
info_length
,
key_segs
,
options
,
min_key_length_skip
p
,
key_length
,
info_length
,
key_segs
,
options
,
min_key_length_skip
,
base_pos
,
varchar_count
,
long_varchar_count
,
varchar_length
,
max_key_block_length
,
unique_key_parts
,
fulltext_keys
,
offset
;
ulong
reclength
,
real_reclength
,
min_pack_length
;
...
...
@@ -238,7 +238,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
{
share
.
state
.
key_root
[
i
]
=
HA_OFFSET_ERROR
;
min_key_length_skip
p
=
length
=
0
;
min_key_length_skip
=
length
=
0
;
key_length
=
pointer
;
if
(
keydef
->
flag
&
HA_SPATIAL
)
{
...
...
@@ -269,7 +269,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
keydef
->
keysegs
+=
sp_segs
;
key_length
+=
SPLEN
*
sp_segs
;
length
++
;
/* At least one length byte */
min_key_length_skip
p
+=
SPLEN
*
2
*
SPDIMS
;
min_key_length_skip
+=
SPLEN
*
2
*
SPDIMS
;
}
else
if
(
keydef
->
flag
&
HA_FULLTEXT
)
...
...
@@ -291,7 +291,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
fulltext_keys
++
;
key_length
+=
HA_FT_MAXBYTELEN
+
HA_FT_WLEN
;
length
++
;
/* At least one length byte */
min_key_length_skip
p
+=
HA_FT_MAXBYTELEN
;
min_key_length_skip
+=
HA_FT_MAXBYTELEN
;
}
else
{
...
...
@@ -348,10 +348,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
keydef
->
flag
|=
HA_SPACE_PACK_USED
|
HA_VAR_LENGTH_KEY
;
options
|=
HA_OPTION_PACK_KEYS
;
/* Using packed keys */
length
++
;
/* At least one length byte */
min_key_length_skip
p
+=
keyseg
->
length
;
min_key_length_skip
+=
keyseg
->
length
;
if
(
keyseg
->
length
>=
255
)
{
/* prefix may be 3 bytes */
min_key_length_skip
p
+=
2
;
min_key_length_skip
+=
2
;
length
+=
2
;
}
}
...
...
@@ -360,10 +360,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
keydef
->
flag
|=
HA_VAR_LENGTH_KEY
;
length
++
;
/* At least one length byte */
options
|=
HA_OPTION_PACK_KEYS
;
/* Using packed keys */
min_key_length_skip
p
+=
keyseg
->
length
;
min_key_length_skip
+=
keyseg
->
length
;
if
(
keyseg
->
length
>=
255
)
{
/* prefix may be 3 bytes */
min_key_length_skip
p
+=
2
;
min_key_length_skip
+=
2
;
length
+=
2
;
}
}
...
...
@@ -395,7 +395,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
}
set_if_bigger
(
max_key_block_length
,
keydef
->
block_length
);
keydef
->
keylength
=
(
uint16
)
key_length
;
keydef
->
minlength
=
(
uint16
)
(
length
-
min_key_length_skip
p
);
keydef
->
minlength
=
(
uint16
)
(
length
-
min_key_length_skip
);
keydef
->
maxlength
=
(
uint16
)
length
;
if
(
length
>
max_key_length
)
...
...
myisam/mi_dynrec.c
View file @
f231d982
...
...
@@ -1248,7 +1248,7 @@ err:
int
_mi_read_rnd_dynamic_record
(
MI_INFO
*
info
,
byte
*
buf
,
register
my_off_t
filepos
,
my_bool
skip
p
_deleted_blocks
)
my_bool
skip_deleted_blocks
)
{
int
flag
,
info_read
,
save_errno
;
uint
left_len
,
b_type
;
...
...
@@ -1299,7 +1299,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
{
if
(
_mi_read_cache
(
&
info
->
rec_cache
,(
byte
*
)
block_info
.
header
,
filepos
,
sizeof
(
block_info
.
header
),
(
!
flag
&&
skip
p
_deleted_blocks
?
READING_NEXT
:
0
)
|
(
!
flag
&&
skip_deleted_blocks
?
READING_NEXT
:
0
)
|
READING_HEADER
))
goto
panic
;
b_type
=
_mi_get_block_info
(
&
block_info
,
-
1
,
filepos
);
...
...
@@ -1318,7 +1318,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
BLOCK_FATAL_ERROR
))
{
if
((
b_type
&
(
BLOCK_DELETED
|
BLOCK_SYNC_ERROR
))
&&
skip
p
_deleted_blocks
)
&&
skip_deleted_blocks
)
{
filepos
=
block_info
.
filepos
+
block_info
.
block_len
;
block_info
.
second_read
=
0
;
...
...
@@ -1374,7 +1374,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
{
if
(
_mi_read_cache
(
&
info
->
rec_cache
,(
byte
*
)
to
,
filepos
,
block_info
.
data_len
,
(
!
flag
&&
skip
p
_deleted_blocks
)
?
READING_NEXT
:
0
))
(
!
flag
&&
skip_deleted_blocks
)
?
READING_NEXT
:
0
))
goto
panic
;
}
else
...
...
@@ -1391,7 +1391,7 @@ int _mi_read_rnd_dynamic_record(MI_INFO *info, byte *buf,
if
(
flag
++
==
0
)
{
info
->
nextpos
=
block_info
.
filepos
+
block_info
.
block_len
;
skip
p
_deleted_blocks
=
0
;
skip_deleted_blocks
=
0
;
}
left_len
-=
block_info
.
data_len
;
to
+=
block_info
.
data_len
;
...
...
myisam/mi_packrec.c
View file @
f231d982
...
...
@@ -32,7 +32,7 @@
(BU)->current_byte & ((mi_bit_type) 1 << --(BU)->bits) :\
(fill_buffer(BU), (BU)->bits= BITS_SAVED-1,\
(BU)->current_byte & ((mi_bit_type) 1 << (BITS_SAVED-1))))
#define skip
p
_to_next_byte(BU) ((BU)->bits&=~7)
#define skip_to_next_byte(BU) ((BU)->bits&=~7)
#define get_bits(BU,count) (((BU)->bits >= count) ? (((BU)->current_byte >> ((BU)->bits-=count)) & mask[count]) : fill_and_get_bits(BU,count))
#define decode_bytes_test_bit(bit) \
...
...
@@ -58,9 +58,9 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))(MI_COLUMNDEF *field,
MI_BIT_BUFF
*
buff
,
uchar
*
to
,
uchar
*
end
);
static
void
uf_zerofill_skip
p
_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
static
void
uf_zerofill_skip_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
uchar
*
end
);
static
void
uf_skip
p
_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
static
void
uf_skip_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
uchar
*
end
);
static
void
uf_space_normal
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
uchar
*
end
);
...
...
@@ -210,7 +210,7 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
huff_tree_bits
);
share
->
rec
[
i
].
unpack
=
get_unpack_function
(
share
->
rec
+
i
);
}
skip
p
_to_next_byte
(
&
bit_buff
);
skip_to_next_byte
(
&
bit_buff
);
decode_table
=
share
->
decode_tables
;
for
(
i
=
0
;
i
<
trees
;
i
++
)
read_huff_table
(
&
bit_buff
,
share
->
decode_trees
+
i
,
&
decode_table
,
...
...
@@ -291,7 +291,7 @@ static void read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
else
*
ptr
=
(
uint16
)
(
IS_CHAR
+
(
get_bits
(
bit_buff
,
char_bits
)
+
min_chr
));
}
skip
p
_to_next_byte
(
bit_buff
);
skip_to_next_byte
(
bit_buff
);
decode_tree
->
table
=
*
decode_table
;
decode_tree
->
intervalls
=
*
intervall_buff
;
...
...
@@ -468,8 +468,8 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
switch
(
rec
->
base_type
)
{
case
FIELD_SKIP_ZERO
:
if
(
rec
->
pack_type
&
PACK_TYPE_ZERO_FILL
)
return
&
uf_zerofill_skip
p
_zero
;
return
&
uf_skip
p
_zero
;
return
&
uf_zerofill_skip_zero
;
return
&
uf_skip_zero
;
case
FIELD_NORMAL
:
if
(
rec
->
pack_type
&
PACK_TYPE_SPACE_FIELDS
)
return
&
uf_space_normal
;
...
...
@@ -515,7 +515,7 @@ static void (*get_unpack_function(MI_COLUMNDEF *rec))
/* De different functions to unpack a field */
static
void
uf_zerofill_skip
p
_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
static
void
uf_zerofill_skip_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
uchar
*
end
)
{
if
(
get_bit
(
bit_buff
))
...
...
@@ -528,7 +528,7 @@ static void uf_zerofill_skipp_zero(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff,
}
}
static
void
uf_skip
p
_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
static
void
uf_skip_zero
(
MI_COLUMNDEF
*
rec
,
MI_BIT_BUFF
*
bit_buff
,
uchar
*
to
,
uchar
*
end
)
{
if
(
get_bit
(
bit_buff
))
...
...
myisam/mi_rrnd.c
View file @
f231d982
...
...
@@ -32,14 +32,14 @@
int
mi_rrnd
(
MI_INFO
*
info
,
byte
*
buf
,
register
my_off_t
filepos
)
{
my_bool
skip
p
_deleted_blocks
;
my_bool
skip_deleted_blocks
;
DBUG_ENTER
(
"mi_rrnd"
);
skip
p
_deleted_blocks
=
0
;
skip_deleted_blocks
=
0
;
if
(
filepos
==
HA_OFFSET_ERROR
)
{
skip
p
_deleted_blocks
=
1
;
skip_deleted_blocks
=
1
;
if
(
info
->
lastpos
==
HA_OFFSET_ERROR
)
/* First read ? */
filepos
=
info
->
s
->
pack
.
header_length
;
/* Read first record */
else
...
...
@@ -56,5 +56,5 @@ int mi_rrnd(MI_INFO *info, byte *buf, register my_off_t filepos)
if
(
info
->
opt_flag
&
WRITE_CACHE_USED
&&
flush_io_cache
(
&
info
->
rec_cache
))
DBUG_RETURN
(
my_errno
);
DBUG_RETURN
((
*
info
->
s
->
read_rnd
)(
info
,
buf
,
filepos
,
skip
p
_deleted_blocks
));
DBUG_RETURN
((
*
info
->
s
->
read_rnd
)(
info
,
buf
,
filepos
,
skip_deleted_blocks
));
}
myisam/mi_statrec.c
View file @
f231d982
...
...
@@ -202,7 +202,7 @@ int _mi_read_static_record(register MI_INFO *info, register my_off_t pos,
int
_mi_read_rnd_static_record
(
MI_INFO
*
info
,
byte
*
buf
,
register
my_off_t
filepos
,
my_bool
skip
p
_deleted_blocks
)
my_bool
skip_deleted_blocks
)
{
int
locked
,
error
,
cache_read
;
uint
cache_length
;
...
...
@@ -212,13 +212,13 @@ int _mi_read_rnd_static_record(MI_INFO *info, byte *buf,
cache_read
=
0
;
cache_length
=
0
;
if
(
info
->
opt_flag
&
WRITE_CACHE_USED
&&
(
info
->
rec_cache
.
pos_in_file
<=
filepos
||
skip
p
_deleted_blocks
)
&&
(
info
->
rec_cache
.
pos_in_file
<=
filepos
||
skip_deleted_blocks
)
&&
flush_io_cache
(
&
info
->
rec_cache
))
DBUG_RETURN
(
my_errno
);
if
(
info
->
opt_flag
&
READ_CACHE_USED
)
{
/* Cache in use */
if
(
filepos
==
my_b_tell
(
&
info
->
rec_cache
)
&&
(
skip
p
_deleted_blocks
||
!
filepos
))
(
skip_deleted_blocks
||
!
filepos
))
{
cache_read
=
1
;
/* Read record using cache */
cache_length
=
(
uint
)
(
info
->
rec_cache
.
read_end
-
info
->
rec_cache
.
read_pos
);
...
...
myisam/mi_test1.c
View file @
f231d982
...
...
@@ -318,7 +318,7 @@ static int run_test(const char *filename)
return
(
0
);
err:
printf
(
"got error: %3d when using myisam-database
\n
"
,
my_errno
);
return
1
;
/* skip
p
warning */
return
1
;
/* skip warning */
}
...
...
myisam/myisampack.c
View file @
f231d982
...
...
@@ -1071,7 +1071,7 @@ test_space_compress(HUFF_COUNTS *huff_counts, my_off_t records,
{
int
min_pos
;
uint
length_bits
,
i
;
my_off_t
space_count
,
min_space_count
,
min_pack
,
new_length
,
skip
p
;
my_off_t
space_count
,
min_space_count
,
min_pack
,
new_length
,
skip
;
length_bits
=
max_bit
(
max_space_length
);
...
...
@@ -1091,15 +1091,15 @@ test_space_compress(HUFF_COUNTS *huff_counts, my_off_t records,
min_space_count
=
space_count
;
}
/* Test with length-flag */
for
(
skip
p
=
0L
,
i
=
0
;
i
<
8
;
i
++
)
for
(
skip
=
0L
,
i
=
0
;
i
<
8
;
i
++
)
{
if
(
space_counts
[
i
])
{
if
(
i
)
huff_counts
->
counts
[(
uint
)
' '
]
+=
space_counts
[
i
];
skip
p
+=
huff_counts
->
pre_space
[
i
];
skip
+=
huff_counts
->
pre_space
[
i
];
new_length
=
calc_packed_length
(
huff_counts
,
0
)
+
(
records
+
(
records
-
skip
p
)
*
(
1
+
length_bits
))
/
8
;
(
records
+
(
records
-
skip
)
*
(
1
+
length_bits
))
/
8
;
if
(
new_length
<
min_pack
)
{
min_pos
=
(
int
)
i
;
...
...
myisam/rt_test.c
View file @
f231d982
...
...
@@ -307,7 +307,7 @@ int run_test(const char *filename)
err:
printf
(
"got error: %3d when using myisam-database
\n
"
,
my_errno
);
return
1
;
/* skip
p
warning */
return
1
;
/* skip warning */
}
...
...
myisam/sp_test.c
View file @
f231d982
...
...
@@ -283,7 +283,7 @@ int run_test(const char *filename)
err:
printf
(
"got error: %3d when using myisam-database
\n
"
,
my_errno
);
return
1
;
/* skip
p
warning */
return
1
;
/* skip warning */
}
...
...
mysys/default.c
View file @
f231d982
...
...
@@ -224,7 +224,7 @@ int load_defaults(const char *conf_file, const char **groups,
if
(
*
argc
>=
2
&&
!
strcmp
(
argv
[
0
][
1
],
"--print-defaults"
))
{
found_print_defaults
=
1
;
--*
argc
;
++*
argv
;
/* skip
p
argument */
--*
argc
;
++*
argv
;
/* skip argument */
}
if
(
*
argc
)
...
...
mysys/mf_iocache.c
View file @
f231d982
...
...
@@ -829,7 +829,7 @@ int _my_b_async_read(register IO_CACHE *info, byte *Buffer, uint Count)
next_pos_in_file
=
(
info
->
pos_in_file
+
(
uint
)
(
info
->
read_end
-
info
->
request_pos
));
/* If reading large blocks, or first read or read with skip
p
*/
/* If reading large blocks, or first read or read with skip */
if
(
Count
)
{
if
(
next_pos_in_file
==
info
->
end_of_file
)
...
...
mysys/mf_pack.c
View file @
f231d982
...
...
@@ -146,7 +146,7 @@ uint cleanup_dirname(register my_string to, const char *from)
if
(
*
pos
==
FN_LIBCHAR
)
{
if
((
uint
)
(
pos
-
start
)
>
length
&&
bcmp
(
pos
-
length
,
parent
,
length
)
==
0
)
{
/* If .../../; skip
p
prev */
{
/* If .../../; skip prev */
pos
-=
length
;
if
(
pos
!=
start
)
{
/* not /../ */
...
...
mysys/mf_wcomp.c
View file @
f231d982
...
...
@@ -49,7 +49,7 @@ int wild_compare(register const char *str, register const char *wildstr,
if
(
*
wildstr
++
==
wild_one
)
{
if
(
!
*
str
||
(
str_is_pattern
&&
*
str
==
wild_many
))
DBUG_RETURN
(
1
);
/* One char; skip
p
*/
DBUG_RETURN
(
1
);
/* One char; skip */
if
(
*
str
++
==
wild_prefix
&&
str_is_pattern
&&
*
str
)
str
++
;
}
...
...
mysys/typelib.c
View file @
f231d982
...
...
@@ -66,7 +66,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
if
(
!
*
j
)
{
while
(
*
i
==
' '
)
i
++
;
/* skip
p
_end_space */
i
++
;
/* skip_end_space */
if
(
!
*
i
)
DBUG_RETURN
(
pos
+
1
);
}
...
...
sql/filesort.cc
View file @
f231d982
...
...
@@ -399,7 +399,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
}
if
(
error
==
0
)
param
->
examined_rows
++
;
if
(
error
==
0
&&
(
!
select
||
select
->
skip
p
_record
()
==
0
))
if
(
error
==
0
&&
(
!
select
||
select
->
skip_record
()
==
0
))
{
if
(
idx
==
param
->
keys
)
{
...
...
sql/item_strfunc.cc
View file @
f231d982
...
...
@@ -780,7 +780,7 @@ redo:
register
char
*
i
,
*
j
;
i
=
(
char
*
)
ptr
+
1
;
j
=
(
char
*
)
search
+
1
;
while
(
j
!=
search_end
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
offset
=
(
int
)
(
ptr
-
res
->
ptr
());
if
(
res
->
length
()
-
from_length
+
to_length
>
current_thd
->
variables
.
max_allowed_packet
)
...
...
@@ -794,7 +794,7 @@ redo:
offset
+=
(
int
)
to_length
;
goto
redo
;
}
skip
p
:
skip:
if
((
l
=
my_ismbchar
(
res
->
charset
(),
ptr
,
strend
)))
ptr
+=
l
;
else
++
ptr
;
}
...
...
@@ -1089,13 +1089,13 @@ String *Item_func_substr_index::val_str(String *str)
register
char
*
i
,
*
j
;
i
=
(
char
*
)
ptr
+
1
;
j
=
(
char
*
)
search
+
1
;
while
(
j
!=
search_end
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
if
(
pass
==
0
)
++
n
;
else
if
(
!--
c
)
break
;
ptr
+=
delimeter_length
;
continue
;
}
skip
p
:
skip:
if
((
l
=
my_ismbchar
(
res
->
charset
(),
ptr
,
strend
)))
ptr
+=
l
;
else
++
ptr
;
}
/* either not found or got total number when count<0 */
...
...
sql/mysqld.cc
View file @
f231d982
...
...
@@ -5919,7 +5919,7 @@ static ulong find_bit_type(const char *x, TYPELIB *bit_lib)
{
if
(
my_toupper
(
mysqld_charset
,
*
i
++
)
!=
my_toupper
(
mysqld_charset
,
*
j
++
))
goto
skip
p
;
goto
skip
;
}
found_int
=
bit
;
if
(
!
*
i
)
...
...
@@ -5931,7 +5931,7 @@ static ulong find_bit_type(const char *x, TYPELIB *bit_lib)
{
found_count
++
;
// Could be one of two values
}
skip
p
:
;
skip:
;
}
if
(
found_count
!=
1
)
DBUG_RETURN
(
~
(
ulong
)
0
);
// No unique value
...
...
sql/opt_range.h
View file @
f231d982
...
...
@@ -129,7 +129,7 @@ class SQL_SELECT :public Sql_alloc {
~
SQL_SELECT
();
bool
check_quick
(
THD
*
thd
,
bool
force_quick_range
,
ha_rows
limit
)
{
return
test_quick_select
(
thd
,
key_map
(
~
0
),
0
,
limit
,
force_quick_range
)
<
0
;
}
inline
bool
skip
p
_record
()
{
return
cond
?
cond
->
val_int
()
==
0
:
0
;
}
inline
bool
skip_record
()
{
return
cond
?
cond
->
val_int
()
==
0
:
0
;
}
int
test_quick_select
(
THD
*
thd
,
key_map
keys
,
table_map
prev_tables
,
ha_rows
limit
,
bool
force_quick_range
=
0
);
};
...
...
sql/sql_delete.cc
View file @
f231d982
...
...
@@ -159,7 +159,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order,
!
thd
->
net
.
report_error
)
{
// thd->net.report_error is tested to disallow delete row on error
if
(
!
(
select
&&
select
->
skip
p
_record
())
&&
!
thd
->
net
.
report_error
)
if
(
!
(
select
&&
select
->
skip_record
())
&&
!
thd
->
net
.
report_error
)
{
if
(
!
(
error
=
table
->
file
->
delete_row
(
table
->
record
[
0
])))
{
...
...
sql/sql_select.cc
View file @
f231d982
...
...
@@ -82,7 +82,7 @@ static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
Procedure
*
proc
);
static
int
sub_select_cache
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
static
int
sub_select
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
static
int
flush_cached_records
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
skip
p
_last
);
static
int
flush_cached_records
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
skip_last
);
static
int
end_send
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
static
int
end_send_group
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
static
int
end_write
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
end_of_records
);
...
...
@@ -5759,14 +5759,14 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
static
int
flush_cached_records
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
skip
p
_last
)
flush_cached_records
(
JOIN
*
join
,
JOIN_TAB
*
join_tab
,
bool
skip_last
)
{
int
error
;
READ_RECORD
*
info
;
if
(
!
join_tab
->
cache
.
records
)
return
0
;
/* Nothing to do */
if
(
skip
p
_last
)
if
(
skip_last
)
(
void
)
store_record_in_cache
(
&
join_tab
->
cache
);
// Must save this for later
if
(
join_tab
->
use_quick
==
2
)
{
...
...
@@ -5800,21 +5800,21 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last)
}
SQL_SELECT
*
select
=
join_tab
->
select
;
if
(
!
error
&&
(
!
join_tab
->
cache
.
select
||
!
join_tab
->
cache
.
select
->
skip
p
_record
()))
!
join_tab
->
cache
.
select
->
skip_record
()))
{
uint
i
;
reset_cache
(
&
join_tab
->
cache
);
for
(
i
=
(
join_tab
->
cache
.
records
-
(
skip
p
_last
?
1
:
0
))
;
i
--
>
0
;)
for
(
i
=
(
join_tab
->
cache
.
records
-
(
skip_last
?
1
:
0
))
;
i
--
>
0
;)
{
read_cached_record
(
join_tab
);
if
(
!
select
||
!
select
->
skip
p
_record
())
if
(
!
select
||
!
select
->
skip_record
())
if
((
error
=
(
join_tab
->
next_select
)(
join
,
join_tab
+
1
,
0
))
<
0
)
return
error
;
/* purecov: inspected */
}
}
}
while
(
!
(
error
=
info
->
read_record
(
info
)));
if
(
skip
p
_last
)
if
(
skip_last
)
read_cached_record
(
join_tab
);
// Restore current record
reset_cache
(
&
join_tab
->
cache
);
join_tab
->
cache
.
records
=
0
;
join_tab
->
cache
.
ptr_record
=
(
uint
)
~
0
;
...
...
sql/sql_string.cc
View file @
f231d982
...
...
@@ -521,7 +521,7 @@ int String::strstr(const String &s,uint32 offset)
register
const
char
*
search
=
s
.
ptr
();
const
char
*
end
=
Ptr
+
str_length
-
s
.
length
()
+
1
;
const
char
*
search_end
=
s
.
ptr
()
+
s
.
length
();
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
*
str
++
==
*
search
)
...
...
@@ -529,7 +529,7 @@ skipp:
register
char
*
i
,
*
j
;
i
=
(
char
*
)
str
;
j
=
(
char
*
)
search
+
1
;
while
(
j
!=
search_end
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
return
(
int
)
(
str
-
Ptr
)
-
1
;
}
}
...
...
@@ -553,7 +553,7 @@ int String::strstr_case(const String &s,uint32 offset)
register
const
char
*
search
=
s
.
ptr
();
const
char
*
end
=
Ptr
+
str_length
-
s
.
length
()
+
1
;
const
char
*
search_end
=
s
.
ptr
()
+
s
.
length
();
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
str_charset
->
sort_order
[
*
str
++
]
==
str_charset
->
sort_order
[
*
search
])
...
...
@@ -563,7 +563,7 @@ skipp:
while
(
j
!=
search_end
)
if
(
str_charset
->
sort_order
[
*
i
++
]
!=
str_charset
->
sort_order
[
*
j
++
])
goto
skip
p
;
goto
skip
;
return
(
int
)
(
str
-
Ptr
)
-
1
;
}
}
...
...
@@ -586,7 +586,7 @@ int String::strrstr(const String &s,uint32 offset)
const
char
*
end
=
Ptr
+
s
.
length
()
-
2
;
const
char
*
search_end
=
s
.
ptr
()
-
1
;
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
*
str
--
==
*
search
)
...
...
@@ -594,7 +594,7 @@ skipp:
register
char
*
i
,
*
j
;
i
=
(
char
*
)
str
;
j
=
(
char
*
)
search
-
1
;
while
(
j
!=
search_end
)
if
(
*
i
--
!=
*
j
--
)
goto
skip
p
;
if
(
*
i
--
!=
*
j
--
)
goto
skip
;
return
(
int
)
(
i
-
Ptr
)
+
1
;
}
}
...
...
sql/sql_update.cc
View file @
f231d982
...
...
@@ -245,7 +245,7 @@ int mysql_update(THD *thd,
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
{
if
(
!
(
select
&&
select
->
skip
p
_record
()))
if
(
!
(
select
&&
select
->
skip_record
()))
{
table
->
file
->
position
(
table
->
record
[
0
]);
if
(
my_b_write
(
&
tempfile
,
table
->
file
->
ref
,
...
...
@@ -302,7 +302,7 @@ int mysql_update(THD *thd,
while
(
!
(
error
=
info
.
read_record
(
&
info
))
&&
!
thd
->
killed
)
{
if
(
!
(
select
&&
select
->
skip
p
_record
()))
if
(
!
(
select
&&
select
->
skip_record
()))
{
store_record
(
table
,
record
[
1
]);
if
(
fill_record
(
fields
,
values
,
0
)
||
thd
->
net
.
report_error
)
...
...
strings/ctype-bin.c
View file @
f231d982
...
...
@@ -294,7 +294,7 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
end
=
(
const
uchar
*
)
b
+
b_length
-
s_length
+
1
;
search_end
=
(
const
uchar
*
)
s
+
s_length
;
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
(
*
str
++
)
==
(
*
search
))
...
...
@@ -306,7 +306,7 @@ skipp:
while
(
j
!=
search_end
)
if
((
*
i
++
)
!=
(
*
j
++
))
goto
skip
p
;
goto
skip
;
if
(
nmatch
>
0
)
{
...
...
strings/ctype-simple.c
View file @
f231d982
...
...
@@ -1055,7 +1055,7 @@ uint my_instr_simple(CHARSET_INFO *cs,
end
=
(
const
uchar
*
)
b
+
b_length
-
s_length
+
1
;
search_end
=
(
const
uchar
*
)
s
+
s_length
;
skip
p
:
skip:
while
(
str
!=
end
)
{
if
(
cs
->
sort_order
[
*
str
++
]
==
cs
->
sort_order
[
*
search
])
...
...
@@ -1067,7 +1067,7 @@ skipp:
while
(
j
!=
search_end
)
if
(
cs
->
sort_order
[
*
i
++
]
!=
cs
->
sort_order
[
*
j
++
])
goto
skip
p
;
goto
skip
;
if
(
nmatch
>
0
)
{
...
...
strings/r_strinstr.c
View file @
f231d982
...
...
@@ -35,7 +35,7 @@ uint r_strinstr(reg1 my_string str,int from, reg4 my_string search)
/* pointer to the last char of search */
my_string
search_end
=
search
+
len
-
1
;
skip
p
:
skip:
while
(
start
>=
str
)
/* Cant be != because the first char */
{
if
(
*
start
--
==
*
search_end
)
...
...
@@ -43,7 +43,7 @@ uint r_strinstr(reg1 my_string str,int from, reg4 my_string search)
i
=
start
;
j
=
search_end
-
1
;
while
(
j
>=
search
&&
start
>
str
)
if
(
*
i
--
!=
*
j
--
)
goto
skip
p
;
goto
skip
;
return
(
uint
)
((
start
-
len
)
-
str
+
3
);
}
}
...
...
strings/strinstr.c
View file @
f231d982
...
...
@@ -34,14 +34,14 @@ uint strinstr(reg1 const char *str,reg4 const char *search)
reg2
my_string
i
,
j
;
my_string
start
=
(
my_string
)
str
;
skip
p
:
skip:
while
(
*
str
!=
'\0'
)
{
if
(
*
str
++
==
*
search
)
{
i
=
(
my_string
)
str
;
j
=
(
my_string
)
search
+
1
;
while
(
*
j
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
return
((
uint
)
(
str
-
start
));
}
}
...
...
strings/strstr.c
View file @
f231d982
...
...
@@ -37,12 +37,12 @@ char *strstr(register const char *str,const char *search)
register
char
*
i
,
*
j
;
register
char
first
=
*
search
;
skip
p
:
skip:
while
(
*
str
!=
'\0'
)
{
if
(
*
str
++
==
first
)
{
i
=
(
char
*
)
str
;
j
=
(
char
*
)
search
+
1
;
while
(
*
j
)
if
(
*
i
++
!=
*
j
++
)
goto
skip
p
;
if
(
*
i
++
!=
*
j
++
)
goto
skip
;
return
((
char
*
)
str
-
1
);
}
}
...
...
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