Commit afd70eb6 authored by unknown's avatar unknown

Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-opt

into  kaamos.(none):/data/src/opt/mysql-5.1-opt

parents f23b19ea e0f4fb72
......@@ -100,8 +100,10 @@ if [ "x$warning_mode" != "xpedantic" ]; then
# C warnings
c_warnings="$warnings -Wunused-parameter"
# C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
cxx_warnings="$warnings"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wreorder"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
debug_extra_cflags="-O1 -Wuninitialized"
else
......
......@@ -141,6 +141,7 @@ error 1115;
set character_set_client=9999999;
error 1273;
set collation_server=9999998;
set max_join_size=default;
# This one was contributed by Sergey Petrunia (BUG#3943)
......@@ -151,7 +152,6 @@ SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
sync_slave_with_master;
SET SQL_BIG_SELECTS=1;
......
......@@ -539,7 +539,7 @@ F2E5F1F2
drop table t1;
create table t1 ( a timestamp );
alter table t1 add unique ( a(1) );
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
drop table t1;
drop table if exists t1;
create table t1 (a int, key(a));
......@@ -953,12 +953,12 @@ t1 CREATE TABLE `t1` (
KEY `b_2` (`b`(50))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 (a INT, KEY (a(20)));
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
ALTER TABLE t1 ADD d INT;
ALTER TABLE t1 ADD KEY (d(20));
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
ALTER TABLE t1 ADD e GEOMETRY NOT NULL, ADD SPATIAL KEY (e(30));
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
DROP TABLE t1;
CREATE TABLE t1 (s CHAR(8) BINARY);
INSERT INTO t1 VALUES ('test');
......
......@@ -1545,6 +1545,20 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 7
drop table t1,t2;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
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 c1 1 c1 NULL 0 NULL NULL YES HASH
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
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 c1 1 c1 A NULL NULL NULL YES BTREE
DROP TABLE t1;
End of 5.0 tests
CREATE TABLE t1 (a int, b int);
insert into t1 values (1,1),(1,2);
......
......@@ -173,6 +173,7 @@ set character_set_client=9999999;
ERROR 42000: Unknown character set: '9999999'
set collation_server=9999998;
ERROR HY000: Unknown collation: '9999998'
set max_join_size=default;
select "--- --3943--" as "";
--- --3943--
......@@ -182,7 +183,6 @@ SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
......
......@@ -185,6 +185,7 @@ set character_set_client=9999999;
ERROR 42000: Unknown character set: '9999999'
set collation_server=9999998;
ERROR HY000: Unknown collation: '9999998'
set max_join_size=default;
select "--- --3943--" as "";
--- --3943--
......@@ -194,7 +195,6 @@ SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
......
......@@ -171,6 +171,7 @@ set character_set_client=9999999;
ERROR 42000: Unknown character set: '9999999'
set collation_server=9999998;
ERROR HY000: Unknown collation: '9999998'
set max_join_size=default;
select "--- --3943--" as "";
--- --3943--
......@@ -180,7 +181,6 @@ SET CHARACTER_SET_CLIENT=koi8r,
CHARACTER_SET_CONNECTION=cp1251,
CHARACTER_SET_RESULTS=koi8r;
INSERT INTO t1 (c1, c2) VALUES (', ',', ');
SET SQL_BIG_SELECTS=1;
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
......
......@@ -1152,6 +1152,30 @@ create table t2 select sql_big_result f1,count(f2) from t1 group by f1;
show status like 'handler_read%';
drop table t1,t2;
#
# Bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs on table creates
#
# Show that the old syntax for index type is supported
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1));
DROP TABLE t1;
# Show that the new syntax for index type is supported
CREATE TABLE t1(c1 VARCHAR(33), KEY (c1) USING BTREE);
DROP TABLE t1;
# Show that in case of multiple index type definitions, the last one takes
# precedence
CREATE TABLE t1(c1 VARCHAR(33), KEY USING BTREE (c1) USING HASH) ENGINE=MEMORY;
SHOW INDEX FROM t1;
DROP TABLE t1;
CREATE TABLE t1(c1 VARCHAR(33), KEY USING HASH (c1) USING BTREE) ENGINE=MEMORY;
SHOW INDEX FROM t1;
DROP TABLE t1;
--echo End of 5.0 tests
#
......
......@@ -29,9 +29,9 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f,
Master_info::Master_info()
:Slave_reporting_capability("I/O"),
ssl(0), fd(-1), io_thd(0), inited(0),
ssl(0), ssl_verify_server_cert(0), fd(-1), io_thd(0), inited(0),
abort_slave(0),slave_running(0),
ssl_verify_server_cert(0), slave_run_id(0)
slave_run_id(0)
{
host[0] = 0; user[0] = 0; password[0] = 0;
ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0;
......
......@@ -2146,14 +2146,14 @@ ER_WRONG_SUB_KEY
cze "Chybn-B podst kle -- nen to etzec nebo je del ne dlka sti kle"
dan "Forkert indeksdel. Den anvendte ngledel er ikke en streng eller lngden er strre end nglelngden"
nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel"
eng "Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys"
eng "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys"
est "Vigane vtme osa. Kasutatud vtmeosa ei ole string tpi, mratud pikkus on pikem kui vtmeosa vi tabelihandler ei toeta seda tpi vtmeid"
fre "Mauvaise sous-clef. Ce n'est pas un 'string' ou la longueur dpasse celle dfinie dans la clef"
ger "Falscher Unterteilschlssel. Der verwendete Schlsselteil ist entweder kein String, die verwendete Lnge ist lnger als der Teilschlssel oder die Speicher-Engine untersttzt keine Unterteilschlssel"
greek " sub part key. key part string "
hun "Rossz alkulcs. A hasznalt kulcsresz nem karaktersorozat vagy hosszabb, mint a kulcsresz"
ita "Sotto-parte della chiave errata. La parte di chiave utilizzata non e` una stringa o la lunghezza e` maggiore della parte di chiave."
jpn "Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part"
jpn "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part"
kor "Ȯ Ʈ Ű. Ű Ʈ Ʈ ƴϰų Ű Ʈ ̰ ʹ ϴ."
nor "Feil delnkkel. Den brukte delnkkelen er ikke en streng eller den oppgitte lengde er lengre enn nkkel lengden"
norwegian-ny "Feil delnykkel. Den brukte delnykkelen er ikkje ein streng eller den oppgitte lengda er lengre enn nykkellengden"
......@@ -2162,7 +2162,7 @@ ER_WRONG_SUB_KEY
rum "Componentul cheii este incorrect. Componentul folosit al cheii nu este un sir sau lungimea folosita este mai lunga decit lungimea cheii"
rus " . , , , "
serbian "Pogrean pod-klju dela kljua. Upotrebljeni deo kljua nije string, upotrebljena duina je vea od dela kljua ili handler tabela ne podrava jedinstvene pod-kljueve"
slo "Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part"
slo "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part"
spa "Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave"
swe "Felaktig delnyckel. Nyckeldelen r inte en strng eller den angivna lngden r lngre n kolumnlngden"
ukr "צ . , ڦ æ Цդ Φ "
......
......@@ -61,8 +61,8 @@ static handler *heap_create_handler(handlerton *hton,
*****************************************************************************/
ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0), records_changed(0), internal_table(0),
key_stat_version(0)
:handler(hton, table_arg), file(0), records_changed(0), key_stat_version(0),
internal_table(0)
{}
......
......@@ -425,8 +425,9 @@ public:
ArrayPool<TriggerRecord> & trp)
: slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1)
, tables(tp), triggers(trp), files(bp)
, masterData(b), backup(b)
, ctlFilePtr(RNIL), logFilePtr(RNIL), dataFilePtr(RNIL)
, masterData(b), backup(b)
{
}
......
......@@ -259,14 +259,14 @@ Pgman::execCONTINUEB(Signal* signal)
// page entry
Pgman::Page_entry::Page_entry(Uint32 file_no, Uint32 page_no) :
m_state(0),
m_file_no(file_no),
m_state(0),
m_page_no(page_no),
m_real_page_i(RNIL),
m_copy_page_i(RNIL),
m_lsn(0),
m_last_lcp(0),
m_dirty_count(0),
m_copy_page_i(RNIL),
m_busy_count(0),
m_requests()
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment