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
29941c07
Commit
29941c07
authored
Dec 01, 2005
by
SergeyV@selena
Browse files
Options
Browse Files
Download
Plain Diff
Merge selena.:H:/MYSQL/bkt/mysql-5.0
into selena.:H:/MYSQL/bkt/mysql-5.1
parents
27e96276
22b43351
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
84 additions
and
3 deletions
+84
-3
mysql-test/r/analyze.result
mysql-test/r/analyze.result
+9
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+24
-0
mysql-test/t/analyze.test
mysql-test/t/analyze.test
+14
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+31
-0
sql/sp_head.cc
sql/sp_head.cc
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+2
-0
sql/sql_class.h
sql/sql_class.h
+1
-1
storage/myisam/mi_check.c
storage/myisam/mi_check.c
+2
-1
No files found.
mysql-test/r/analyze.result
View file @
29941c07
...
@@ -30,6 +30,15 @@ check table t1;
...
@@ -30,6 +30,15 @@ check table t1;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
drop table t1;
drop table t1;
create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_general_ci engine myisam;
insert into t1 values ('hello');
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
drop table t1;
CREATE TABLE t1 (a int);
CREATE TABLE t1 (a int);
prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
execute stmt1;
execute stmt1;
...
...
mysql-test/r/sp.result
View file @
29941c07
...
@@ -4046,4 +4046,28 @@ boo
...
@@ -4046,4 +4046,28 @@ boo
2
2
drop procedure bug14643_1|
drop procedure bug14643_1|
drop procedure bug14643_2|
drop procedure bug14643_2|
drop procedure if exists bug14304|
drop table if exists t3, t4|
create table t3(a int primary key auto_increment)|
create table t4(a int primary key auto_increment)|
create procedure bug14304()
begin
insert into t3 set a=null;
insert into t4 set a=null;
insert into t4 set a=null;
insert into t4 set a=null;
insert into t4 set a=null;
insert into t4 set a=null;
insert into t4 select null as a;
insert into t3 set a=null;
insert into t3 set a=null;
select * from t3;
end|
call bug14304()|
a
1
2
3
drop procedure bug14304|
drop table t3, t4|
drop table t1,t2;
drop table t1,t2;
mysql-test/t/analyze.test
View file @
29941c07
...
@@ -39,6 +39,20 @@ check table t1;
...
@@ -39,6 +39,20 @@ check table t1;
drop
table
t1
;
drop
table
t1
;
# Bug #14902 ANALYZE TABLE fails to recognize up-to-date tables
# minimal test case to get an error.
# The problem is happening when analysing table with FT index that
# contains stopwords only. The first execution of analyze table should
# mark index statistics as up to date so that next execution of this
# statement will end up with Table is up to date status.
create
table
t1
(
a
mediumtext
,
fulltext
key
key1
(
a
))
charset
utf8
collate
utf8_general_ci
engine
myisam
;
insert
into
t1
values
(
'hello'
);
analyze
table
t1
;
analyze
table
t1
;
drop
table
t1
;
#
#
# procedure in PS BUG#13673
# procedure in PS BUG#13673
#
#
...
...
mysql-test/t/sp.test
View file @
29941c07
...
@@ -4823,6 +4823,37 @@ call bug14643_2()|
...
@@ -4823,6 +4823,37 @@ call bug14643_2()|
drop
procedure
bug14643_1
|
drop
procedure
bug14643_1
|
drop
procedure
bug14643_2
|
drop
procedure
bug14643_2
|
#
# BUG#14304: auto_increment field incorrect set in SP
#
--
disable_warnings
drop
procedure
if
exists
bug14304
|
drop
table
if
exists
t3
,
t4
|
--
enable_warnings
create
table
t3
(
a
int
primary
key
auto_increment
)
|
create
table
t4
(
a
int
primary
key
auto_increment
)
|
create
procedure
bug14304
()
begin
insert
into
t3
set
a
=
null
;
insert
into
t4
set
a
=
null
;
insert
into
t4
set
a
=
null
;
insert
into
t4
set
a
=
null
;
insert
into
t4
set
a
=
null
;
insert
into
t4
set
a
=
null
;
insert
into
t4
select
null
as
a
;
insert
into
t3
set
a
=
null
;
insert
into
t3
set
a
=
null
;
select
*
from
t3
;
end
|
call
bug14304
()
|
drop
procedure
bug14304
|
drop
table
t3
,
t4
|
#
#
# BUG#NNNN: New bug synopsis
# BUG#NNNN: New bug synopsis
...
...
sql/sp_head.cc
View file @
29941c07
...
@@ -1075,7 +1075,7 @@ int sp_head::execute(THD *thd)
...
@@ -1075,7 +1075,7 @@ int sp_head::execute(THD *thd)
}
}
/* we should cleanup free_list and memroot, used by instruction */
/* we should cleanup free_list and memroot, used by instruction */
thd
->
free_items
();
thd
->
cleanup_after_query
();
free_root
(
&
execute_mem_root
,
MYF
(
0
));
free_root
(
&
execute_mem_root
,
MYF
(
0
));
/*
/*
...
...
sql/sql_class.cc
View file @
29941c07
...
@@ -1951,6 +1951,7 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup,
...
@@ -1951,6 +1951,7 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup,
backup
->
last_insert_id
=
last_insert_id
;
backup
->
last_insert_id
=
last_insert_id
;
backup
->
next_insert_id
=
next_insert_id
;
backup
->
next_insert_id
=
next_insert_id
;
backup
->
insert_id_used
=
insert_id_used
;
backup
->
insert_id_used
=
insert_id_used
;
backup
->
clear_next_insert_id
=
clear_next_insert_id
;
backup
->
limit_found_rows
=
limit_found_rows
;
backup
->
limit_found_rows
=
limit_found_rows
;
backup
->
examined_row_count
=
examined_row_count
;
backup
->
examined_row_count
=
examined_row_count
;
backup
->
sent_row_count
=
sent_row_count
;
backup
->
sent_row_count
=
sent_row_count
;
...
@@ -2002,6 +2003,7 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
...
@@ -2002,6 +2003,7 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
last_insert_id
=
backup
->
last_insert_id
;
last_insert_id
=
backup
->
last_insert_id
;
next_insert_id
=
backup
->
next_insert_id
;
next_insert_id
=
backup
->
next_insert_id
;
insert_id_used
=
backup
->
insert_id_used
;
insert_id_used
=
backup
->
insert_id_used
;
clear_next_insert_id
=
backup
->
clear_next_insert_id
;
limit_found_rows
=
backup
->
limit_found_rows
;
limit_found_rows
=
backup
->
limit_found_rows
;
sent_row_count
=
backup
->
sent_row_count
;
sent_row_count
=
backup
->
sent_row_count
;
client_capabilities
=
backup
->
client_capabilities
;
client_capabilities
=
backup
->
client_capabilities
;
...
...
sql/sql_class.h
View file @
29941c07
...
@@ -1101,7 +1101,7 @@ class Sub_statement_state
...
@@ -1101,7 +1101,7 @@ class Sub_statement_state
ha_rows
cuted_fields
,
sent_row_count
,
examined_row_count
;
ha_rows
cuted_fields
,
sent_row_count
,
examined_row_count
;
ulong
client_capabilities
;
ulong
client_capabilities
;
uint
in_sub_stmt
;
uint
in_sub_stmt
;
bool
enable_slow_log
,
insert_id_used
;
bool
enable_slow_log
,
insert_id_used
,
clear_next_insert_id
;
my_bool
no_send_ok
;
my_bool
no_send_ok
;
SAVEPOINT
*
savepoints
;
SAVEPOINT
*
savepoints
;
};
};
...
...
storage/myisam/mi_check.c
View file @
29941c07
...
@@ -402,7 +402,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
...
@@ -402,7 +402,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
full_text_keys
++
;
full_text_keys
++
;
if
(
share
->
state
.
key_root
[
key
]
==
HA_OFFSET_ERROR
&&
if
(
share
->
state
.
key_root
[
key
]
==
HA_OFFSET_ERROR
&&
(
info
->
state
->
records
==
0
||
keyinfo
->
flag
&
HA_FULLTEXT
))
(
info
->
state
->
records
==
0
||
keyinfo
->
flag
&
HA_FULLTEXT
))
continue
;
goto
do_stat
;
if
(
!
_mi_fetch_keypage
(
info
,
keyinfo
,
share
->
state
.
key_root
[
key
],
if
(
!
_mi_fetch_keypage
(
info
,
keyinfo
,
share
->
state
.
key_root
[
key
],
DFLT_INIT_HITS
,
info
->
buff
,
0
))
DFLT_INIT_HITS
,
info
->
buff
,
0
))
{
{
...
@@ -498,6 +498,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
...
@@ -498,6 +498,7 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
param
->
max_level
);
param
->
max_level
);
all_keydata
+=
param
->
keydata
;
all_totaldata
+=
param
->
totaldata
;
key_totlength
+=
length
;
all_keydata
+=
param
->
keydata
;
all_totaldata
+=
param
->
totaldata
;
key_totlength
+=
length
;
do_stat:
if
(
param
->
testflag
&
T_STATISTICS
)
if
(
param
->
testflag
&
T_STATISTICS
)
update_key_parts
(
keyinfo
,
rec_per_key_part
,
param
->
unique_count
,
update_key_parts
(
keyinfo
,
rec_per_key_part
,
param
->
unique_count
,
param
->
stats_method
==
MI_STATS_METHOD_IGNORE_NULLS
?
param
->
stats_method
==
MI_STATS_METHOD_IGNORE_NULLS
?
...
...
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