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
2c48e052
Commit
2c48e052
authored
Jun 23, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
fc234f2e
7cb8b935
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
28 deletions
+39
-28
Build-tools/Do-compile
Build-tools/Do-compile
+1
-1
client/mysqldump.c
client/mysqldump.c
+1
-1
configure.in
configure.in
+6
-0
sql/handler.cc
sql/handler.cc
+11
-10
sql/log.cc
sql/log.cc
+6
-6
sql/sql_prepare.cc
sql/sql_prepare.cc
+1
-1
sql/tztime.cc
sql/tztime.cc
+13
-9
No files found.
Build-tools/Do-compile
View file @
2c48e052
...
@@ -255,7 +255,7 @@ if ($opt_stage <= 1)
...
@@ -255,7 +255,7 @@ if ($opt_stage <= 1)
}
}
else
else
{
{
$opt_config_options
.=
"
--with
out-readline --with
-libedit
";
$opt_config_options
.=
"
--with-libedit
";
}
}
$opt_config_options
.=
"
--with-embedded-server
"
unless
(
$opt_without_embedded
);
$opt_config_options
.=
"
--with-embedded-server
"
unless
(
$opt_without_embedded
);
$opt_config_options
.=
"
--with-ndbcluster
"
if
(
$opt_with_cluster
);
$opt_config_options
.=
"
--with-ndbcluster
"
if
(
$opt_with_cluster
);
...
...
client/mysqldump.c
View file @
2c48e052
...
@@ -242,7 +242,7 @@ static struct my_option my_long_options[] =
...
@@ -242,7 +242,7 @@ static struct my_option my_long_options[] =
"Deprecated, use --set-charset or --skip-set-charset to enable/disable charset settings instead"
,
"Deprecated, use --set-charset or --skip-set-charset to enable/disable charset settings instead"
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"set-charset"
,
OPT_SET_CHARSET
,
{
"set-charset"
,
OPT_SET_CHARSET
,
"
'SET CHARACTER_SET_CLIENT=default_character_set' will be put in the output
"
,
"
Add 'SET NAMES default_character_set' to the output. Enabled by default; suppress with --skip-set-charset.
"
,
(
gptr
*
)
&
opt_set_charset
,
(
gptr
*
)
&
opt_set_charset
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
(
gptr
*
)
&
opt_set_charset
,
(
gptr
*
)
&
opt_set_charset
,
0
,
GET_BOOL
,
NO_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
0
,
0
},
{
"set-variable"
,
'O'
,
{
"set-variable"
,
'O'
,
...
...
configure.in
View file @
2c48e052
...
@@ -2407,6 +2407,8 @@ do
...
@@ -2407,6 +2407,8 @@ do
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
AC_DEFINE(USE_MB_IDENT)
;;
;;
binary)
;;
cp1250)
cp1250)
AC_DEFINE(HAVE_CHARSET_cp1250)
AC_DEFINE(HAVE_CHARSET_cp1250)
;;
;;
...
@@ -2533,6 +2535,10 @@ case $default_charset in
...
@@ -2533,6 +2535,10 @@ case $default_charset in
default_charset_default_collation="
big5_chinese_ci
"
default_charset_default_collation="
big5_chinese_ci
"
default_charset_collations="
big5_chinese_ci big5_bin
"
default_charset_collations="
big5_chinese_ci big5_bin
"
;;
;;
binary)
default_charset_default_collation="
binary
"
default_charset_collations="
binary
"
;;
cp1250)
cp1250)
default_charset_default_collation="
cp1250_general_ci
"
default_charset_default_collation="
cp1250_general_ci
"
default_charset_collations="
cp1250_general_ci cp1250_czech_ci cp1250_bin
"
default_charset_collations="
cp1250_general_ci cp1250_czech_ci cp1250_bin
"
...
...
sql/handler.cc
View file @
2c48e052
...
@@ -588,10 +588,11 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
...
@@ -588,10 +588,11 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
if
((
trans
==
&
thd
->
transaction
.
all
)
&&
mysql_bin_log
.
is_open
())
if
((
trans
==
&
thd
->
transaction
.
all
)
&&
mysql_bin_log
.
is_open
())
{
{
/*
/*
Update the binary log with a BEGIN/ROLLBACK block if we have cached some
Update the binary log with a BEGIN/ROLLBACK block if we have
queries and we updated some non-transactional table. Such cases should
cached some queries and we updated some non-transactional
be rare (updating a non-transactional table inside a transaction...).
table. Such cases should be rare (updating a
Count disk writes to trans_log in any case.
non-transactional table inside a transaction...). Count disk
writes to trans_log in any case.
*/
*/
if
(
my_b_tell
(
&
thd
->
transaction
.
trans_log
))
if
(
my_b_tell
(
&
thd
->
transaction
.
trans_log
))
{
{
...
@@ -636,12 +637,12 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
...
@@ -636,12 +637,12 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans)
simply truncate the binlog cache, we lose the part of the binlog cache where
simply truncate the binlog cache, we lose the part of the binlog cache where
the update is. If we want to not lose it, we need to write the SAVEPOINT
the update is. If we want to not lose it, we need to write the SAVEPOINT
command and the ROLLBACK TO SAVEPOINT command to the binlog cache. The latter
command and the ROLLBACK TO SAVEPOINT command to the binlog cache. The latter
is easy: it's just write at the end of the binlog cache, but the former
should
is easy: it's just write at the end of the binlog cache, but the former
be *inserted* to the place where the user called SAVEPOINT. The solution is
should be *inserted* to the place where the user called SAVEPOINT. The
that when the user calls SAVEPOINT, we write it to the binlog cache (so no
solution is that when the user calls SAVEPOINT, we write it to the binlog
need to later insert it). As transactions are never intermixed in the binary log
cache (so no need to later insert it). As transactions are never intermixed
(i.e. they are serialized), we won't have conflicts with savepoint names when
in the binary log (i.e. they are serialized), we won't have conflicts with
using mysqlbinlog or in the slave SQL thread.
savepoint names when
using mysqlbinlog or in the slave SQL thread.
Then when ROLLBACK TO SAVEPOINT is called, if we updated some
Then when ROLLBACK TO SAVEPOINT is called, if we updated some
non-transactional table, we don't truncate the binlog cache but instead write
non-transactional table, we don't truncate the binlog cache but instead write
ROLLBACK TO SAVEPOINT to it; otherwise we truncate the binlog cache (which
ROLLBACK TO SAVEPOINT to it; otherwise we truncate the binlog cache (which
...
...
sql/log.cc
View file @
2c48e052
...
@@ -1258,12 +1258,12 @@ bool MYSQL_LOG::write(Log_event* event_info)
...
@@ -1258,12 +1258,12 @@ bool MYSQL_LOG::write(Log_event* event_info)
{
{
char
buf
[
200
];
char
buf
[
200
];
int
written
=
my_snprintf
(
buf
,
sizeof
(
buf
)
-
1
,
int
written
=
my_snprintf
(
buf
,
sizeof
(
buf
)
-
1
,
"SET ONE_SHOT CHARACTER_SET_CLIENT=%
l
u,\
"SET ONE_SHOT CHARACTER_SET_CLIENT=%u,\
COLLATION_CONNECTION=%
lu,COLLATION_DATABASE=%lu,COLLATION_SERVER=%l
u"
,
COLLATION_CONNECTION=%
u,COLLATION_DATABASE=%u,COLLATION_SERVER=%
u"
,
thd
->
variables
.
character_set_client
->
number
,
(
uint
)
thd
->
variables
.
character_set_client
->
number
,
thd
->
variables
.
collation_connection
->
number
,
(
uint
)
thd
->
variables
.
collation_connection
->
number
,
thd
->
variables
.
collation_database
->
number
,
(
uint
)
thd
->
variables
.
collation_database
->
number
,
thd
->
variables
.
collation_server
->
number
);
(
uint
)
thd
->
variables
.
collation_server
->
number
);
Query_log_event
e
(
thd
,
buf
,
written
,
0
);
Query_log_event
e
(
thd
,
buf
,
written
,
0
);
e
.
set_log_pos
(
this
);
e
.
set_log_pos
(
this
);
if
(
e
.
write
(
file
))
if
(
e
.
write
(
file
))
...
...
sql/sql_prepare.cc
View file @
2c48e052
...
@@ -1610,7 +1610,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
...
@@ -1610,7 +1610,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
if
(
name
)
if
(
name
)
{
{
stmt
->
name
.
length
=
name
->
length
;
stmt
->
name
.
length
=
name
->
length
;
if
(
!
(
stmt
->
name
.
str
=
memdup_root
(
&
stmt
->
mem_root
,
(
byte
*
)
name
->
str
,
if
(
!
(
stmt
->
name
.
str
=
memdup_root
(
&
stmt
->
mem_root
,
(
char
*
)
name
->
str
,
name
->
length
)))
name
->
length
)))
{
{
delete
stmt
;
delete
stmt
;
...
...
sql/tztime.cc
View file @
2c48e052
...
@@ -24,13 +24,11 @@
...
@@ -24,13 +24,11 @@
#pragma implementation // gcc: Class implementation
#pragma implementation // gcc: Class implementation
#endif
#endif
#include "mysql_priv.h"
#include "mysql_priv.h"
#include "tzfile.h"
#include "tzfile.h"
#include <m_string.h>
#include <m_string.h>
#include <my_dir.h>
#include <my_dir.h>
/*
/*
Now we don't use abbreviations in server but we will do this in future.
Now we don't use abbreviations in server but we will do this in future.
*/
*/
...
@@ -53,8 +51,8 @@ typedef struct ttinfo
...
@@ -53,8 +51,8 @@ typedef struct ttinfo
uint
tt_abbrind
;
// Index of start of abbreviation for this time type.
uint
tt_abbrind
;
// Index of start of abbreviation for this time type.
#endif
#endif
/*
/*
We don't use tt_ttisstd and tt_ttisgmt members of original elsie-code
struct
We don't use tt_ttisstd and tt_ttisgmt members of original elsie-code
since we don't support POSIX-style TZ descriptions in variables.
s
truct s
ince we don't support POSIX-style TZ descriptions in variables.
*/
*/
}
TRAN_TYPE_INFO
;
}
TRAN_TYPE_INFO
;
...
@@ -1337,6 +1335,7 @@ static MEM_ROOT tz_storage;
...
@@ -1337,6 +1335,7 @@ static MEM_ROOT tz_storage;
tz_storage. So contention is low.
tz_storage. So contention is low.
*/
*/
static
pthread_mutex_t
tz_LOCK
;
static
pthread_mutex_t
tz_LOCK
;
static
bool
tz_inited
=
0
;
/*
/*
This two static variables are inteded for holding info about leap seconds
This two static variables are inteded for holding info about leap seconds
...
@@ -1410,7 +1409,6 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
...
@@ -1410,7 +1409,6 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
my_bool
return_val
=
1
;
my_bool
return_val
=
1
;
int
res
;
int
res
;
uint
not_used
;
uint
not_used
;
DBUG_ENTER
(
"my_tz_init"
);
DBUG_ENTER
(
"my_tz_init"
);
/*
/*
...
@@ -1436,6 +1434,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
...
@@ -1436,6 +1434,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
}
}
init_alloc_root
(
&
tz_storage
,
32
*
1024
,
0
);
init_alloc_root
(
&
tz_storage
,
32
*
1024
,
0
);
VOID
(
pthread_mutex_init
(
&
tz_LOCK
,
MY_MUTEX_INIT_FAST
));
VOID
(
pthread_mutex_init
(
&
tz_LOCK
,
MY_MUTEX_INIT_FAST
));
tz_inited
=
1
;
/* Add 'SYSTEM' time zone to tz_names hash */
/* Add 'SYSTEM' time zone to tz_names hash */
if
(
!
(
tmp_tzname
=
new
(
&
tz_storage
)
TZ_NAMES_ENTRY
()))
if
(
!
(
tmp_tzname
=
new
(
&
tz_storage
)
TZ_NAMES_ENTRY
()))
...
@@ -1591,12 +1590,17 @@ end:
...
@@ -1591,12 +1590,17 @@ end:
SYNOPSIS
SYNOPSIS
my_tz_free()
my_tz_free()
*/
*/
void
my_tz_free
()
void
my_tz_free
()
{
{
VOID
(
pthread_mutex_destroy
(
&
tz_LOCK
));
if
(
tz_inited
)
hash_free
(
&
offset_tzs
);
{
hash_free
(
&
tz_names
);
tz_inited
=
0
;
free_root
(
&
tz_storage
,
MYF
(
0
));
VOID
(
pthread_mutex_destroy
(
&
tz_LOCK
));
hash_free
(
&
offset_tzs
);
hash_free
(
&
tz_names
);
free_root
(
&
tz_storage
,
MYF
(
0
));
}
}
}
...
...
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