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
b060fff6
Commit
b060fff6
authored
Sep 21, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
08cdf195
4d267191
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
26 deletions
+50
-26
innobase/ibuf/ibuf0ibuf.c
innobase/ibuf/ibuf0ibuf.c
+10
-9
innobase/include/data0type.h
innobase/include/data0type.h
+3
-1
innobase/include/data0type.ic
innobase/include/data0type.ic
+7
-2
myisam/mi_locking.c
myisam/mi_locking.c
+15
-0
myisam/myisamdef.h
myisam/myisamdef.h
+3
-0
myisammrg/myrg_locking.c
myisammrg/myrg_locking.c
+12
-1
sql/ha_innodb.cc
sql/ha_innodb.cc
+0
-13
No files found.
innobase/ibuf/ibuf0ibuf.c
View file @
b060fff6
...
@@ -1361,8 +1361,8 @@ ibuf_entry_build(
...
@@ -1361,8 +1361,8 @@ ibuf_entry_build(
index tree; NOTE that the original entry
index tree; NOTE that the original entry
must be kept because we copy pointers to its
must be kept because we copy pointers to its
fields */
fields */
dict_index_t
*
index
,
/* in: non-clustered index */
dtuple_t
*
entry
,
/* in: entry for a non-clustered index */
dtuple_t
*
entry
,
/* in: entry for a non-clustered index */
ibool
comp
,
/* in: flag: TRUE=compact record format */
ulint
space
,
/* in: space id */
ulint
space
,
/* in: space id */
ulint
page_no
,
/* in: index page number where entry should
ulint
page_no
,
/* in: index page number where entry should
be inserted */
be inserted */
...
@@ -1426,13 +1426,13 @@ ibuf_entry_build(
...
@@ -1426,13 +1426,13 @@ ibuf_entry_build(
dfield_set_data
(
field
,
buf
,
4
);
dfield_set_data
(
field
,
buf
,
4
);
ut_ad
(
comp
==
0
||
comp
=
=
1
);
ut_ad
(
index
->
table
->
comp
<
=
1
);
/* Store the type info in buf2, and add the fields from entry to
/* Store the type info in buf2, and add the fields from entry to
tuple */
tuple */
buf2
=
mem_heap_alloc
(
heap
,
n_fields
buf2
=
mem_heap_alloc
(
heap
,
n_fields
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
+
comp
);
+
index
->
table
->
comp
);
if
(
comp
)
{
if
(
index
->
table
->
comp
)
{
*
buf2
++
=
0
;
/* write the compact format indicator */
*
buf2
++
=
0
;
/* write the compact format indicator */
}
}
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
for
(
i
=
0
;
i
<
n_fields
;
i
++
)
{
...
@@ -1445,20 +1445,22 @@ ibuf_entry_build(
...
@@ -1445,20 +1445,22 @@ ibuf_entry_build(
dtype_new_store_for_order_and_null_size
(
dtype_new_store_for_order_and_null_size
(
buf2
+
i
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
,
buf2
+
i
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
,
dfield_get_type
(
entry_field
));
dfield_get_type
(
entry_field
),
dict_index_get_nth_field
(
index
,
i
)
->
prefix_len
);
}
}
/* Store the type info in buf2 to field 3 of tuple */
/* Store the type info in buf2 to field 3 of tuple */
field
=
dtuple_get_nth_field
(
tuple
,
3
);
field
=
dtuple_get_nth_field
(
tuple
,
3
);
if
(
comp
)
{
if
(
index
->
table
->
comp
)
{
buf2
--
;
buf2
--
;
}
}
dfield_set_data
(
field
,
buf2
,
n_fields
dfield_set_data
(
field
,
buf2
,
n_fields
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
*
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
+
comp
);
+
index
->
table
->
comp
);
/* Set all the types in the new tuple binary */
/* Set all the types in the new tuple binary */
dtuple_set_types_binary
(
tuple
,
n_fields
+
4
);
dtuple_set_types_binary
(
tuple
,
n_fields
+
4
);
...
@@ -2589,8 +2591,7 @@ ibuf_insert_low(
...
@@ -2589,8 +2591,7 @@ ibuf_insert_low(
the first fields and the type information for other fields, and which
the first fields and the type information for other fields, and which
will be inserted to the insert buffer. */
will be inserted to the insert buffer. */
ibuf_entry
=
ibuf_entry_build
(
entry
,
index
->
table
->
comp
,
ibuf_entry
=
ibuf_entry_build
(
index
,
entry
,
space
,
page_no
,
heap
);
space
,
page_no
,
heap
);
/* Open a cursor to the insert buffer tree to calculate if we can add
/* Open a cursor to the insert buffer tree to calculate if we can add
the new entry to it without exceeding the free space limit for the
the new entry to it without exceeding the free space limit for the
...
...
innobase/include/data0type.h
View file @
b060fff6
...
@@ -366,7 +366,9 @@ dtype_new_store_for_order_and_null_size(
...
@@ -366,7 +366,9 @@ dtype_new_store_for_order_and_null_size(
byte
*
buf
,
/* in: buffer for
byte
*
buf
,
/* in: buffer for
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
bytes where we store the info */
bytes where we store the info */
dtype_t
*
type
);
/* in: type struct */
dtype_t
*
type
,
/* in: type struct */
ulint
prefix_len
);
/* in: prefix length to
replace type->len, or 0 */
/**************************************************************************
/**************************************************************************
Reads to a type the stored information which determines its alphabetical
Reads to a type the stored information which determines its alphabetical
ordering and the storage size of an SQL NULL value. This is the 4.1.x storage
ordering and the storage size of an SQL NULL value. This is the 4.1.x storage
...
...
innobase/include/data0type.ic
View file @
b060fff6
...
@@ -230,11 +230,14 @@ dtype_new_store_for_order_and_null_size(
...
@@ -230,11 +230,14 @@ dtype_new_store_for_order_and_null_size(
byte* buf, /* in: buffer for
byte* buf, /* in: buffer for
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
bytes where we store the info */
bytes where we store the info */
dtype_t* type) /* in: type struct */
dtype_t* type, /* in: type struct */
ulint prefix_len)/* in: prefix length to
replace type->len, or 0 */
{
{
#if 6 != DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
#if 6 != DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
#error "6 != DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE"
#error "6 != DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE"
#endif
#endif
ulint len;
buf[0] = (byte)(type->mtype & 0xFFUL);
buf[0] = (byte)(type->mtype & 0xFFUL);
...
@@ -249,7 +252,9 @@ dtype_new_store_for_order_and_null_size(
...
@@ -249,7 +252,9 @@ dtype_new_store_for_order_and_null_size(
buf[1] = (byte)(type->prtype & 0xFFUL);
buf[1] = (byte)(type->prtype & 0xFFUL);
mach_write_to_2(buf + 2, type->len & 0xFFFFUL);
len = prefix_len ? prefix_len : type->len;
mach_write_to_2(buf + 2, len & 0xFFFFUL);
ut_ad(dtype_get_charset_coll(type->prtype) < 256);
ut_ad(dtype_get_charset_coll(type->prtype) < 256);
mach_write_to_2(buf + 4, dtype_get_charset_coll(type->prtype));
mach_write_to_2(buf + 4, dtype_get_charset_coll(type->prtype));
...
...
myisam/mi_locking.c
View file @
b060fff6
...
@@ -224,6 +224,21 @@ int mi_lock_database(MI_INFO *info, int lock_type)
...
@@ -224,6 +224,21 @@ int mi_lock_database(MI_INFO *info, int lock_type)
break
;
/* Impossible */
break
;
/* Impossible */
}
}
}
}
#ifdef __WIN__
else
{
/*
Check for bad file descriptors if this table is part
of a merge union. Failing to capture this may cause
a crash on windows if the table is renamed and
later on referenced by the merge table.
*/
if
(
info
->
owned_by_merge
&&
(
info
->
s
)
->
kfile
<
0
)
{
error
=
HA_ERR_NO_SUCH_TABLE
;
}
}
#endif
pthread_mutex_unlock
(
&
share
->
intern_lock
);
pthread_mutex_unlock
(
&
share
->
intern_lock
);
#if defined(FULL_LOG) || defined(_lint)
#if defined(FULL_LOG) || defined(_lint)
lock_type
|=
(
int
)
(
flag
<<
8
);
/* Set bit to set if real lock */
lock_type
|=
(
int
)
(
flag
<<
8
);
/* Set bit to set if real lock */
...
...
myisam/myisamdef.h
View file @
b060fff6
...
@@ -278,6 +278,9 @@ struct st_myisam_info {
...
@@ -278,6 +278,9 @@ struct st_myisam_info {
my_bool
page_changed
;
/* If info->buff can't be used for rnext */
my_bool
page_changed
;
/* If info->buff can't be used for rnext */
my_bool
buff_used
;
/* If info->buff has to be reread for rnext */
my_bool
buff_used
;
/* If info->buff has to be reread for rnext */
my_bool
once_flags
;
/* For MYISAMMRG */
my_bool
once_flags
;
/* For MYISAMMRG */
#ifdef __WIN__
my_bool
owned_by_merge
;
/* This MyISAM table is part of a merge union */
#endif
#ifdef THREAD
#ifdef THREAD
THR_LOCK_DATA
lock
;
THR_LOCK_DATA
lock
;
#endif
#endif
...
...
myisammrg/myrg_locking.c
View file @
b060fff6
...
@@ -26,8 +26,19 @@ int myrg_lock_database(MYRG_INFO *info, int lock_type)
...
@@ -26,8 +26,19 @@ int myrg_lock_database(MYRG_INFO *info, int lock_type)
MYRG_TABLE
*
file
;
MYRG_TABLE
*
file
;
error
=
0
;
error
=
0
;
for
(
file
=
info
->
open_tables
;
file
!=
info
->
end_table
;
file
++
)
for
(
file
=
info
->
open_tables
;
file
!=
info
->
end_table
;
file
++
)
{
#ifdef __WIN__
/*
Make sure this table is marked as owned by a merge table.
The semaphore is never released as long as table remains
in memory. This should be refactored into a more generic
approach (observer pattern)
*/
(
file
->
table
)
->
owned_by_merge
=
TRUE
;
#endif
if
((
new_error
=
mi_lock_database
(
file
->
table
,
lock_type
)))
if
((
new_error
=
mi_lock_database
(
file
->
table
,
lock_type
)))
error
=
new_error
;
error
=
new_error
;
}
return
(
error
);
return
(
error
);
}
}
sql/ha_innodb.cc
View file @
b060fff6
...
@@ -5969,19 +5969,6 @@ ha_innobase::start_stmt(
...
@@ -5969,19 +5969,6 @@ ha_innobase::start_stmt(
prebuilt
->
select_lock_type
=
prebuilt
->
select_lock_type
=
prebuilt
->
stored_select_lock_type
;
prebuilt
->
stored_select_lock_type
;
}
}
if
(
prebuilt
->
stored_select_lock_type
!=
LOCK_S
&&
prebuilt
->
stored_select_lock_type
!=
LOCK_X
)
{
sql_print_error
(
"stored_select_lock_type is %lu inside "
"::start_stmt()!"
,
prebuilt
->
stored_select_lock_type
);
/* Set the value to LOCK_X: this is just fault
tolerance, we do not know what the correct value
should be! */
prebuilt
->
select_lock_type
=
LOCK_X
;
}
}
}
trx
->
detailed_error
[
0
]
=
'\0'
;
trx
->
detailed_error
[
0
]
=
'\0'
;
...
...
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