Commit 22e418b4 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

merge

parents fad7880b 777fdb5d
...@@ -32638,7 +32638,7 @@ create_definition: ...@@ -32638,7 +32638,7 @@ create_definition:
or INDEX [index_name] (index_col_name,...) or INDEX [index_name] (index_col_name,...)
or UNIQUE [INDEX] [index_name] (index_col_name,...) or UNIQUE [INDEX] [index_name] (index_col_name,...)
or FULLTEXT [INDEX] [index_name] (index_col_name,...) or FULLTEXT [INDEX] [index_name] (index_col_name,...)
or [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...) or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
[reference_definition] [reference_definition]
or CHECK (expr) or CHECK (expr)
...@@ -33073,7 +33073,7 @@ All mapped tables must be in the same database as the @code{MERGE} table. ...@@ -33073,7 +33073,7 @@ All mapped tables must be in the same database as the @code{MERGE} table.
@item @item
If you want to insert data in a @code{MERGE} table, you have to specify with If you want to insert data in a @code{MERGE} table, you have to specify with
@code{INSERT_METHOD} into with table the row should be inserted. @code{INSERT_METHOD} into with table the row should be inserted.
@xref{MERGE}. @xref{MERGE}. This option was introduced in MySQL 4.0.0.
@item @item
In the created table the @code{PRIMARY} key will be placed first, followed In the created table the @code{PRIMARY} key will be placed first, followed
...@@ -46073,6 +46073,9 @@ able to use boolean fulltext search}. ...@@ -46073,6 +46073,9 @@ able to use boolean fulltext search}.
@code{LOCATE()} and @code{INSTR()} are case sensitive if neither @code{LOCATE()} and @code{INSTR()} are case sensitive if neither
argument is a binary string. argument is a binary string.
@item @item
Changed @code{RND()} initialization so that @code{RND(N)} and @code{RND(N+1)}
are more distinct.
@item
Fixed core dump bug in @code{UPDATE ... ORDER BY}. Fixed core dump bug in @code{UPDATE ... ORDER BY}.
@item @item
Changed @code{INSERT INTO .. SELECT} to stop on errors by default. Changed @code{INSERT INTO .. SELECT} to stop on errors by default.
...@@ -46083,6 +46086,8 @@ Added boolean fulltext search code. It should be considered early alpha. ...@@ -46083,6 +46086,8 @@ Added boolean fulltext search code. It should be considered early alpha.
@item @item
Extended @code{MODIFY} and @code{CHANGE} in @code{ALTER TABLE} to accept Extended @code{MODIFY} and @code{CHANGE} in @code{ALTER TABLE} to accept
the @code{AFTER} keyword. the @code{AFTER} keyword.
@item
Index are now used with @code{ORDER} BY on a whole InnoDB table.
@end itemize @end itemize
@node News-4.0.0, , News-4.0.1, News-4.0.x @node News-4.0.0, , News-4.0.1, News-4.0.x
...@@ -1334,9 +1334,9 @@ int do_connect(struct st_query* q) ...@@ -1334,9 +1334,9 @@ int do_connect(struct st_query* q)
con_sock=fn_format(buff, con_sock, TMPDIR, "",0); con_sock=fn_format(buff, con_sock, TMPDIR, "",0);
if (!con_db[0]) if (!con_db[0])
con_db=db; con_db=db;
if((con_error = safe_connect(&next_con->mysql, con_host, if ((con_error = safe_connect(&next_con->mysql, con_host,
con_user, con_pass, con_user, con_pass,
con_db, con_port, *con_sock ? con_sock: 0))) con_db, con_port, con_sock ? con_sock: 0)))
die("Could not open connection '%s': %s", con_name, die("Could not open connection '%s': %s", con_name,
mysql_error(&next_con->mysql)); mysql_error(&next_con->mysql));
...@@ -2403,7 +2403,6 @@ int main(int argc, char** argv) ...@@ -2403,7 +2403,6 @@ int main(int argc, char** argv)
printf("ok\n"); printf("ok\n");
} }
mysql_server_end();
free_used_memory(); free_used_memory();
exit(error ? 1 : 0); exit(error ? 1 : 0);
return error ? 1 : 0; /* Keep compiler happy */ return error ? 1 : 0; /* Keep compiler happy */
......
LIBRARY VERSION DESIGN (EMBEDDED SERVER)
- The library version of MySQL server is the client library that contains embedded server.
- This client DLL has name : libmysqlclient_e (.la)
- The client application that supposed to use MySQL LV need to be rebuilt against libmysqlclient_e.la. The rebuild process is necessary, because libmysqlclient_e is a LIBTOOL object, which has the different LIBS list compared to the original libmysqlclient.la.
- The client and the server code run in the same process and the same thread;
- The server code is invoked when client writes the command to the net, and when connection is established;
...@@ -78,6 +78,7 @@ if test $clean = 1 ...@@ -78,6 +78,7 @@ if test $clean = 1
then then
rm -f $datadir/ib_* $datadir/ibdata* rm -f $datadir/ib_* $datadir/ibdata*
rm -f $datadir/log.00* rm -f $datadir/log.00*
rm -f $datadir/test/*.db
fi fi
rm -f $datadir/../tmp/* rm -f $datadir/../tmp/*
rm -f test-gdbinit rm -f test-gdbinit
......
...@@ -858,7 +858,7 @@ insert into test_$1.t3 values(1); ...@@ -858,7 +858,7 @@ insert into test_$1.t3 values(1);
commit; commit;
drop database test_$1; drop database test_$1;
show tables from test_$1; show tables from test_$1;
Can't read dir of './test_$1/' (Errcode: 2) Got one of the listed errors
create table t1 (a int not null) type= innodb; create table t1 (a int not null) type= innodb;
insert into t1 values(1),(2); insert into t1 values(1),(2);
truncate table t1; truncate table t1;
......
...@@ -527,7 +527,8 @@ create table test_$1.t3 (a int not null) type= heap; ...@@ -527,7 +527,8 @@ create table test_$1.t3 (a int not null) type= heap;
insert into test_$1.t3 values(1); insert into test_$1.t3 values(1);
commit; commit;
drop database test_$1; drop database test_$1;
--error 12 # Don't check error message
--error 12,12
show tables from test_$1; show tables from test_$1;
# #
......
...@@ -169,6 +169,7 @@ void end_key_cache(void) ...@@ -169,6 +169,7 @@ void end_key_cache(void)
} }
} }
key_cache_inited=0; key_cache_inited=0;
_my_hash_blocks=my_blocks_used=0;
DBUG_PRINT("status", DBUG_PRINT("status",
("used: %d changed: %d w_requests: %ld writes: %ld r_requests: %ld reads: %ld", ("used: %d changed: %d w_requests: %ld writes: %ld r_requests: %ld reads: %ld",
_my_blocks_used,_my_blocks_changed,_my_cache_w_requests, _my_blocks_used,_my_blocks_changed,_my_cache_w_requests,
......
...@@ -1879,13 +1879,14 @@ int ha_berkeley::delete_table(const char *name) ...@@ -1879,13 +1879,14 @@ int ha_berkeley::delete_table(const char *name)
{ {
int error; int error;
char name_buff[FN_REFLEN]; char name_buff[FN_REFLEN];
DBUG_ENTER("delete_table");
if ((error=db_create(&file, db_env, 0))) if ((error=db_create(&file, db_env, 0)))
my_errno=error; /* purecov: inspected */ my_errno=error; /* purecov: inspected */
else else
error=file->remove(file,fn_format(name_buff,name,"",ha_berkeley_ext,2 | 4), error=file->remove(file,fn_format(name_buff,name,"",ha_berkeley_ext,2 | 4),
NULL,0); NULL,0);
file=0; // Safety file=0; // Safety
return error; DBUG_RETURN(error);
} }
/* /*
......
...@@ -544,13 +544,14 @@ innobase_init(void) ...@@ -544,13 +544,14 @@ innobase_init(void)
When using the embedded server, the datadirectory is not When using the embedded server, the datadirectory is not
in the current directory. in the current directory.
*/ */
if (!mysql_embedded) if (mysql_embedded)
default_path=mysql_real_data_home; default_path=mysql_real_data_home;
else else
{ {
/* It's better to use current lib, to keep path's short */ /* It's better to use current lib, to keep path's short */
current_lib[0]=FN_CURLIB; current_lib[0]=FN_CURLIB;
current_lib[1]=FN_LIBCHAR; current_lib[1]=FN_LIBCHAR;
current_lib[2]=0;
default_path=current_lib; default_path=current_lib;
} }
......
...@@ -101,6 +101,7 @@ class ha_innobase: public handler ...@@ -101,6 +101,7 @@ class ha_innobase: public handler
bytes */ bytes */
uint max_key_length() const { return 7000; } uint max_key_length() const { return 7000; }
bool fast_key_read() { return 1;} bool fast_key_read() { return 1;}
key_map keys_to_use_for_scanning() { return ~(key_map) 0; }
bool has_transactions() { return 1;} bool has_transactions() { return 1;}
int open(const char *name, int mode, uint test_if_locked); int open(const char *name, int mode, uint test_if_locked);
......
...@@ -231,6 +231,7 @@ public: ...@@ -231,6 +231,7 @@ public:
{ return ulonglong2double(data_file_length) / IO_SIZE + 1; } { return ulonglong2double(data_file_length) / IO_SIZE + 1; }
virtual double read_time(ha_rows rows) { return rows; } virtual double read_time(ha_rows rows) { return rows; }
virtual bool fast_key_read() { return 0;} virtual bool fast_key_read() { return 0;}
virtual key_map keys_to_use_for_scanning() { return 0; }
virtual bool has_transactions(){ return 0;} virtual bool has_transactions(){ return 0;}
virtual uint extra_rec_buf_length() { return 0; } virtual uint extra_rec_buf_length() { return 0; }
virtual ha_rows estimate_number_of_rows() { return records+EXTRA_RECORDS; } virtual ha_rows estimate_number_of_rows() { return records+EXTRA_RECORDS; }
......
...@@ -736,8 +736,8 @@ void clean_up(bool print_message) ...@@ -736,8 +736,8 @@ void clean_up(bool print_message)
if (!opt_noacl) if (!opt_noacl)
udf_free(); udf_free();
#endif #endif
end_key_cache();
(void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */ (void) ha_panic(HA_PANIC_CLOSE); /* close all tables and logs */
end_key_cache();
#ifdef USE_RAID #ifdef USE_RAID
end_raid(); end_raid();
#endif #endif
......
...@@ -1516,8 +1516,8 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db, ...@@ -1516,8 +1516,8 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
{ {
tmp_table->next=thd->temporary_tables; tmp_table->next=thd->temporary_tables;
thd->temporary_tables=tmp_table; thd->temporary_tables=tmp_table;
if(thd->slave_thread) if (thd->slave_thread)
++slave_open_temp_tables; slave_open_temp_tables++;
} }
DBUG_RETURN(tmp_table); DBUG_RETURN(tmp_table);
} }
......
...@@ -5346,7 +5346,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, ...@@ -5346,7 +5346,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
retrieving all rows through an index. retrieving all rows through an index.
*/ */
if (select_limit >= table->file->records) if (select_limit >= table->file->records)
keys&= table->used_keys; keys&= (table->used_keys | table->file->keys_to_use_for_scanning());
for (nr=0; keys ; keys>>=1, nr++) for (nr=0; keys ; keys>>=1, nr++)
{ {
......
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