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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
427bcfb4
Commit
427bcfb4
authored
May 06, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug16798
parents
447d5a0f
253c6133
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
12 deletions
+22
-12
myisam/mi_check.c
myisam/mi_check.c
+17
-9
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+2
-2
mysql-test/t/func_misc.test
mysql-test/t/func_misc.test
+3
-1
No files found.
myisam/mi_check.c
View file @
427bcfb4
...
@@ -3790,6 +3790,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3790,6 +3790,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
ha_rows
max_records
;
ha_rows
max_records
;
ulonglong
file_length
,
tmp_length
;
ulonglong
file_length
,
tmp_length
;
MI_CREATE_INFO
create_info
;
MI_CREATE_INFO
create_info
;
DBUG_ENTER
(
"recreate_table"
);
error
=
1
;
/* Default error */
error
=
1
;
/* Default error */
info
=
**
org_info
;
info
=
**
org_info
;
...
@@ -3799,7 +3800,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3799,7 +3800,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
unpack
=
(
share
.
options
&
HA_OPTION_COMPRESS_RECORD
)
&&
unpack
=
(
share
.
options
&
HA_OPTION_COMPRESS_RECORD
)
&&
(
param
->
testflag
&
T_UNPACK
);
(
param
->
testflag
&
T_UNPACK
);
if
(
!
(
keyinfo
=
(
MI_KEYDEF
*
)
my_alloca
(
sizeof
(
MI_KEYDEF
)
*
share
.
base
.
keys
)))
if
(
!
(
keyinfo
=
(
MI_KEYDEF
*
)
my_alloca
(
sizeof
(
MI_KEYDEF
)
*
share
.
base
.
keys
)))
return
0
;
DBUG_RETURN
(
0
)
;
memcpy
((
byte
*
)
keyinfo
,(
byte
*
)
share
.
keyinfo
,
memcpy
((
byte
*
)
keyinfo
,(
byte
*
)
share
.
keyinfo
,
(
size_t
)
(
sizeof
(
MI_KEYDEF
)
*
share
.
base
.
keys
));
(
size_t
)
(
sizeof
(
MI_KEYDEF
)
*
share
.
base
.
keys
));
...
@@ -3808,14 +3809,14 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3808,14 +3809,14 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
(
key_parts
+
share
.
base
.
keys
))))
(
key_parts
+
share
.
base
.
keys
))))
{
{
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keyinfo
);
return
1
;
DBUG_RETURN
(
1
)
;
}
}
if
(
!
(
recdef
=
(
MI_COLUMNDEF
*
)
if
(
!
(
recdef
=
(
MI_COLUMNDEF
*
)
my_alloca
(
sizeof
(
MI_COLUMNDEF
)
*
(
share
.
base
.
fields
+
1
))))
my_alloca
(
sizeof
(
MI_COLUMNDEF
)
*
(
share
.
base
.
fields
+
1
))))
{
{
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keysegs
);
my_afree
((
gptr
)
keysegs
);
return
1
;
DBUG_RETURN
(
1
)
;
}
}
if
(
!
(
uniquedef
=
(
MI_UNIQUEDEF
*
)
if
(
!
(
uniquedef
=
(
MI_UNIQUEDEF
*
)
my_alloca
(
sizeof
(
MI_UNIQUEDEF
)
*
(
share
.
state
.
header
.
uniques
+
1
))))
my_alloca
(
sizeof
(
MI_UNIQUEDEF
)
*
(
share
.
state
.
header
.
uniques
+
1
))))
...
@@ -3823,7 +3824,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3823,7 +3824,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
my_afree
((
gptr
)
recdef
);
my_afree
((
gptr
)
recdef
);
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keysegs
);
my_afree
((
gptr
)
keysegs
);
return
1
;
DBUG_RETURN
(
1
)
;
}
}
/* Copy the column definitions */
/* Copy the column definitions */
...
@@ -3896,6 +3897,11 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3896,6 +3897,11 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
create_info
.
language
=
(
param
->
language
?
param
->
language
:
create_info
.
language
=
(
param
->
language
?
param
->
language
:
share
.
state
.
header
.
language
);
share
.
state
.
header
.
language
);
create_info
.
key_file_length
=
status_info
.
key_file_length
;
create_info
.
key_file_length
=
status_info
.
key_file_length
;
/*
Allow for creating an auto_increment key. This has an effect only if
an auto_increment key exists in the original table.
*/
create_info
.
with_auto_increment
=
TRUE
;
/* We don't have to handle symlinks here because we are using
/* We don't have to handle symlinks here because we are using
HA_DONT_TOUCH_DATA */
HA_DONT_TOUCH_DATA */
if
(
mi_create
(
filename
,
if
(
mi_create
(
filename
,
...
@@ -3940,7 +3946,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
...
@@ -3940,7 +3946,7 @@ int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename)
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
keyinfo
);
my_afree
((
gptr
)
recdef
);
my_afree
((
gptr
)
recdef
);
my_afree
((
gptr
)
keysegs
);
my_afree
((
gptr
)
keysegs
);
return
error
;
DBUG_RETURN
(
error
)
;
}
}
...
@@ -4043,6 +4049,8 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
...
@@ -4043,6 +4049,8 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
my_bool
repair_only
)
my_bool
repair_only
)
{
{
byte
*
record
;
byte
*
record
;
DBUG_ENTER
(
"update_auto_increment_key"
);
if
(
!
info
->
s
->
base
.
auto_key
||
if
(
!
info
->
s
->
base
.
auto_key
||
!
(((
ulonglong
)
1
<<
(
info
->
s
->
base
.
auto_key
-
1
)
!
(((
ulonglong
)
1
<<
(
info
->
s
->
base
.
auto_key
-
1
)
&
info
->
s
->
state
.
key_map
)))
&
info
->
s
->
state
.
key_map
)))
...
@@ -4051,7 +4059,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
...
@@ -4051,7 +4059,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
mi_check_print_info
(
param
,
mi_check_print_info
(
param
,
"Table: %s doesn't have an auto increment key
\n
"
,
"Table: %s doesn't have an auto increment key
\n
"
,
param
->
isam_file_name
);
param
->
isam_file_name
);
return
;
DBUG_VOID_RETURN
;
}
}
if
(
!
(
param
->
testflag
&
T_SILENT
)
&&
if
(
!
(
param
->
testflag
&
T_SILENT
)
&&
!
(
param
->
testflag
&
T_REP
))
!
(
param
->
testflag
&
T_REP
))
...
@@ -4064,7 +4072,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
...
@@ -4064,7 +4072,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
MYF
(
0
))))
MYF
(
0
))))
{
{
mi_check_print_error
(
param
,
"Not enough memory for extra record"
);
mi_check_print_error
(
param
,
"Not enough memory for extra record"
);
return
;
DBUG_VOID_RETURN
;
}
}
mi_extra
(
info
,
HA_EXTRA_KEYREAD
,
0
);
mi_extra
(
info
,
HA_EXTRA_KEYREAD
,
0
);
...
@@ -4075,7 +4083,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
...
@@ -4075,7 +4083,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
my_free
((
char
*
)
record
,
MYF
(
0
));
my_free
((
char
*
)
record
,
MYF
(
0
));
mi_check_print_error
(
param
,
"%d when reading last record"
,
my_errno
);
mi_check_print_error
(
param
,
"%d when reading last record"
,
my_errno
);
return
;
DBUG_VOID_RETURN
;
}
}
if
(
!
repair_only
)
if
(
!
repair_only
)
info
->
s
->
state
.
auto_increment
=
param
->
auto_increment_value
;
info
->
s
->
state
.
auto_increment
=
param
->
auto_increment_value
;
...
@@ -4091,7 +4099,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
...
@@ -4091,7 +4099,7 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
my_free
((
char
*
)
record
,
MYF
(
0
));
my_free
((
char
*
)
record
,
MYF
(
0
));
update_state_info
(
param
,
info
,
UPDATE_AUTO_INC
);
update_state_info
(
param
,
info
,
UPDATE_AUTO_INC
);
return
;
DBUG_VOID_RETURN
;
}
}
...
...
mysql-test/r/func_misc.result
View file @
427bcfb4
...
@@ -76,13 +76,13 @@ IS_USED_LOCK('bug16501') = CONNECTION_ID()
...
@@ -76,13 +76,13 @@ IS_USED_LOCK('bug16501') = CONNECTION_ID()
SELECT RELEASE_LOCK('bug16501');
SELECT RELEASE_LOCK('bug16501');
RELEASE_LOCK('bug16501')
RELEASE_LOCK('bug16501')
1
1
GET_LOCK('bug16501',600)
1
SELECT IS_USED_LOCK('bug16501') = connection_id
SELECT IS_USED_LOCK('bug16501') = connection_id
FROM t1
FROM t1
WHERE conn = 'con1';
WHERE conn = 'con1';
IS_USED_LOCK('bug16501') = connection_id
IS_USED_LOCK('bug16501') = connection_id
1
1
GET_LOCK('bug16501',600)
1
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
IS_USED_LOCK('bug16501') = CONNECTION_ID()
IS_USED_LOCK('bug16501') = CONNECTION_ID()
1
1
...
...
mysql-test/t/func_misc.test
View file @
427bcfb4
...
@@ -66,12 +66,14 @@ send SELECT GET_LOCK('bug16501',600);
...
@@ -66,12 +66,14 @@ send SELECT GET_LOCK('bug16501',600);
connection
default
;
connection
default
;
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
CONNECTION_ID
();
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
CONNECTION_ID
();
SELECT
RELEASE_LOCK
(
'bug16501'
);
SELECT
RELEASE_LOCK
(
'bug16501'
);
connection
con1
;
reap
;
connection
default
;
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
connection_id
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
connection_id
FROM
t1
FROM
t1
WHERE
conn
=
'con1'
;
WHERE
conn
=
'con1'
;
connection
con1
;
connection
con1
;
reap
;
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
CONNECTION_ID
();
SELECT
IS_USED_LOCK
(
'bug16501'
)
=
CONNECTION_ID
();
SELECT
RELEASE_LOCK
(
'bug16501'
);
SELECT
RELEASE_LOCK
(
'bug16501'
);
SELECT
IS_USED_LOCK
(
'bug16501'
);
SELECT
IS_USED_LOCK
(
'bug16501'
);
...
...
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