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
2fc2d558
Commit
2fc2d558
authored
Feb 24, 2004
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
parents
1ae05760
4f3062d9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
145 additions
and
5 deletions
+145
-5
client/mysqldump.c
client/mysqldump.c
+1
-1
heap/hp_delete.c
heap/hp_delete.c
+6
-1
heap/hp_write.c
heap/hp_write.c
+3
-0
mysql-test/r/bigint.result
mysql-test/r/bigint.result
+3
-0
mysql-test/r/func_misc.result
mysql-test/r/func_misc.result
+1
-1
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+74
-0
mysql-test/t/bigint.test
mysql-test/t/bigint.test
+1
-1
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+54
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-0
strings/strtod.c
strings/strtod.c
+1
-1
No files found.
client/mysqldump.c
View file @
2fc2d558
...
@@ -181,7 +181,7 @@ static struct my_option my_long_options[] =
...
@@ -181,7 +181,7 @@ static struct my_option my_long_options[] =
"Fields in the i.file are opt. enclosed by ..."
,
(
gptr
*
)
&
opt_enclosed
,
"Fields in the i.file are opt. enclosed by ..."
,
(
gptr
*
)
&
opt_enclosed
,
(
gptr
*
)
&
opt_enclosed
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
opt_enclosed
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"fields-escaped-by"
,
OPT_ESC
,
"Fields in the i.file are escaped by ..."
,
{
"fields-escaped-by"
,
OPT_ESC
,
"Fields in the i.file are escaped by ..."
,
(
gptr
*
)
&
escaped
,
(
gptr
*
)
&
escaped
,
0
,
GET_STR
,
NO
_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
(
gptr
*
)
&
escaped
,
(
gptr
*
)
&
escaped
,
0
,
GET_STR
,
REQUIRED
_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"first-slave"
,
'x'
,
"Locks all tables across all databases."
,
{
"first-slave"
,
'x'
,
"Locks all tables across all databases."
,
(
gptr
*
)
&
opt_first_slave
,
(
gptr
*
)
&
opt_first_slave
,
0
,
GET_BOOL
,
NO_ARG
,
(
gptr
*
)
&
opt_first_slave
,
(
gptr
*
)
&
opt_first_slave
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
,
0
},
...
...
heap/hp_delete.c
View file @
2fc2d558
...
@@ -67,6 +67,8 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
...
@@ -67,6 +67,8 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
const
byte
*
record
,
byte
*
recpos
,
int
flag
)
const
byte
*
record
,
byte
*
recpos
,
int
flag
)
{
{
heap_rb_param
custom_arg
;
heap_rb_param
custom_arg
;
uint
old_allocated
;
int
res
;
if
(
flag
)
if
(
flag
)
info
->
last_pos
=
NULL
;
/* For heap_rnext/heap_rprev */
info
->
last_pos
=
NULL
;
/* For heap_rnext/heap_rprev */
...
@@ -74,7 +76,10 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
...
@@ -74,7 +76,10 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
custom_arg
.
keyseg
=
keyinfo
->
seg
;
custom_arg
.
keyseg
=
keyinfo
->
seg
;
custom_arg
.
key_length
=
hp_rb_make_key
(
keyinfo
,
info
->
recbuf
,
record
,
recpos
);
custom_arg
.
key_length
=
hp_rb_make_key
(
keyinfo
,
info
->
recbuf
,
record
,
recpos
);
custom_arg
.
search_flag
=
SEARCH_SAME
;
custom_arg
.
search_flag
=
SEARCH_SAME
;
return
tree_delete
(
&
keyinfo
->
rb_tree
,
info
->
recbuf
,
&
custom_arg
);
old_allocated
=
keyinfo
->
rb_tree
.
allocated
;
res
=
tree_delete
(
&
keyinfo
->
rb_tree
,
info
->
recbuf
,
&
custom_arg
);
info
->
s
->
index_length
+=
(
keyinfo
->
rb_tree
.
allocated
-
old_allocated
);
return
res
;
}
}
/* Remove one key from hash-table */
/* Remove one key from hash-table */
...
...
heap/hp_write.c
View file @
2fc2d558
...
@@ -99,6 +99,7 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
...
@@ -99,6 +99,7 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
byte
*
recpos
)
byte
*
recpos
)
{
{
heap_rb_param
custom_arg
;
heap_rb_param
custom_arg
;
uint
old_allocated
;
info
->
last_pos
=
NULL
;
/* For heap_rnext/heap_rprev */
info
->
last_pos
=
NULL
;
/* For heap_rnext/heap_rprev */
custom_arg
.
keyseg
=
keyinfo
->
seg
;
custom_arg
.
keyseg
=
keyinfo
->
seg
;
...
@@ -113,12 +114,14 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
...
@@ -113,12 +114,14 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
custom_arg
.
search_flag
=
SEARCH_SAME
;
custom_arg
.
search_flag
=
SEARCH_SAME
;
keyinfo
->
rb_tree
.
flag
=
0
;
keyinfo
->
rb_tree
.
flag
=
0
;
}
}
old_allocated
=
keyinfo
->
rb_tree
.
allocated
;
if
(
!
tree_insert
(
&
keyinfo
->
rb_tree
,
(
void
*
)
info
->
recbuf
,
if
(
!
tree_insert
(
&
keyinfo
->
rb_tree
,
(
void
*
)
info
->
recbuf
,
custom_arg
.
key_length
,
&
custom_arg
))
custom_arg
.
key_length
,
&
custom_arg
))
{
{
my_errno
=
HA_ERR_FOUND_DUPP_KEY
;
my_errno
=
HA_ERR_FOUND_DUPP_KEY
;
return
1
;
return
1
;
}
}
info
->
s
->
index_length
+=
(
keyinfo
->
rb_tree
.
allocated
-
old_allocated
);
return
0
;
return
0
;
}
}
...
...
mysql-test/r/bigint.result
View file @
2fc2d558
...
@@ -84,3 +84,6 @@ quantity
...
@@ -84,3 +84,6 @@ quantity
10000000000000000000
10000000000000000000
10000000000000000000
10000000000000000000
drop table t1;
drop table t1;
SELECT '0x8000000000000001'+0;
'0x8000000000000001'+0
0
mysql-test/r/func_misc.result
View file @
2fc2d558
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.5555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.5555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.5555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.5555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
2 123.6 1,234.56 12,345.55
6
123,456.5555 1,234,567.55550 12,345.24
2 123.6 1,234.56 12,345.55
5
123,456.5555 1,234,567.55550 12,345.24
select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"));
select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"));
inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"))
inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"))
NULL
NULL
...
...
mysql-test/r/show_check.result
View file @
2fc2d558
...
@@ -313,3 +313,77 @@ table CREATE TABLE `table` (
...
@@ -313,3 +313,77 @@ table CREATE TABLE `table` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE `table`;
DROP TABLE `table`;
SET sql_quote_show_create=ON;
SET sql_quote_show_create=ON;
select @@max_heap_table_size;
@@max_heap_table_size
1047552
CREATE TABLE t1 (
a int(11) default NULL,
KEY a TYPE BTREE (a)
) ENGINE=HEAP;
CREATE TABLE t2 (
b int(11) default NULL,
index(b)
) ENGINE=HEAP;
CREATE TABLE t3 (
a int(11) default NULL,
b int(11) default NULL,
KEY a TYPE BTREE (a),
index(b)
) ENGINE=HEAP;
insert into t1 values (1),(2);
insert into t2 values (1),(2);
insert into t3 values (1,1),(2,2);
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 2 5 39904 249415 42 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 2 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 2 9 33072 248103 22090 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (3),(4);
insert into t2 values (3),(4);
insert into t3 values (3,3),(4,4);
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 4 5 39904 249415 84 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 4 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 4 9 33072 248103 22132 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (5);
insert into t2 values (5);
insert into t3 values (5,5);
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 5 5 39904 249415 105 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 5 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 5 9 33072 248103 22153 0 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1 where a=3;
delete from t2 where b=3;
delete from t3 where a=3;
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 4 5 39904 249415 105 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 4 5 39904 249415 39904 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 4 9 33072 248103 22153 9 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1;
delete from t2;
delete from t3;
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 0 5 0 249415 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 0 5 0 249415 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 0 9 0 248103 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values (5);
insert into t2 values (5);
insert into t3 values (5,5);
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 1 5 39904 249415 21 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 1 5 39904 249415 39904 0 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 1 9 33072 248103 22069 0 NULL NULL NULL NULL latin1_swedish_ci NULL
delete from t1 where a=5;
delete from t2 where b=5;
delete from t3 where a=5;
show table status;
Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 HEAP Fixed 0 5 39904 249415 21 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t2 HEAP Fixed 0 5 39904 249415 39904 5 NULL NULL NULL NULL latin1_swedish_ci NULL
t3 HEAP Fixed 0 9 33072 248103 22069 9 NULL NULL NULL NULL latin1_swedish_ci NULL
drop table t1, t2, t3;
mysql-test/t/bigint.test
View file @
2fc2d558
...
@@ -69,5 +69,5 @@ select * from t1;
...
@@ -69,5 +69,5 @@ select * from t1;
drop
table
t1
;
drop
table
t1
;
# atof() behaviour is different of different systems. to be fixed in 4.1
# atof() behaviour is different of different systems. to be fixed in 4.1
#
SELECT '0x8000000000000001'+0;
SELECT
'0x8000000000000001'
+
0
;
mysql-test/t/show_check.test
View file @
2fc2d558
...
@@ -182,3 +182,57 @@ SHOW CREATE TABLE `table`;
...
@@ -182,3 +182,57 @@ SHOW CREATE TABLE `table`;
DROP
TABLE
`table`
;
DROP
TABLE
`table`
;
SET
sql_quote_show_create
=
ON
;
SET
sql_quote_show_create
=
ON
;
#
# Test for bug #2719 "Heap tables status shows wrong or missing data."
#
select
@@
max_heap_table_size
;
CREATE
TABLE
t1
(
a
int
(
11
)
default
NULL
,
KEY
a
TYPE
BTREE
(
a
)
)
ENGINE
=
HEAP
;
CREATE
TABLE
t2
(
b
int
(
11
)
default
NULL
,
index
(
b
)
)
ENGINE
=
HEAP
;
CREATE
TABLE
t3
(
a
int
(
11
)
default
NULL
,
b
int
(
11
)
default
NULL
,
KEY
a
TYPE
BTREE
(
a
),
index
(
b
)
)
ENGINE
=
HEAP
;
insert
into
t1
values
(
1
),(
2
);
insert
into
t2
values
(
1
),(
2
);
insert
into
t3
values
(
1
,
1
),(
2
,
2
);
show
table
status
;
insert
into
t1
values
(
3
),(
4
);
insert
into
t2
values
(
3
),(
4
);
insert
into
t3
values
(
3
,
3
),(
4
,
4
);
show
table
status
;
insert
into
t1
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t3
values
(
5
,
5
);
show
table
status
;
delete
from
t1
where
a
=
3
;
delete
from
t2
where
b
=
3
;
delete
from
t3
where
a
=
3
;
show
table
status
;
delete
from
t1
;
delete
from
t2
;
delete
from
t3
;
show
table
status
;
insert
into
t1
values
(
5
);
insert
into
t2
values
(
5
);
insert
into
t3
values
(
5
,
5
);
show
table
status
;
delete
from
t1
where
a
=
5
;
delete
from
t2
where
b
=
5
;
delete
from
t3
where
a
=
5
;
show
table
status
;
drop
table
t1
,
t2
,
t3
;
sql/mysqld.cc
View file @
2fc2d558
...
@@ -5614,6 +5614,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -5614,6 +5614,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
}
}
global_system_variables
.
sql_mode
=
fix_sql_mode
(
global_system_variables
.
global_system_variables
.
sql_mode
=
fix_sql_mode
(
global_system_variables
.
sql_mode
);
sql_mode
);
break
;
}
}
case
OPT_FT_BOOLEAN_SYNTAX
:
case
OPT_FT_BOOLEAN_SYNTAX
:
if
(
ft_boolean_check_syntax_string
(
argument
))
if
(
ft_boolean_check_syntax_string
(
argument
))
...
...
strings/strtod.c
View file @
2fc2d558
...
@@ -135,6 +135,6 @@ done:
...
@@ -135,6 +135,6 @@ done:
double
my_atof
(
const
char
*
nptr
)
double
my_atof
(
const
char
*
nptr
)
{
{
return
(
strtod
(
nptr
,
0
));
return
(
my_
strtod
(
nptr
,
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