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
751887b4
Commit
751887b4
authored
Jun 21, 2006
by
acurtis@xiphis.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge xiphis.org:/home/antony/work2/mysql-5.0-engines
into xiphis.org:/home/antony/work2/p4-bug12096.2
parents
23e612ae
097b3bbf
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
33 deletions
+51
-33
include/my_global.h
include/my_global.h
+3
-0
myisam/mi_check.c
myisam/mi_check.c
+16
-18
myisam/mi_key.c
myisam/mi_key.c
+6
-8
myisam/mi_update.c
myisam/mi_update.c
+2
-1
myisam/mi_write.c
myisam/mi_write.c
+2
-1
myisam/myisamdef.h
myisam/myisamdef.h
+1
-1
mysql-test/r/merge.result
mysql-test/r/merge.result
+6
-0
mysql-test/t/merge.test
mysql-test/t/merge.test
+9
-0
sql/ha_myisammrg.h
sql/ha_myisammrg.h
+2
-1
sql/mysqld.cc
sql/mysqld.cc
+4
-3
No files found.
include/my_global.h
View file @
751887b4
...
...
@@ -736,6 +736,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define DBL_MAX 1.79769313486231470e+308
#define FLT_MAX ((float)3.40282346638528860e+38)
#endif
#ifndef SSIZE_MAX
#define SSIZE_MAX ((~((size_t) 0)) / 2)
#endif
#if !defined(HAVE_ISINF) && !defined(isinf)
#define isinf(X) 0
...
...
myisam/mi_check.c
View file @
751887b4
...
...
@@ -453,25 +453,24 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
if
((
uint
)
share
->
base
.
auto_key
-
1
==
key
)
{
/* Check that auto_increment key is bigger than max key value */
ulonglong
save_auto_value
=
info
->
s
->
state
.
auto_increment
;
info
->
s
->
state
.
auto_increment
=
0
;
ulonglong
auto_increment
;
info
->
lastinx
=
key
;
_mi_read_key_record
(
info
,
0L
,
info
->
rec_buff
);
updat
e_auto_increment
(
info
,
info
->
rec_buff
);
if
(
info
->
s
->
state
.
auto_increment
>
save_auto_value
)
auto_increment
=
retriev
e_auto_increment
(
info
,
info
->
rec_buff
);
if
(
auto_increment
>
info
->
s
->
state
.
auto_increment
)
{
mi_check_print_warning
(
param
,
"Auto-increment value: %s is smaller
than max used value: %s"
,
llstr
(
save_auto_value
,
buff2
),
llstr
(
info
->
s
->
state
.
auto_increment
,
buff
));
mi_check_print_warning
(
param
,
"Auto-increment value: %s is smaller "
"
than max used value: %s"
,
llstr
(
info
->
s
->
state
.
auto_increment
,
buff2
),
llstr
(
auto_increment
,
buff
));
}
if
(
param
->
testflag
&
T_AUTO_INC
)
{
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
param
->
auto_increment_value
);
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
auto_increment
);
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
param
->
auto_increment_value
);
}
else
info
->
s
->
state
.
auto_increment
=
save_auto_value
;
/* Check that there isn't a row with auto_increment = 0 in the table */
mi_extra
(
info
,
HA_EXTRA_KEYREAD
,
0
);
...
...
@@ -481,8 +480,8 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
{
/* Don't count this as a real warning, as myisamchk can't correct it */
uint
save
=
param
->
warning_printed
;
mi_check_print_warning
(
param
,
"Found row where the auto_increment
column has the value 0"
);
mi_check_print_warning
(
param
,
"Found row where the auto_increment "
"
column has the value 0"
);
param
->
warning_printed
=
save
;
}
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
...
...
@@ -4099,11 +4098,10 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info,
}
else
{
ulonglong
auto_increment
=
(
repair_only
?
info
->
s
->
state
.
auto_increment
:
param
->
auto_increment_value
);
info
->
s
->
state
.
auto_increment
=
0
;
update_auto_increment
(
info
,
record
);
ulonglong
auto_increment
=
retrieve_auto_increment
(
info
,
record
);
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
auto_increment
);
if
(
!
repair_only
)
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
param
->
auto_increment_value
);
}
mi_extra
(
info
,
HA_EXTRA_NO_KEYREAD
,
0
);
my_free
((
char
*
)
record
,
MYF
(
0
));
...
...
myisam/mi_key.c
View file @
751887b4
...
...
@@ -507,22 +507,21 @@ int _mi_read_key_record(MI_INFO *info, my_off_t filepos, byte *buf)
return
(
-
1
);
/* Wrong data to read */
}
/*
Updat
e auto_increment info
Retriev
e auto_increment info
SYNOPSIS
updat
e_auto_increment()
retriev
e_auto_increment()
info MyISAM handler
record Row to update
IMPLEMENTATION
Only replace the auto_increment value if it is higher than the previous
one. For signed columns we don't update the auto increment value if it's
For signed columns we don't retrieve the auto increment value if it's
less than zero.
*/
void
updat
e_auto_increment
(
MI_INFO
*
info
,
const
byte
*
record
)
ulonglong
retriev
e_auto_increment
(
MI_INFO
*
info
,
const
byte
*
record
)
{
ulonglong
value
=
0
;
/* Store unsigned values here */
longlong
s_value
=
0
;
/* Store signed values here */
...
...
@@ -587,6 +586,5 @@ void update_auto_increment(MI_INFO *info,const byte *record)
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
(
s_value
>
0
)
?
(
ulonglong
)
s_value
:
value
);
return
(
s_value
>
0
)
?
(
ulonglong
)
s_value
:
value
;
}
myisam/mi_update.c
View file @
751887b4
...
...
@@ -164,7 +164,8 @@ int mi_update(register MI_INFO *info, const byte *oldrec, byte *newrec)
key_changed
|=
HA_STATE_CHANGED
;
/* Must update index file */
}
if
(
auto_key_changed
)
update_auto_increment
(
info
,
newrec
);
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
retrieve_auto_increment
(
info
,
newrec
));
if
(
share
->
calc_checksum
)
info
->
state
->
checksum
+=
(
info
->
checksum
-
old_checksum
);
...
...
myisam/mi_write.c
View file @
751887b4
...
...
@@ -149,7 +149,8 @@ int mi_write(MI_INFO *info, byte *record)
info
->
state
->
checksum
+=
info
->
checksum
;
}
if
(
share
->
base
.
auto_key
)
update_auto_increment
(
info
,
record
);
set_if_bigger
(
info
->
s
->
state
.
auto_increment
,
retrieve_auto_increment
(
info
,
record
));
info
->
update
=
(
HA_STATE_CHANGED
|
HA_STATE_AKTIV
|
HA_STATE_WRITTEN
|
HA_STATE_ROW_CHANGED
);
info
->
state
->
records
++
;
...
...
myisam/myisamdef.h
View file @
751887b4
...
...
@@ -582,7 +582,7 @@ extern uint _mi_pack_key(MI_INFO *info,uint keynr,uchar *key,uchar *old,
extern
int
_mi_read_key_record
(
MI_INFO
*
info
,
my_off_t
filepos
,
byte
*
buf
);
extern
int
_mi_read_cache
(
IO_CACHE
*
info
,
byte
*
buff
,
my_off_t
pos
,
uint
length
,
int
re_read_if_possibly
);
extern
void
updat
e_auto_increment
(
MI_INFO
*
info
,
const
byte
*
record
);
extern
ulonglong
retriev
e_auto_increment
(
MI_INFO
*
info
,
const
byte
*
record
);
extern
byte
*
mi_alloc_rec_buff
(
MI_INFO
*
,
ulong
,
byte
**
);
#define mi_get_rec_buff_ptr(info,buf) \
...
...
mysql-test/r/merge.result
View file @
751887b4
...
...
@@ -776,3 +776,9 @@ insert into t1 values ("Monty"),("WAX"),("Walrus");
alter table t1 engine=MERGE;
ERROR HY000: Table storage engine for 't1' doesn't have this option
drop table t1;
create table t1 (b bit(1));
create table t2 (b bit(1));
create table tm (b bit(1)) engine = merge union = (t1,t2);
select * from tm;
b
drop table tm, t1, t2;
mysql-test/t/merge.test
View file @
751887b4
...
...
@@ -390,4 +390,13 @@ insert into t1 values ("Monty"),("WAX"),("Walrus");
alter
table
t1
engine
=
MERGE
;
drop
table
t1
;
#
# BUG#19648 - Merge table does not work with bit types
#
create
table
t1
(
b
bit
(
1
));
create
table
t2
(
b
bit
(
1
));
create
table
tm
(
b
bit
(
1
))
engine
=
merge
union
=
(
t1
,
t2
);
select
*
from
tm
;
drop
table
tm
,
t1
,
t2
;
# End of 5.0 tests
sql/ha_myisammrg.h
View file @
751887b4
...
...
@@ -37,7 +37,8 @@ class ha_myisammrg: public handler
{
return
(
HA_REC_NOT_IN_SEQ
|
HA_AUTO_PART_KEY
|
HA_READ_RND_SAME
|
HA_NULL_IN_KEY
|
HA_CAN_INDEX_BLOBS
|
HA_FILE_BASED
|
HA_CAN_INSERT_DELAYED
|
HA_ANY_INDEX_MAY_BE_UNIQUE
);
HA_CAN_INSERT_DELAYED
|
HA_ANY_INDEX_MAY_BE_UNIQUE
|
HA_CAN_BIT_FIELD
);
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
{
...
...
sql/mysqld.cc
View file @
751887b4
...
...
@@ -5851,7 +5851,8 @@ The minimum value for this variable is 4096.",
"Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value."
,
(
gptr
*
)
&
global_system_variables
.
read_buff_size
,
(
gptr
*
)
&
max_system_variables
.
read_buff_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
128
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
~
0L
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
128
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
SSIZE_MAX
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
{
"read_only"
,
OPT_READONLY
,
"Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege"
,
(
gptr
*
)
&
opt_readonly
,
...
...
@@ -5862,12 +5863,12 @@ The minimum value for this variable is 4096.",
(
gptr
*
)
&
global_system_variables
.
read_rnd_buff_size
,
(
gptr
*
)
&
max_system_variables
.
read_rnd_buff_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
256
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
~
0L
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
SSIZE_MAX
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
{
"record_buffer"
,
OPT_RECORD_BUFFER
,
"Alias for read_buffer_size"
,
(
gptr
*
)
&
global_system_variables
.
read_buff_size
,
(
gptr
*
)
&
max_system_variables
.
read_buff_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
128
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
~
0L
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
128
*
1024L
,
IO_SIZE
*
2
+
MALLOC_OVERHEAD
,
SSIZE_MAX
,
MALLOC_OVERHEAD
,
IO_SIZE
,
0
},
#ifdef HAVE_REPLICATION
{
"relay_log_purge"
,
OPT_RELAY_LOG_PURGE
,
"0 = do not purge relay logs. 1 = purge them as soon as they are no more needed."
,
...
...
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