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
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
monty@donna.mysql.com
sasha@mysql.sashanet.com
sasha@mysql.sashanet.com
serg@serg.mysql.com
serg@serg.mysql.com
monty@narttu.mysql.fi
Docs/manual.texi
View file @
ca2cca8d
...
@@ -148,7 +148,8 @@ version see the relevant distribution.
...
@@ -148,7 +148,8 @@ version see the relevant distribution.
* Function Index:: SQL command, type and function index
* Function Index:: SQL command, type and function index
* Concept Index:: Concept Index
* Concept Index:: Concept Index
@detailmenu --- The Detailed Node Listing ---
@detailmenu
--- The Detailed Node Listing ---
General Information About MySQL
General Information About MySQL
...
@@ -592,7 +593,7 @@ Speed of queries that access or update data
...
@@ -592,7 +593,7 @@ Speed of queries that access or update data
MySQL Utilites
MySQL Utilites
* Programs:: What do the executables do?
* Programs:: What do the executables do?
* safe_mysqld::
safe_mysqld, the wrapper around mysqld
* safe_mysqld::
* mysql:: The command line tool
* mysql:: The command line tool
* mysqladmin:: Administering a @strong{MySQL} server
* mysqladmin:: Administering a @strong{MySQL} server
* mysqldump:: Dumping the structure and data from @strong{MySQL} databases and tables
* mysqldump:: Dumping the structure and data from @strong{MySQL} databases and tables
...
@@ -947,6 +948,7 @@ Changes in release 3.19.x
...
@@ -947,6 +948,7 @@ Changes in release 3.19.x
MySQL and the future (The TODO)
MySQL and the future (The TODO)
* TODO MySQL 4.0::
* TODO future:: Things that must done in the very near future
* TODO future:: Things that must done in the very near future
* TODO sometime:: Things that have to be done sometime
* TODO sometime:: Things that have to be done sometime
* TODO unplanned:: Some things we don't have any plans to do
* 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.
...
@@ -42925,6 +42927,7 @@ For platform-specific bugs, see the sections about compiling and porting.
@appendix MySQL and the future (The TODO)
@appendix MySQL and the future (The TODO)
@menu
@menu
* TODO MySQL 4.0:: Things that should be in 4.0
* TODO future:: Things that must done in the very near future
* TODO future:: Things that must done in the very near future
* TODO sometime:: Things that have to be done sometime
* TODO sometime:: Things that have to be done sometime
* TODO unplanned:: Some things we don't have any plans to do
* 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
...
@@ -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
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}.
tell us what you want to have done more quickly. @xref{Licensing and Support}.
@node TODO future, TODO sometime, TODO, TODO
@node TODO MySQL 4.0, TODO future, TODO, TODO
@appendixsec Things that must done in the real near future
@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
@itemize @bullet
@item
@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
@item
Optimize, test and document transactions safe tables (BDB tables)
Better replication.
@item
@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
@item
Subqueries. @code{select id from t where grp in (select grp from g where u > 100)}
Subqueries. @code{select id from t where grp in (select grp from g where u > 100)}
@item
@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,
...
@@ -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
,
do_magic
=
((
log_type
==
LOG_BIN
)
&&
!
my_stat
(
log_file_name
,
&
tmp_stat
,
MYF
(
0
)));
&
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
||
MYF
(
MY_WME
|
ME_WAITTANG
)))
<
0
||
init_io_cache
(
&
log_file
,
file
,
IO_SIZE
,
WRITE_CACHE
,
init_io_cache
(
&
log_file
,
file
,
IO_SIZE
,
WRITE_CACHE
,
my_tell
(
file
,
MYF
(
MY_WME
)),
0
,
MYF
(
MY_WME
|
MY_NABP
)))
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,
...
@@ -194,30 +194,39 @@ void MYSQL_LOG::open(const char *log_name, enum_log_type log_type_arg,
}
}
else
if
(
log_type
==
LOG_BIN
)
else
if
(
log_type
==
LOG_BIN
)
{
{
/
/ Explanation of the boolean black magic:
/
*
//
Explanation of the boolean black magic:
//
if we are supposed to write magic number try write
if we are supposed to write magic number try write
//
clean up if failed
clean up if failed
//
then if index_file has not been previously opened, try to open it
then if index_file has not been previously opened, try to open it
//
clean up if failed
clean up if failed
*/
if
((
do_magic
&&
my_b_write
(
&
log_file
,
(
byte
*
)
BINLOG_MAGIC
,
4
))
||
if
((
do_magic
&&
my_b_write
(
&
log_file
,
(
byte
*
)
BINLOG_MAGIC
,
4
))
||
(
index_file
<
0
&&
(
index_file
<
0
&&
(
index_file
=
my_open
(
index_file_name
,
(
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
))
MYF
(
MY_WME
)))
<
0
))
goto
err
;
goto
err
;
Start_log_event
s
;
Start_log_event
s
;
bool
error
;
s
.
write
(
&
log_file
);
s
.
write
(
&
log_file
);
flush_io_cache
(
&
log_file
);
flush_io_cache
(
&
log_file
);
pthread_mutex_lock
(
&
LOCK_index
);
pthread_mutex_lock
(
&
LOCK_index
);
my_write
(
index_file
,
log_file_name
,
strlen
(
log_file_name
),
MYF
(
0
));
error
=
(
my_write
(
index_file
,
log_file_name
,
strlen
(
log_file_name
),
my_write
(
index_file
,
"
\n
"
,
1
,
MYF
(
0
));
MYF
(
MY_NABP
|
MY_WME
))
||
my_write
(
index_file
,
"
\n
"
,
1
,
MYF
(
MY_NABP
|
MY_WME
)));
pthread_mutex_unlock
(
&
LOCK_index
);
pthread_mutex_unlock
(
&
LOCK_index
);
if
(
error
)
{
my_close
(
index_file
,
MYF
(
0
));
index_file
=
-
1
;
goto
err
;
}
}
}
return
;
return
;
err:
err:
sql_print_error
(
"Could not use %s for logging (error %d)"
,
log_name
,
errno
);
if
(
file
>=
0
)
if
(
file
>=
0
)
my_close
(
file
,
MYF
(
0
));
my_close
(
file
,
MYF
(
0
));
end_io_cache
(
&
log_file
);
end_io_cache
(
&
log_file
);
...
@@ -411,7 +420,7 @@ int MYSQL_LOG::purge_logs(THD* thd, const char* to_log)
...
@@ -411,7 +420,7 @@ int MYSQL_LOG::purge_logs(THD* thd, const char* to_log)
#ifdef HAVE_FTRUNCATE
#ifdef HAVE_FTRUNCATE
if
(
ftruncate
(
index_file
,
0
))
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"
);
during log purge for write"
);
error
=
LOG_INFO_FATAL
;
error
=
LOG_INFO_FATAL
;
goto
err
;
goto
err
;
...
@@ -421,10 +430,10 @@ during log purge for write");
...
@@ -421,10 +430,10 @@ during log purge for write");
my_close
(
index_file
,
MYF
(
MY_WME
));
my_close
(
index_file
,
MYF
(
MY_WME
));
my_delete
(
index_file_name
,
MYF
(
MY_WME
));
my_delete
(
index_file_name
,
MYF
(
MY_WME
));
if
(
!
(
index_file
=
my_open
(
index_file_name
,
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
))))
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"
);
during log purge for write"
);
error
=
LOG_INFO_FATAL
;
error
=
LOG_INFO_FATAL
;
goto
err
;
goto
err
;
...
...
sql/mysqld.cc
View file @
ca2cca8d
...
@@ -2313,7 +2313,7 @@ static struct option long_options[] = {
...
@@ -2313,7 +2313,7 @@ static struct option long_options[] = {
(
int
)
OPT_REPLICATE_REWRITE_DB
},
(
int
)
OPT_REPLICATE_REWRITE_DB
},
{
"safe-mode"
,
no_argument
,
0
,
(
int
)
OPT_SAFE
},
{
"safe-mode"
,
no_argument
,
0
,
(
int
)
OPT_SAFE
},
{
"socket"
,
required_argument
,
0
,
(
int
)
OPT_SOCKET
},
{
"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'
},
{
"set-variable"
,
required_argument
,
0
,
'O'
},
#ifdef HAVE_BERKELEY_DB
#ifdef HAVE_BERKELEY_DB
{
"skip-bdb"
,
no_argument
,
0
,
(
int
)
OPT_BDB_SKIP
},
{
"skip-bdb"
,
no_argument
,
0
,
(
int
)
OPT_BDB_SKIP
},
...
...
sql/sql_class.cc
View file @
ca2cca8d
...
@@ -115,7 +115,7 @@ THD::THD()
...
@@ -115,7 +115,7 @@ THD::THD()
ull
=
0
;
ull
=
0
;
system_thread
=
0
;
system_thread
=
0
;
bzero
((
char
*
)
&
mem_root
,
sizeof
(
mem_root
));
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
,
if
(
open_cached_file
(
&
transactions
.
trans_log
,
mysql_tempdir
,
LOG_PREFIX
,
0
,
MYF
(
MY_WME
)))
mysql_tempdir
,
LOG_PREFIX
,
0
,
MYF
(
MY_WME
)))
killed
=
1
;
killed
=
1
;
...
@@ -144,7 +144,7 @@ THD::~THD()
...
@@ -144,7 +144,7 @@ THD::~THD()
close_thread_tables
(
this
);
close_thread_tables
(
this
);
}
}
close_temporary_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
);
close_cached_file
(
transactions
.
trans_log
);
#endif
#endif
if
(
global_read_lock
)
if
(
global_read_lock
)
...
...
sql/sql_class.h
View file @
ca2cca8d
...
@@ -238,7 +238,7 @@ public:
...
@@ -238,7 +238,7 @@ public:
const
char
*
where
;
const
char
*
where
;
char
*
last_nx_table
;
// last non-existent table, we need this for replication
char
*
last_nx_table
;
// last non-existent table, we need this for replication
char
*
last_nx_db
;
// database of the last nx table
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
time_t
connect_time
,
thr_create_time
;
// track down slow pthread_create
thr_lock_type
update_lock_default
;
thr_lock_type
update_lock_default
;
delayed_insert
*
di
;
delayed_insert
*
di
;
...
@@ -266,7 +266,7 @@ public:
...
@@ -266,7 +266,7 @@ public:
char
scramble
[
9
];
char
scramble
[
9
];
bool
set_query_id
,
locked
,
count_cuted_fields
,
some_tables_deleted
;
bool
set_query_id
,
locked
,
count_cuted_fields
,
some_tables_deleted
;
bool
no_errors
,
allow_sum_func
,
password
,
fatal_error
;
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
volatile
killed
,
bootstrap
;
bool
system_thread
,
in_lock_tables
,
global_read_lock
;
bool
system_thread
,
in_lock_tables
,
global_read_lock
;
bool
query_error
;
bool
query_error
;
...
@@ -278,9 +278,9 @@ public:
...
@@ -278,9 +278,9 @@ public:
~
THD
();
~
THD
();
bool
store_globals
();
bool
store_globals
();
inline
time_t
query_start
()
{
query_start_used
=
1
;
return
start_time
;
}
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
set_time
()
{
if
(
user_time
)
start_time
=
time_after_lock
=
user_time
;
else
time_after_lock
=
time
(
&
start_time
);
}
inline
void
end_time
()
{
if
(
!
user_time
)
time
(
&
start_time
);
}
inline
void
end_time
()
{
time
(
&
start_time
);
}
inline
void
set_time
(
time_t
t
)
{
time_after_lock
=
start_time
=
t
;
user_time
=
1
;
}
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
lock_time
()
{
time
(
&
time_after_lock
);
}
inline
void
insert_id
(
ulonglong
id
)
inline
void
insert_id
(
ulonglong
id
)
{
last_insert_id
=
id
;
insert_id_used
=
1
;
}
{
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