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
3ddc1f99
Commit
3ddc1f99
authored
May 04, 2006
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1
parents
86b2be8d
1809adee
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
251 additions
and
120 deletions
+251
-120
VC++Files/libmysqld/libmysqld.dsp
VC++Files/libmysqld/libmysqld.dsp
+4
-0
VC++Files/libmysqld/libmysqld_ia64.dsp
VC++Files/libmysqld/libmysqld_ia64.dsp
+4
-0
include/my_tree.h
include/my_tree.h
+1
-1
mysql-test/r/analyze.result
mysql-test/r/analyze.result
+8
-0
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+10
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+2
-0
mysql-test/r/ndb_blob.result
mysql-test/r/ndb_blob.result
+13
-5
mysql-test/r/sp_notembedded.result
mysql-test/r/sp_notembedded.result
+1
-0
mysql-test/t/analyze.test
mysql-test/t/analyze.test
+8
-0
mysql-test/t/heap_btree.test
mysql-test/t/heap_btree.test
+12
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+6
-0
mysql-test/t/ndb_blob.test
mysql-test/t/ndb_blob.test
+22
-3
mysql-test/t/sp_notembedded.test
mysql-test/t/sp_notembedded.test
+4
-0
mysys/tree.c
mysys/tree.c
+2
-3
sql/ha_myisam.cc
sql/ha_myisam.cc
+1
-1
sql/handler.h
sql/handler.h
+1
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+73
-65
sql/sp.cc
sql/sp.cc
+1
-1
sql/sp_head.cc
sql/sp_head.cc
+4
-0
sql/sp_head.h
sql/sp_head.h
+3
-0
sql/sql_table.cc
sql/sql_table.cc
+19
-6
storage/heap/hp_delete.c
storage/heap/hp_delete.c
+2
-1
storage/myisam/mi_key.c
storage/myisam/mi_key.c
+1
-1
storage/myisam/myisamlog.c
storage/myisam/myisamlog.c
+1
-1
storage/ndb/include/kernel/signaldata/TcKeyReq.hpp
storage/ndb/include/kernel/signaldata/TcKeyReq.hpp
+1
-0
storage/ndb/include/ndbapi/NdbBlob.hpp
storage/ndb/include/ndbapi/NdbBlob.hpp
+1
-0
storage/ndb/src/ndbapi/NdbBlob.cpp
storage/ndb/src/ndbapi/NdbBlob.cpp
+23
-1
storage/ndb/test/ndbapi/testBlobs.cpp
storage/ndb/test/ndbapi/testBlobs.cpp
+9
-14
storage/ndb/tools/delete_all.cpp
storage/ndb/tools/delete_all.cpp
+14
-17
No files found.
VC++Files/libmysqld/libmysqld.dsp
View file @
3ddc1f99
...
...
@@ -363,6 +363,10 @@ SOURCE=..\mysys\my_getopt.c
SOURCE=..\sql-common\my_time.c
# End Source File
# Begin Source File
SOURCE=..\sql-common\my_user.c
# End Source File
# Begin Source File
SOURCE=..\sql\net_serv.cpp
# End Source File
...
...
VC++Files/libmysqld/libmysqld_ia64.dsp
View file @
3ddc1f99
...
...
@@ -338,6 +338,10 @@ SOURCE="..\sql-common\my_time.c"
# End Source File
# Begin Source File
SOURCE="..\sql-common\my_user.c"
# End Source File
# Begin Source File
SOURCE=..\sql\net_serv.cpp
# End Source File
# Begin Source File
...
...
include/my_tree.h
View file @
3ddc1f99
...
...
@@ -84,7 +84,7 @@ TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint key_size,
void
*
tree_search
(
TREE
*
tree
,
void
*
key
,
void
*
custom_arg
);
int
tree_walk
(
TREE
*
tree
,
tree_walk_action
action
,
void
*
argument
,
TREE_WALK
visit
);
int
tree_delete
(
TREE
*
tree
,
void
*
key
,
void
*
custom_arg
);
int
tree_delete
(
TREE
*
tree
,
void
*
key
,
uint
key_size
,
void
*
custom_arg
);
void
*
tree_search_key
(
TREE
*
tree
,
const
void
*
key
,
TREE_ELEMENT
**
parents
,
TREE_ELEMENT
***
last_pos
,
enum
ha_rkey_function
flag
,
void
*
custom_arg
);
...
...
mysql-test/r/analyze.result
View file @
3ddc1f99
...
...
@@ -46,4 +46,12 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_
execute stmt1;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
deallocate prepare stmt1;
create temporary table t1(a int, index(a));
insert into t1 values('1'),('2'),('3'),('4'),('5');
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 5 NULL NULL YES BTREE
drop table t1;
mysql-test/r/heap_btree.result
View file @
3ddc1f99
...
...
@@ -246,3 +246,13 @@ DELETE from t1 where a < 100;
SELECT * from t1;
a
DROP TABLE t1;
CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory;
INSERT INTO t1 VALUES(0);
SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
INDEX_LENGTH
21
UPDATE t1 SET val=1;
SELECT INDEX_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='t1';
INDEX_LENGTH
21
DROP TABLE t1;
mysql-test/r/innodb.result
View file @
3ddc1f99
...
...
@@ -3455,3 +3455,5 @@ SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
a
1
drop table t2, t1;
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
ERROR HY000: The used table type doesn't support SPATIAL indexes
mysql-test/r/ndb_blob.result
View file @
3ddc1f99
...
...
@@ -481,14 +481,22 @@ msg text NOT NULL
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).');
so bad data will not crash kernel.');
select * from t1;
id msg
1 Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).
drop table t1;
create table t1 (
a int primary key not null auto_increment,
b text
) engine=ndbcluster;
select count(*) from t1;
count(*)
500
truncate t1;
select count(*) from t1;
count(*)
0
drop table t1;
mysql-test/r/sp_notembedded.result
View file @
3ddc1f99
drop table if exists t1,t3;
drop procedure if exists bug4902|
create procedure bug4902()
begin
...
...
mysql-test/t/analyze.test
View file @
3ddc1f99
...
...
@@ -61,6 +61,14 @@ prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
execute
stmt1
;
execute
stmt1
;
deallocate
prepare
stmt1
;
#
# bug#15225 (ANALYZE temporary has no effect)
#
create
temporary
table
t1
(
a
int
,
index
(
a
));
insert
into
t1
values
(
'1'
),(
'2'
),(
'3'
),(
'4'
),(
'5'
);
analyze
table
t1
;
show
index
from
t1
;
drop
table
t1
;
# End of 4.1 tests
mysql-test/t/heap_btree.test
View file @
3ddc1f99
...
...
@@ -164,4 +164,16 @@ DELETE from t1 where a < 100;
SELECT
*
from
t1
;
DROP
TABLE
t1
;
#
# BUG#18160 - Memory-/HEAP Table endless growing indexes
#
CREATE
TABLE
t1
(
val
INT
,
KEY
USING
BTREE
(
val
))
ENGINE
=
memory
;
INSERT
INTO
t1
VALUES
(
0
);
--
replace_result
37
21
SELECT
INDEX_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
DATABASE
()
AND
TABLE_NAME
=
't1'
;
UPDATE
t1
SET
val
=
1
;
--
replace_result
37
21
SELECT
INDEX_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
DATABASE
()
AND
TABLE_NAME
=
't1'
;
DROP
TABLE
t1
;
# End of 4.1 tests
mysql-test/t/innodb.test
View file @
3ddc1f99
...
...
@@ -2494,3 +2494,9 @@ SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
SELECT
p0
.
a
FROM
t2
p0
WHERE
BINARY
p0
.
b
=
'customer_over'
;
drop
table
t2
,
t1
;
#
# Bug #15680 (SPATIAL key in innodb)
#
--
error
ER_TABLE_CANT_HANDLE_SPKEYS
create
table
t1
(
g
geometry
not
null
,
spatial
gk
(
g
))
engine
=
innodb
;
mysql-test/t/ndb_blob.test
View file @
3ddc1f99
...
...
@@ -403,10 +403,29 @@ create table t1 (
insert
into
t1
(
msg
)
values
(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
Proper fix: Set inline bytes to multiple of mbmaxlen and
validate it (after the 8 byte length).'
);
so bad data will not crash kernel.'
);
select
*
from
t1
;
drop
table
t1
;
# -- bug #19201
create
table
t1
(
a
int
primary
key
not
null
auto_increment
,
b
text
)
engine
=
ndbcluster
;
--
disable_query_log
set
autocommit
=
1
;
# more rows than batch size (64)
# for this bug no blob parts would be necessary
let
$
1
=
500
;
while
(
$
1
)
{
insert
into
t1
(
b
)
values
(
repeat
(
'x'
,
4000
));
dec
$
1
;
}
--
enable_query_log
select
count
(
*
)
from
t1
;
truncate
t1
;
select
count
(
*
)
from
t1
;
drop
table
t1
;
# End of 4.1 tests
mysql-test/t/sp_notembedded.test
View file @
3ddc1f99
# Can't test with embedded server
--
source
include
/
not_embedded
.
inc
--
sleep
2
--
disable_warnings
drop
table
if
exists
t1
,
t3
;
--
enable_warnings
delimiter
|
;
#
...
...
mysys/tree.c
View file @
3ddc1f99
...
...
@@ -271,7 +271,7 @@ TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size,
return
element
;
}
int
tree_delete
(
TREE
*
tree
,
void
*
key
,
void
*
custom_arg
)
int
tree_delete
(
TREE
*
tree
,
void
*
key
,
uint
key_size
,
void
*
custom_arg
)
{
int
cmp
,
remove_colour
;
TREE_ELEMENT
*
element
,
***
parent
,
***
org_parent
,
*
nod
;
...
...
@@ -326,8 +326,7 @@ int tree_delete(TREE *tree, void *key, void *custom_arg)
rb_delete_fixup
(
tree
,
parent
);
if
(
tree
->
free
)
(
*
tree
->
free
)(
ELEMENT_KEY
(
tree
,
element
),
free_free
,
tree
->
custom_arg
);
/* This doesn't include key_size, but better than nothing */
tree
->
allocated
-=
sizeof
(
TREE_ELEMENT
)
+
tree
->
size_of_element
;
tree
->
allocated
-=
sizeof
(
TREE_ELEMENT
)
+
tree
->
size_of_element
+
key_size
;
my_free
((
gptr
)
element
,
MYF
(
0
));
tree
->
elements_in_tree
--
;
return
0
;
...
...
sql/ha_myisam.cc
View file @
3ddc1f99
...
...
@@ -194,7 +194,7 @@ ha_myisam::ha_myisam(TABLE_SHARE *table_arg)
int_table_flags
(
HA_NULL_IN_KEY
|
HA_CAN_FULLTEXT
|
HA_CAN_SQL_HANDLER
|
HA_DUPP_POS
|
HA_CAN_INDEX_BLOBS
|
HA_AUTO_PART_KEY
|
HA_FILE_BASED
|
HA_CAN_GEOMETRY
|
HA_READ_RND_SAME
|
HA_CAN_INSERT_DELAYED
|
HA_CAN_BIT_FIELD
),
HA_CAN_INSERT_DELAYED
|
HA_CAN_BIT_FIELD
|
HA_CAN_RTREEKEYS
),
can_enable_indexes
(
1
)
{}
...
...
sql/handler.h
View file @
3ddc1f99
...
...
@@ -84,6 +84,7 @@
access on the table based on a given record.
*/
#define HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS (1 << 16)
#define HA_CAN_RTREEKEYS (1 << 17)
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
#define HA_CAN_FULLTEXT (1 << 21)
...
...
sql/share/errmsg.txt
View file @
3ddc1f99
...
...
@@ -2978,52 +2978,52 @@ ER_UDF_EXISTS
swe "Funktionen '%-.64s' finns redan"
ukr "æ '%-.64s' դ"
ER_CANT_OPEN_LIBRARY
cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %s)"
dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %s)"
nla "Kan shared library '%-.64s' niet openen (Errcode: %d %s)"
eng "Can't open shared library '%-.64s' (errno: %d %s)"
jps "shared library '%-.64s' Jł܂ (errno: %d %s)",
est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %s)"
fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %s)"
ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %s)"
greek " shared library '%-.64s' ( : %d %s)"
hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %s)"
ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %s)"
jpn "shared library '%-.64s' Ǥޤ (errno: %d %s)"
kor "'%-.64s' ̹ ϴ.(ȣ: %d %s)"
nor "Can't open shared library '%-.64s' (errno: %d %s)"
norwegian-ny "Can't open shared library '%-.64s' (errno: %d %s)"
pol "Can't open shared library '%-.64s' (errno: %d %s)"
por "No pode abrir biblioteca compartilhada '%-.64s' (erro no.
'%d' - '%-.64
s')"
rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %s)"
rus " '%-.64s' (: %d %s)"
serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %s)"
slo "Nemem otvori zdiean kninicu '%-.64s' (chybov kd: %d %s)"
spa "No puedo abrir libraria conjugada '%-.64s' (errno: %d %s)"
swe "Kan inte ppna det dynamiska biblioteket '%-.64s' (Felkod: %d %s)"
ukr " צ Ħ ¦̦ '%-.64s' (: %d %s)"
ER_CANT_FIND_DL_ENTRY
cze "Nemohu naj-Bt funkci '%-.
64
s' v knihovn"
dan "Kan ikke finde funktionen '%-.
64
s' i bibliotek"
nla "Kan functie '%-.
64
s' niet in library vinden"
eng "Can't find symbol '%-.
64
s' in library"
jps "function '%-.
64
s' Cu[Ɍt鎖ł܂",
est "Ei leia funktsiooni '%-.
64
s' antud teegis"
fre "Impossible de trouver la fonction '%-.
64
s' dans la bibliothque"
ger "Kann Funktion '%-.
64
s' in der Library nicht finden"
greek " '%-.
64
s' "
hun "A(z) '%-.
64
s' fuggveny nem talalhato a konyvtarban"
ita "Impossibile trovare la funzione '%-.
64
s' nella libreria"
jpn "function '%-.
64
s' 饤֥˸դǤޤ"
kor "̹ '%-.
64
s' Լ ã ϴ."
por "No pode encontrar a funo '%-.
64
s' na biblioteca"
rum "Nu pot gasi functia '%-.
64
s' in libraria"
rus " '%-.
64
s' "
serbian "Ne mogu da pronadjem funkciju '%-.
64
s' u biblioteci"
slo "Nemem njs funkciu '%-.
64
s' v kninici"
spa "No puedo encontrar funcin '%-.
64
s' en libraria"
swe "Hittar inte funktionen '%-.
64
s' in det dynamiska biblioteket"
ukr " æ '%-.
64
s' ¦̦æ"
cze "Nemohu otev-Bt sdlenou knihovnu '%-.64s' (errno: %d %
-.128
s)"
dan "Kan ikke bne delt bibliotek '%-.64s' (errno: %d %
-.128
s)"
nla "Kan shared library '%-.64s' niet openen (Errcode: %d %
-.128
s)"
eng "Can't open shared library '%-.64s' (errno: %d %
-.128
s)"
jps "shared library '%-.64s' Jł܂ (errno: %d %
-.128
s)",
est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %
-.128
s)"
fre "Impossible d'ouvrir la bibliothque partage '%-.64s' (errno: %d %
-.128
s)"
ger "Kann Shared Library '%-.64s' nicht ffnen (Fehler: %d %
-.128
s)"
greek " shared library '%-.64s' ( : %d %
-.128
s)"
hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %
-.128
s)"
ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %
-.128
s)"
jpn "shared library '%-.64s' Ǥޤ (errno: %d %
-.128
s)"
kor "'%-.64s' ̹ ϴ.(ȣ: %d %
-.128
s)"
nor "Can't open shared library '%-.64s' (errno: %d %
-.128
s)"
norwegian-ny "Can't open shared library '%-.64s' (errno: %d %
-.128
s)"
pol "Can't open shared library '%-.64s' (errno: %d %
-.128
s)"
por "No pode abrir biblioteca compartilhada '%-.64s' (erro no.
%d '%-.128
s')"
rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %
-.128
s)"
rus " '%-.64s' (: %d %
-.128
s)"
serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %
-.128
s)"
slo "Nemem otvori zdiean kninicu '%-.64s' (chybov kd: %d %
-.128
s)"
spa "No puedo abrir libraria conjugada '%-.64s' (errno: %d %
-.128
s)"
swe "Kan inte ppna det dynamiska biblioteket '%-.64s' (Felkod: %d %
-.128
s)"
ukr " צ Ħ ¦̦ '%-.64s' (: %d %
-.128
s)"
ER_CANT_FIND_DL_ENTRY
cze "Nemohu naj-Bt funkci '%-.
128
s' v knihovn"
dan "Kan ikke finde funktionen '%-.
128
s' i bibliotek"
nla "Kan functie '%-.
128
s' niet in library vinden"
eng "Can't find symbol '%-.
128
s' in library"
jps "function '%-.
128
s' Cu[Ɍt鎖ł܂",
est "Ei leia funktsiooni '%-.
128
s' antud teegis"
fre "Impossible de trouver la fonction '%-.
128
s' dans la bibliothque"
ger "Kann Funktion '%-.
128
s' in der Library nicht finden"
greek " '%-.
128
s' "
hun "A(z) '%-.
128
s' fuggveny nem talalhato a konyvtarban"
ita "Impossibile trovare la funzione '%-.
128
s' nella libreria"
jpn "function '%-.
128
s' 饤֥˸դǤޤ"
kor "̹ '%-.
128
s' Լ ã ϴ."
por "No pode encontrar a funo '%-.
128
s' na biblioteca"
rum "Nu pot gasi functia '%-.
128
s' in libraria"
rus " '%-.
128
s' "
serbian "Ne mogu da pronadjem funkciju '%-.
128
s' u biblioteci"
slo "Nemem njs funkciu '%-.
128
s' v kninici"
spa "No puedo encontrar funcin '%-.
128
s' en libraria"
swe "Hittar inte funktionen '%-.
128
s' in det dynamiska biblioteket"
ukr " æ '%-.
128
s' ¦̦æ"
ER_FUNCTION_NOT_DEFINED
cze "Funkce '%-.64s' nen-B definovna"
dan "Funktionen '%-.64s' er ikke defineret"
...
...
@@ -4898,7 +4898,10 @@ ER_WARN_NULL_TO_NOTNULL 22004
por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld"
spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la lnea %ld"
ER_WARN_DATA_OUT_OF_RANGE 22003
eng "Out of range value for column '%s' at row %ld"
eng "Out of range value adjusted for column '%s' at row %ld"
ger "Daten abgeschnitten, auerhalb des Wertebereichs fr Feld '%s' in Zeile %ld"
por "Dado truncado, fora de alcance para coluna '%s' na linha %ld"
spa "Datos truncados, fuera de gama para columna '%s' en la lnea %ld"
WARN_DATA_TRUNCATED 01000
eng "Data truncated for column '%s' at row %ld"
ger "Daten abgeschnitten fr Feld '%s' in Zeile %ld"
...
...
@@ -5602,6 +5605,25 @@ ER_SP_RECURSION_LIMIT
ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde fr Routine %.64s berschritten"
ER_SP_PROC_TABLE_CORRUPT
eng "Failed to load routine %-.64s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
ER_SP_WRONG_NAME 42000
eng "Incorrect routine name '%-.64s'"
ER_TABLE_NEEDS_UPGRADE
eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" to fix it!"
ER_SP_NO_AGGREGATE 42000
eng "AGGREGATE is not supported for stored functions"
ER_MAX_PREPARED_STMT_COUNT_REACHED 42000
eng "Can't create more than max_prepared_stmt_count statements (current value: %lu)"
ER_VIEW_RECURSIVE
eng "`%-.64s`.`%-.64s` contains view recursion"
ER_NON_GROUPING_FIELD_USED 42000
eng "non-grouping field '%-.64s' is used in %-.64s clause"
ER_TABLE_CANT_HANDLE_SPKEYS
eng "The used table type doesn't support SPATIAL indexes"
ER_WARN_DEPRECATED_SYNTAX
eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead."
ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
por "'%s' desatualizado. Use '%s' em seu lugar"
spa "'%s' est desaprobado, use '%s' en su lugar"
ER_PARTITION_REQUIRES_VALUES_ERROR
eng "%-.64s PARTITIONING requires definition of VALUES %-.64s for each partition"
swe "%-.64s PARTITIONering krver definition av VALUES %-.64s fr varje partition"
...
...
@@ -5802,28 +5824,10 @@ ER_CANT_WRITE_LOCK_LOG_TABLE
eng "You can't write-lock a log table. Only read access is possible."
ER_CANT_READ_LOCK_LOG_TABLE
eng "You can't use usual read lock with log tables. Try READ LOCAL instead."
ER_SP_WRONG_NAME 42000
eng "Incorrect routine name '%-.64s'"
ER_FOREIGN_DUPLICATE_KEY 23000 S1009
eng "Upholding foreign key constraints for table '%.64s', entry '%-.64s', key %d would lead to a duplicate entry"
ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE
eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables"
ER_TABLE_NEEDS_UPGRADE
eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" to fix it!"
ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ER_CANT_CHANGE_TX_ISOLATION 25001
eng "Transaction isolation level can't be changed while a transaction is in progress"
ER_WARN_DEPRECATED
eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead."
ER_SP_NO_AGGREGATE 42000
eng "AGGREGATE is not supported for stored functions"
ER_MAX_PREPARED_STMT_COUNT_REACHED 42000
eng "Can't create more than max_prepared_stmt_count statements (current value: %lu)"
ER_VIEW_RECURSIVE
eng "`%-.64s`.`%-.64s` contains view recursion"
ER_NON_GROUPING_FIELD_USED 42000
eng "non-grouping field '%-.64s' is used in %-.64s clause"
ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR
eng "Cannot switch out of the row-based binary log format when the session has open temporary tables"
ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT
...
...
@@ -5840,3 +5844,7 @@ ER_NULL_IN_VALUES_LESS_THAN
ER_WRONG_PARTITION_NAME
eng "Incorrect partition name"
swe "Felaktigt partitionsnamn"
ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ER_CANT_CHANGE_TX_ISOLATION 25001
eng "Transaction isolation level can't be changed while a transaction is in progress"
sql/sp.cc
View file @
3ddc1f99
...
...
@@ -268,7 +268,6 @@ db_find_routine_aux(THD *thd, int type, sp_name *name, TABLE *table)
static
int
db_find_routine
(
THD
*
thd
,
int
type
,
sp_name
*
name
,
sp_head
**
sphp
)
{
extern
int
MYSQLparse
(
void
*
thd
);
TABLE
*
table
;
const
char
*
params
,
*
returns
,
*
body
;
int
ret
;
...
...
@@ -477,6 +476,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
(
*
sphp
)
->
optimize
();
}
end:
lex_end
(
thd
->
lex
);
thd
->
spcont
=
old_spcont
;
thd
->
variables
.
sql_mode
=
old_sql_mode
;
thd
->
variables
.
select_limit
=
old_select_limit
;
...
...
sql/sp_head.cc
View file @
3ddc1f99
...
...
@@ -680,6 +680,7 @@ sp_head::destroy()
DBUG_ASSERT
(
m_lex
.
is_empty
()
||
m_thd
);
while
((
lex
=
(
LEX
*
)
m_lex
.
pop
()))
{
lex_end
(
m_thd
->
lex
);
delete
m_thd
->
lex
;
m_thd
->
lex
=
lex
;
}
...
...
@@ -1682,7 +1683,10 @@ sp_head::restore_lex(THD *thd)
*/
merge_table_list
(
thd
,
sublex
->
query_tables
,
sublex
);
if
(
!
sublex
->
sp_lex_in_use
)
{
lex_end
(
sublex
);
delete
sublex
;
}
thd
->
lex
=
oldlex
;
DBUG_VOID_RETURN
;
}
...
...
sql/sp_head.h
View file @
3ddc1f99
...
...
@@ -521,7 +521,10 @@ public:
virtual
~
sp_lex_keeper
()
{
if
(
m_lex_resp
)
{
lex_end
(
m_lex
);
delete
m_lex
;
}
}
/*
...
...
sql/sql_table.cc
View file @
3ddc1f99
...
...
@@ -2563,6 +2563,12 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
/* TODO: Add proper checks if handler supports key_type and algorithm */
if
(
key_info
->
flags
&
HA_SPATIAL
)
{
if
(
!
(
file
->
table_flags
()
&
HA_CAN_RTREEKEYS
))
{
my_message
(
ER_TABLE_CANT_HANDLE_SPKEYS
,
ER
(
ER_TABLE_CANT_HANDLE_SPKEYS
),
MYF
(
0
));
DBUG_RETURN
(
-
1
);
}
if
(
key_info
->
key_parts
!=
1
)
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
"SPATIAL INDEX"
);
...
...
@@ -3572,7 +3578,9 @@ mysql_rename_table(handlerton *base,
}
}
delete
file
;
if
(
error
)
if
(
error
==
HA_ERR_WRONG_COMMAND
)
my_error
(
ER_NOT_SUPPORTED_YET
,
MYF
(
0
),
"ALTER TABLE"
);
else
if
(
error
)
my_error
(
ER_ERROR_ON_RENAME
,
MYF
(
0
),
from
,
to
,
error
);
DBUG_RETURN
(
error
!=
0
);
}
...
...
@@ -4217,11 +4225,16 @@ send_result_message:
table
->
table
->
s
->
version
=
0
;
// Force close of table
else
if
(
open_for_modify
&&
!
table
->
table
->
s
->
log_table
)
{
pthread_mutex_lock
(
&
LOCK_open
);
remove_table_from_cache
(
thd
,
table
->
table
->
s
->
db
.
str
,
table
->
table
->
s
->
table_name
.
str
,
RTFC_NO_FLAG
);
pthread_mutex_unlock
(
&
LOCK_open
);
/* Something may be modified, that's why we have to invalidate cache */
if
(
table
->
table
->
s
->
tmp_table
)
table
->
table
->
file
->
info
(
HA_STATUS_CONST
);
else
{
pthread_mutex_lock
(
&
LOCK_open
);
remove_table_from_cache
(
thd
,
table
->
table
->
s
->
db
.
str
,
table
->
table
->
s
->
table_name
.
str
,
RTFC_NO_FLAG
);
pthread_mutex_unlock
(
&
LOCK_open
);
}
/* May be something modified consequently we have to invalidate cache */
query_cache_invalidate3
(
thd
,
table
->
table
,
0
);
}
}
...
...
storage/heap/hp_delete.c
View file @
3ddc1f99
...
...
@@ -79,7 +79,8 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
custom_arg
.
key_length
=
hp_rb_make_key
(
keyinfo
,
info
->
recbuf
,
record
,
recpos
);
custom_arg
.
search_flag
=
SEARCH_SAME
;
old_allocated
=
keyinfo
->
rb_tree
.
allocated
;
res
=
tree_delete
(
&
keyinfo
->
rb_tree
,
info
->
recbuf
,
&
custom_arg
);
res
=
tree_delete
(
&
keyinfo
->
rb_tree
,
info
->
recbuf
,
custom_arg
.
key_length
,
&
custom_arg
);
info
->
s
->
index_length
-=
(
old_allocated
-
keyinfo
->
rb_tree
.
allocated
);
return
res
;
}
...
...
storage/myisam/mi_key.c
View file @
3ddc1f99
...
...
@@ -127,7 +127,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
}
if
(
keyseg
->
flag
&
HA_VAR_LENGTH_PART
)
{
uint
pack_length
=
keyseg
->
bit_start
;
uint
pack_length
=
(
keyseg
->
bit_start
==
1
?
1
:
2
)
;
uint
tmp_length
=
(
pack_length
==
1
?
(
uint
)
*
(
uchar
*
)
pos
:
uint2korr
(
pos
));
pos
+=
pack_length
;
/* Skip VARCHAR length */
...
...
storage/myisam/myisamlog.c
View file @
3ddc1f99
...
...
@@ -475,7 +475,7 @@ static int examine_log(my_string file_name, char **table_names)
{
if
(
!
curr_file_info
->
closed
)
files_open
--
;
VOID
(
tree_delete
(
&
tree
,
(
gptr
)
curr_file_info
,
tree
.
custom_arg
));
VOID
(
tree_delete
(
&
tree
,
(
gptr
)
curr_file_info
,
0
,
tree
.
custom_arg
));
}
break
;
case
MI_LOG_EXTRA
:
...
...
storage/ndb/include/kernel/signaldata/TcKeyReq.hpp
View file @
3ddc1f99
...
...
@@ -39,6 +39,7 @@ class TcKeyReq {
friend
class
NdbOperation
;
friend
class
NdbIndexOperation
;
friend
class
NdbScanOperation
;
friend
class
NdbBlob
;
friend
class
DbUtil
;
/**
...
...
storage/ndb/include/ndbapi/NdbBlob.hpp
View file @
3ddc1f99
...
...
@@ -326,6 +326,7 @@ private:
bool
isWriteOp
();
bool
isDeleteOp
();
bool
isScanOp
();
bool
isTakeOverOp
();
// computations
Uint32
getPartNumber
(
Uint64
pos
);
Uint32
getPartCount
();
...
...
storage/ndb/src/ndbapi/NdbBlob.cpp
View file @
3ddc1f99
...
...
@@ -23,6 +23,7 @@
#include <NdbBlob.hpp>
#include "NdbBlobImpl.hpp"
#include <NdbScanOperation.hpp>
#include <signaldata/TcKeyReq.hpp>
#include <NdbEventOperationImpl.hpp>
/*
...
...
@@ -392,6 +393,13 @@ NdbBlob::isScanOp()
theNdbOp
->
theOperationType
==
NdbOperation
::
OpenRangeScanRequest
;
}
inline
bool
NdbBlob
::
isTakeOverOp
()
{
return
TcKeyReq
::
getTakeOverScanFlag
(
theNdbOp
->
theScanInfo
);
}
// computations (inline)
inline
Uint32
...
...
@@ -1527,8 +1535,22 @@ NdbBlob::preExecute(NdbTransaction::ExecType anExecType, bool& batch)
if
(
isUpdateOp
()
||
isWriteOp
()
||
isDeleteOp
())
{
// add operation before this one to read head+inline
NdbOperation
*
tOp
=
theNdbCon
->
getNdbOperation
(
theTable
,
theNdbOp
);
/*
* If main op is from take over scan lock, the added read is done
* as committed read:
*
* In normal transactional case, the row is locked by us and
* committed read returns same as normal read.
*
* In current TRUNCATE TABLE, the deleting trans is committed in
* batches and then restarted with new trans id. A normal read
* would hang on the scan delete lock and then fail.
*/
NdbOperation
::
LockMode
lockMode
=
!
isTakeOverOp
()
?
NdbOperation
::
LM_Read
:
NdbOperation
::
LM_CommittedRead
;
if
(
tOp
==
NULL
||
tOp
->
readTuple
()
==
-
1
||
tOp
->
readTuple
(
lockMode
)
==
-
1
||
setTableKeyValue
(
tOp
)
==
-
1
||
getHeadInlineValue
(
tOp
)
==
-
1
)
{
setErrorCode
(
tOp
);
...
...
storage/ndb/test/ndbapi/testBlobs.cpp
View file @
3ddc1f99
...
...
@@ -44,6 +44,7 @@ struct Opt {
bool
m_dbg
;
bool
m_dbgall
;
const
char
*
m_dbug
;
bool
m_fac
;
bool
m_full
;
unsigned
m_loop
;
unsigned
m_parts
;
...
...
@@ -72,6 +73,7 @@ struct Opt {
m_dbg
(
false
),
m_dbgall
(
false
),
m_dbug
(
0
),
m_fac
(
false
),
m_full
(
false
),
m_loop
(
1
),
m_parts
(
10
),
...
...
@@ -110,6 +112,7 @@ printusage()
<<
" -dbg print debug"
<<
endl
<<
" -dbgall print also NDB API debug (if compiled in)"
<<
endl
<<
" -dbug opt dbug options"
<<
endl
<<
" -fac fetch across commit in scan delete ["
<<
d
.
m_fac
<<
"]"
<<
endl
<<
" -full read/write only full blob values"
<<
endl
<<
" -loop N loop N times 0=forever ["
<<
d
.
m_loop
<<
"]"
<<
endl
<<
" -parts N max parts in blob value ["
<<
d
.
m_parts
<<
"]"
<<
endl
...
...
@@ -1255,23 +1258,11 @@ deleteScan(bool idx)
CHK
((
ret
=
g_ops
->
nextResult
(
false
))
==
0
||
ret
==
1
||
ret
==
2
);
if
(
++
n
==
g_opt
.
m_batch
||
ret
==
2
)
{
DBG
(
"execute batch: n="
<<
n
<<
" ret="
<<
ret
);
switch
(
0
)
{
case
0
:
// works normally
if
(
!
g_opt
.
m_fac
)
{
CHK
(
g_con
->
execute
(
NoCommit
)
==
0
);
CHK
(
true
||
g_con
->
restart
()
==
0
);
break
;
case
1
:
// nonsense - g_con is invalid for 2nd batch
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
CHK
(
true
||
g_con
->
restart
()
==
0
);
break
;
case
2
:
// DBTC sendSignalErrorRefuseLab
CHK
(
g_con
->
execute
(
NoCommit
)
==
0
);
CHK
(
g_con
->
restart
()
==
0
);
break
;
case
3
:
// 266 time-out
}
else
{
CHK
(
g_con
->
execute
(
Commit
)
==
0
);
CHK
(
g_con
->
restart
()
==
0
);
break
;
}
n
=
0
;
}
...
...
@@ -1817,6 +1808,10 @@ NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535)
continue
;
}
}
if
(
strcmp
(
arg
,
"-fac"
)
==
0
)
{
g_opt
.
m_fac
=
true
;
continue
;
}
if
(
strcmp
(
arg
,
"-full"
)
==
0
)
{
g_opt
.
m_full
=
true
;
continue
;
...
...
storage/ndb/tools/delete_all.cpp
View file @
3ddc1f99
...
...
@@ -23,17 +23,21 @@
#include <NDBT.hpp>
static
int
clear_table
(
Ndb
*
pNdb
,
const
NdbDictionary
::
Table
*
pTab
,
bool
commit_across_open_cursor
,
int
parallelism
=
240
);
bool
fetch_across_commit
,
int
parallelism
=
240
);
NDB_STD_OPTS_VARS
;
static
const
char
*
_dbname
=
"TEST_DB"
;
static
my_bool
_transactional
=
false
;
static
struct
my_option
my_long_options
[]
=
{
NDB_STD_OPTS
(
"ndb_desc"
),
{
"database"
,
'd'
,
"Name of database table is in"
,
(
gptr
*
)
&
_dbname
,
(
gptr
*
)
&
_dbname
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"transactional"
,
't'
,
"Single transaction (may run out of operations)"
,
(
gptr
*
)
&
_transactional
,
(
gptr
*
)
&
_transactional
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
static
void
usage
()
...
...
@@ -84,18 +88,11 @@ int main(int argc, char** argv){
ndbout
<<
" Table "
<<
argv
[
i
]
<<
" does not exist!"
<<
endl
;
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
}
// Check if we have any blobs
bool
commit_across_open_cursor
=
true
;
for
(
int
j
=
0
;
j
<
pTab
->
getNoOfColumns
();
j
++
)
{
NdbDictionary
::
Column
::
Type
t
=
pTab
->
getColumn
(
j
)
->
getType
();
if
(
t
==
NdbDictionary
::
Column
::
Blob
||
t
==
NdbDictionary
::
Column
::
Text
)
{
commit_across_open_cursor
=
false
;
break
;
}
}
ndbout
<<
"Deleting all from "
<<
argv
[
i
]
<<
"..."
;
if
(
clear_table
(
&
MyNdb
,
pTab
,
commit_across_open_cursor
)
==
NDBT_FAILED
){
ndbout
<<
"Deleting all from "
<<
argv
[
i
];
if
(
!
_transactional
)
ndbout
<<
" (non-transactional)"
;
ndbout
<<
" ..."
;
if
(
clear_table
(
&
MyNdb
,
pTab
,
!
_transactional
)
==
NDBT_FAILED
){
res
=
NDBT_FAILED
;
ndbout
<<
"FAILED"
<<
endl
;
}
...
...
@@ -105,7 +102,7 @@ int main(int argc, char** argv){
int
clear_table
(
Ndb
*
pNdb
,
const
NdbDictionary
::
Table
*
pTab
,
bool
commit_across_open_cursor
,
int
parallelism
)
bool
fetch_across_commit
,
int
parallelism
)
{
// Scan all records exclusive and delete
// them one by one
...
...
@@ -136,7 +133,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
}
goto
failed
;
}
pOp
=
pTrans
->
getNdbScanOperation
(
pTab
->
getName
());
if
(
pOp
==
NULL
)
{
goto
failed
;
...
...
@@ -167,7 +164,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
}
while
((
check
=
pOp
->
nextResult
(
false
))
==
0
);
if
(
check
!=
-
1
){
if
(
commit_across_open_cursor
)
{
if
(
fetch_across_commit
)
{
check
=
pTrans
->
execute
(
NdbTransaction
::
Commit
);
pTrans
->
restart
();
// new tx id
}
else
{
...
...
@@ -198,7 +195,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
}
goto
failed
;
}
if
(
!
commit_across_open_cursor
&&
if
(
!
fetch_across_commit
&&
pTrans
->
execute
(
NdbTransaction
::
Commit
)
!=
0
)
{
err
=
pTrans
->
getNdbError
();
goto
failed
;
...
...
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