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
8becc506
Commit
8becc506
authored
May 19, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for BUG33649: Post-review fixes
parent
482058be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
36 deletions
+34
-36
sql/sql_class.h
sql/sql_class.h
+1
-1
sql/sql_handler.cc
sql/sql_handler.cc
+33
-35
No files found.
sql/sql_class.h
View file @
8becc506
...
@@ -28,7 +28,7 @@ class Load_log_event;
...
@@ -28,7 +28,7 @@ class Load_log_event;
class
Slave_log_event
;
class
Slave_log_event
;
enum
enum_enable_or_disable
{
LEAVE_AS_IS
,
ENABLE
,
DISABLE
};
enum
enum_enable_or_disable
{
LEAVE_AS_IS
,
ENABLE
,
DISABLE
};
enum
enum_ha_read_modes
{
RFIRST
,
RNEXT
,
RPREV
,
RLAST
,
RKEY
};
enum
enum_ha_read_modes
{
RFIRST
,
RNEXT
,
RPREV
,
RLAST
,
RKEY
,
RNEXT_SAME
};
enum
enum_duplicates
{
DUP_ERROR
,
DUP_REPLACE
,
DUP_IGNORE
};
enum
enum_duplicates
{
DUP_ERROR
,
DUP_REPLACE
,
DUP_IGNORE
};
enum
enum_log_type
{
LOG_CLOSED
,
LOG_TO_BE_OPENED
,
LOG_NORMAL
,
LOG_NEW
,
LOG_BIN
};
enum
enum_log_type
{
LOG_CLOSED
,
LOG_TO_BE_OPENED
,
LOG_NORMAL
,
LOG_NEW
,
LOG_BIN
};
enum
enum_delay_key_write
{
DELAY_KEY_WRITE_NONE
,
DELAY_KEY_WRITE_ON
,
enum
enum_delay_key_write
{
DELAY_KEY_WRITE_NONE
,
DELAY_KEY_WRITE_ON
,
...
...
sql/sql_handler.cc
View file @
8becc506
...
@@ -103,7 +103,7 @@ int mysql_ha_closeall(THD *thd, TABLE_LIST *tables)
...
@@ -103,7 +103,7 @@ int mysql_ha_closeall(THD *thd, TABLE_LIST *tables)
}
}
static
enum
enum_ha_read_modes
rkey_to_rnext
[]
=
static
enum
enum_ha_read_modes
rkey_to_rnext
[]
=
{
R
KEY
,
RNEXT
,
RPREV
,
RNEXT
,
RPREV
,
RNEXT
,
RPREV
};
{
R
NEXT_SAME
,
RNEXT
,
RPREV
,
RNEXT
,
RPREV
,
RNEXT
,
RPREV
};
int
mysql_ha_read
(
THD
*
thd
,
TABLE_LIST
*
tables
,
int
mysql_ha_read
(
THD
*
thd
,
TABLE_LIST
*
tables
,
...
@@ -152,9 +152,10 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -152,9 +152,10 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
MYSQL_LOCK
*
lock
=
mysql_lock_tables
(
thd
,
&
tables
->
table
,
1
);
MYSQL_LOCK
*
lock
=
mysql_lock_tables
(
thd
,
&
tables
->
table
,
1
);
HANDLER_TABLES_HACK
(
thd
);
HANDLER_TABLES_HACK
(
thd
);
byte
*
key
=
NULL
;
byte
*
key
;
uint
key_len
;
uint
key_len
;
LINT_INIT
(
key_len
);
/* protected by key key variable */
LINT_INIT
(
key
);
LINT_INIT
(
key_len
);
if
(
!
lock
)
if
(
!
lock
)
goto
err0
;
// mysql_lock_tables() printed error message already
goto
err0
;
// mysql_lock_tables() printed error message already
...
@@ -187,14 +188,12 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -187,14 +188,12 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
DBUG_ASSERT
(
keyname
!=
0
);
DBUG_ASSERT
(
keyname
!=
0
);
err
=
table
->
file
->
index_prev
(
table
->
record
[
0
]);
err
=
table
->
file
->
index_prev
(
table
->
record
[
0
]);
break
;
break
;
case
RKEY
:
case
RNEXT_SAME
:
{
if
(
key
)
{
/* Continue scan on "(keypart1,keypart2,...)=(c1, c2, ...) */
/* Continue scan on "(keypart1,keypart2,...)=(c1, c2, ...) */
DBUG_ASSERT
(
keyname
!=
0
);
err
=
table
->
file
->
index_next_same
(
table
->
record
[
0
],
key
,
key_len
);
err
=
table
->
file
->
index_next_same
(
table
->
record
[
0
],
key
,
key_len
);
}
break
;
else
case
RKEY
:
{
{
DBUG_ASSERT
(
keyname
!=
0
);
DBUG_ASSERT
(
keyname
!=
0
);
KEY
*
keyinfo
=
table
->
key_info
+
keyno
;
KEY
*
keyinfo
=
table
->
key_info
+
keyno
;
...
@@ -228,7 +227,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -228,7 +227,6 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
err
=
table
->
file
->
index_read
(
table
->
record
[
0
],
err
=
table
->
file
->
index_read
(
table
->
record
[
0
],
key
,
key_len
,
ha_rkey_mode
);
key
,
key_len
,
ha_rkey_mode
);
mode
=
rkey_to_rnext
[(
int
)
ha_rkey_mode
];
mode
=
rkey_to_rnext
[(
int
)
ha_rkey_mode
];
}
break
;
break
;
}
}
default:
default:
...
...
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