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
ca2cca8d
Commit
ca2cca8d
authored
Nov 16, 2000
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
ea0f9d35
217ef71a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
92 additions
and
29 deletions
+92
-29
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
Docs/manual.texi
Docs/manual.texi
+60
-7
sql/log.cc
sql/log.cc
+23
-14
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+2
-2
sql/sql_class.h
sql/sql_class.h
+5
-5
No files found.
BitKeeper/etc/logging_ok
View file @
ca2cca8d
monty@donna.mysql.com
sasha@mysql.sashanet.com
serg@serg.mysql.com
monty@narttu.mysql.fi
Docs/manual.texi
View file @
ca2cca8d
...
...
@@ -148,7 +148,8 @@ version see the relevant distribution.
* Function Index:: SQL command, type and function index
* Concept Index:: Concept Index
@detailmenu --- The Detailed Node Listing ---
@detailmenu
--- The Detailed Node Listing ---
General Information About MySQL
...
...
@@ -592,7 +593,7 @@ Speed of queries that access or update data
MySQL Utilites
* Programs:: What do the executables do?
* safe_mysqld::
safe_mysqld, the wrapper around mysqld
* safe_mysqld::
* mysql:: The command line tool
* mysqladmin:: Administering a @strong{MySQL} server
* mysqldump:: Dumping the structure and data from @strong{MySQL} databases and tables
...
...
@@ -947,6 +948,7 @@ Changes in release 3.19.x
MySQL and the future (The TODO)
* TODO MySQL 4.0::
* TODO future:: Things that must done in the very near future
* TODO sometime:: Things that have to be done sometime
* TODO unplanned:: Some things we don't have any plans to do
...
...
@@ -42925,6 +42927,7 @@ For platform-specific bugs, see the sections about compiling and porting.
@appendix MySQL and the future (The TODO)
@menu
* TODO MySQL 4.0:: Things that should be in 4.0
* TODO future:: Things that must done in the very near future
* TODO sometime:: Things that have to be done sometime
* TODO unplanned:: Some things we don't have any plans to do
...
...
@@ -42934,16 +42937,66 @@ Everything in this list is in the order it will be done. If you want to
affect the priority order, please register a license or support us and
tell us what you want to have done more quickly. @xref{Licensing and Support}.
@node TODO future, TODO sometime, TODO, TODO
@appendixsec Things that must done in the real near future
@node TODO MySQL 4.0, TODO future, TODO, TODO
@appendixsec Things that should be in 4.0
We plan to make @strong{MySQL} 4.0 a 'quick' release where we only add
some new stuff to enable others to help us with developing new features
into 4.1. The @strong{MySQL} 4.0 version should only take us about a
month to make after which we want to stabilize it and start working on
4.1. 4.0 should have the following new features:
@itemize @bullet
@item
Fail safe replication.
New table definition file format (@code{.frm} files) This will enable us
to not run out of bits when adding more table options. One will still
be able to use the old .frm file format with 4.0; All new created tables
will however use the new format.
The new file format will enable us to add new column types, more options
for keys and @code{FOREIGN KEYS}.
@item
@code{mysqld} as a library. This will have the same interface as the
standard MySQL client (with an extra function to just set up startup
parameters) but will be faster (no TCP/IP or socket overhead), smaller
and much easer to use from embedded products.
One will be able to define at link time if one wants to use the
client/server model or a stand-alone application just by defining which
library to link with.
The @code{mysqld} will support all standard @strong{MySQL} features and
one can use it in a threaded client to run different queries in each
thread.
@item
Online backup with very low performance penalty. The online backup will
make it easy to add a new replication slave without taking down the
master.
@item
@code{DELETE FROM table_name} will return the number of deleted rows. For
fast execution one should use @code{TRUNCATE table_name}.
@item
Multi table deletes (cascading deletes) and multi table updates.
@item
Optimize, test and document transactions safe tables (BDB tables)
Better replication.
@item
Allow users to change startup options.
More functions for full text search.
@item
Character set casts and syntax for handling multiple character sets.
@item
Allow users to change startup options without taking down the server.
@item
Help for all commands from the client.
@item
Secure connections (with SSL).
@end itemize
@node TODO future, TODO sometime, TODO MySQL 4.0, TODO
@appendixsec Things that must done in the real near future
@itemize @bullet
@item
Fail safe replication.
@item
Subqueries. @code{select id from t where grp in (select grp from g where u > 100)}
@item
sql/log.cc
View file @
ca2cca8d
...
...
@@ -156,7 +156,7 @@ void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
do_magic
=
((
log_type
==
LOG_BIN
)
&&
!
my_stat
(
log_file_name
,
&
tmp_stat
,
MYF
(
0
)));
if
((
file
=
my_open
(
log_file_name
,
O_
APPEND
|
O_WRONLY
|
O_BINARY
|
O_CREAT
,
if
((
file
=
my_open
(
log_file_name
,
O_
CREAT
|
O_APPEND
|
O_WRONLY
|
O_BINARY
,
MYF
(
MY_WME
|
ME_WAITTANG
)))
<
0
||
init_io_cache
(
&
log_file
,
file
,
IO_SIZE
,
WRITE_CACHE
,
my_tell
(
file
,
MYF
(
MY_WME
)),
0
,
MYF
(
MY_WME
|
MY_NABP
)))
...
...
@@ -194,30 +194,39 @@ void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
}
else
if
(
log_type
==
LOG_BIN
)
{
/
/ Explanation of the boolean black magic:
//
//
if we are supposed to write magic number try write
//
clean up if failed
//
then if index_file has not been previously opened, try to open it
//
clean up if failed
/
*
Explanation of the boolean black magic:
if we are supposed to write magic number try write
clean up if failed
then if index_file has not been previously opened, try to open it
clean up if failed
*/
if
((
do_magic
&&
my_b_write
(
&
log_file
,
(
byte
*
)
BINLOG_MAGIC
,
4
))
||
(
index_file
<
0
&&
(
index_file
=
my_open
(
index_file_name
,
O_APPEND
|
O_BINARY
|
O_RDWR
|
O_CREAT
,
O_APPEND
|
O_BINARY
|
O_RDWR
|
O_CREAT
,
MYF
(
MY_WME
)))
<
0
))
goto
err
;
Start_log_event
s
;
bool
error
;
s
.
write
(
&
log_file
);
flush_io_cache
(
&
log_file
);
pthread_mutex_lock
(
&
LOCK_index
);
my_write
(
index_file
,
log_file_name
,
strlen
(
log_file_name
),
MYF
(
0
));
my_write
(
index_file
,
"
\n
"
,
1
,
MYF
(
0
));
error
=
(
my_write
(
index_file
,
log_file_name
,
strlen
(
log_file_name
),
MYF
(
MY_NABP
|
MY_WME
))
||
my_write
(
index_file
,
"
\n
"
,
1
,
MYF
(
MY_NABP
|
MY_WME
)));
pthread_mutex_unlock
(
&
LOCK_index
);
if
(
error
)
{
my_close
(
index_file
,
MYF
(
0
));
index_file
=
-
1
;
goto
err
;
}
}
return
;
err:
sql_print_error
(
"Could not use %s for logging (error %d)"
,
log_name
,
errno
);
if
(
file
>=
0
)
my_close
(
file
,
MYF
(
0
));
end_io_cache
(
&
log_file
);
...
...
@@ -411,7 +420,7 @@ int MYSQL_LOG::purge_logs(THD* thd, const char* to_log)
#ifdef HAVE_FTRUNCATE
if
(
ftruncate
(
index_file
,
0
))
{
sql_print_error
(
"
Ouch!
Could not truncate the binlog index file \
sql_print_error
(
"Could not truncate the binlog index file \
during log purge for write"
);
error
=
LOG_INFO_FATAL
;
goto
err
;
...
...
@@ -421,10 +430,10 @@ during log purge for write");
my_close
(
index_file
,
MYF
(
MY_WME
));
my_delete
(
index_file_name
,
MYF
(
MY_WME
));
if
(
!
(
index_file
=
my_open
(
index_file_name
,
O_
BINARY
|
O_RDWR
|
O_APPEND
|
O_CREAT
,
O_
CREAT
|
O_BINARY
|
O_RDWR
|
O_APPEND
,
MYF
(
MY_WME
))))
{
sql_print_error
(
"
Ouch!
Could not re-open the binlog index file \
sql_print_error
(
"Could not re-open the binlog index file \
during log purge for write"
);
error
=
LOG_INFO_FATAL
;
goto
err
;
...
...
sql/mysqld.cc
View file @
ca2cca8d
...
...
@@ -2313,7 +2313,7 @@ static struct option long_options[] = {
(
int
)
OPT_REPLICATE_REWRITE_DB
},
{
"safe-mode"
,
no_argument
,
0
,
(
int
)
OPT_SAFE
},
{
"socket"
,
required_argument
,
0
,
(
int
)
OPT_SOCKET
},
{
"server-id"
,
required_argument
,
0
,
(
int
)
OPT_SERVER_ID
},
{
"server-id"
,
required_argument
,
0
,
(
int
)
OPT_SERVER_ID
},
{
"set-variable"
,
required_argument
,
0
,
'O'
},
#ifdef HAVE_BERKELEY_DB
{
"skip-bdb"
,
no_argument
,
0
,
(
int
)
OPT_BDB_SKIP
},
...
...
sql/sql_class.cc
View file @
ca2cca8d
...
...
@@ -115,7 +115,7 @@ THD::THD()
ull
=
0
;
system_thread
=
0
;
bzero
((
char
*
)
&
mem_root
,
sizeof
(
mem_root
));
#if defined(HAVE_B
DB) || defined(HAVE_INNOBASE) || defined(HAVE_GEMENI
)
#if defined(HAVE_B
ERKELEY_DB) || defined(HAVE_INNOBASE_DB) || defined(HAVE_GEMENI_DB
)
if
(
open_cached_file
(
&
transactions
.
trans_log
,
mysql_tempdir
,
LOG_PREFIX
,
0
,
MYF
(
MY_WME
)))
killed
=
1
;
...
...
@@ -144,7 +144,7 @@ THD::~THD()
close_thread_tables
(
this
);
}
close_temporary_tables
(
this
);
#if defined(HAVE_B
DB) || defined(HAVE_INNOBASE) || defined(HAVE_GEMENI
)
#if defined(HAVE_B
ERKELEY_DB) || defined(HAVE_INNOBASE_DB) || defined(HAVE_GEMENI_DB
)
close_cached_file
(
transactions
.
trans_log
);
#endif
if
(
global_read_lock
)
...
...
sql/sql_class.h
View file @
ca2cca8d
...
...
@@ -238,7 +238,7 @@ class THD :public ilink {
const
char
*
where
;
char
*
last_nx_table
;
// last non-existent table, we need this for replication
char
*
last_nx_db
;
// database of the last nx table
time_t
start_time
,
time_after_lock
;
time_t
start_time
,
time_after_lock
,
user_time
;
time_t
connect_time
,
thr_create_time
;
// track down slow pthread_create
thr_lock_type
update_lock_default
;
delayed_insert
*
di
;
...
...
@@ -266,7 +266,7 @@ class THD :public ilink {
char
scramble
[
9
];
bool
set_query_id
,
locked
,
count_cuted_fields
,
some_tables_deleted
;
bool
no_errors
,
allow_sum_func
,
password
,
fatal_error
;
bool
query_start_used
,
last_insert_id_used
,
insert_id_used
,
user_time
;
bool
query_start_used
,
last_insert_id_used
,
insert_id_used
;
bool
volatile
killed
,
bootstrap
;
bool
system_thread
,
in_lock_tables
,
global_read_lock
;
bool
query_error
;
...
...
@@ -278,9 +278,9 @@ class THD :public ilink {
~
THD
();
bool
store_globals
();
inline
time_t
query_start
()
{
query_start_used
=
1
;
return
start_time
;
}
inline
void
set_time
()
{
if
(
!
user_time
)
time_after_lock
=
time
(
&
start_time
);
}
inline
void
end_time
()
{
if
(
!
user_time
)
time
(
&
start_time
);
}
inline
void
set_time
(
time_t
t
)
{
time_after_lock
=
start_time
=
t
;
user_time
=
1
;
}
inline
void
set_time
()
{
if
(
user_time
)
start_time
=
time_after_lock
=
user_time
;
else
time_after_lock
=
time
(
&
start_time
);
}
inline
void
end_time
()
{
time
(
&
start_time
);
}
inline
void
set_time
(
time_t
t
)
{
time_after_lock
=
start_time
=
user_time
=
t
;
}
inline
void
lock_time
()
{
time
(
&
time_after_lock
);
}
inline
void
insert_id
(
ulonglong
id
)
{
last_insert_id
=
id
;
insert_id_used
=
1
;
}
...
...
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