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
0d4770c7
Commit
0d4770c7
authored
Oct 25, 2002
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
parents
7acf036d
dede6634
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
159 additions
and
11 deletions
+159
-11
BitKeeper/etc/gone
BitKeeper/etc/gone
+38
-0
Docs/manual.texi
Docs/manual.texi
+2
-0
innobase/pars/lexyy.c
innobase/pars/lexyy.c
+8
-1
innobase/pars/pars0grm.c
innobase/pars/pars0grm.c
+2
-0
mysql-test/t/bdb-crash.test
mysql-test/t/bdb-crash.test
+1
-0
mysys/my_init.c
mysys/my_init.c
+1
-1
scripts/mysql_convert_table_format.sh
scripts/mysql_convert_table_format.sh
+1
-1
scripts/mysqlhotcopy.sh
scripts/mysqlhotcopy.sh
+3
-3
sql/nt_servc.cc
sql/nt_servc.cc
+90
-1
sql/nt_servc.h
sql/nt_servc.h
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+1
-0
sql/sql_table.cc
sql/sql_table.cc
+11
-3
No files found.
BitKeeper/etc/gone
View file @
0d4770c7
This diff is collapsed.
Click to expand it.
Docs/manual.texi
View file @
0d4770c7
...
@@ -51680,6 +51680,8 @@ not yet 100% confident in this code.
...
@@ -51680,6 +51680,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.54
@appendixsubsec Changes in release 3.23.54
@itemize
@itemize
@item
@item
Fixed a problem with BDB and @code{ALTER TABLE}.
@item
Fixed reference to freed memory when doing complicated @code{GROUP BY
Fixed reference to freed memory when doing complicated @code{GROUP BY
... ORDER BY} queries. Symptom was that @code{mysqld} died in function
... ORDER BY} queries. Symptom was that @code{mysqld} died in function
@code{send_fields}.
@code{send_fields}.
innobase/pars/lexyy.c
View file @
0d4770c7
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
*/
*/
#include "univ.i"
#define FLEX_SCANNER
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_MINOR_VERSION 5
...
@@ -607,13 +609,18 @@ How to make the InnoDB parser and lexer C files:
...
@@ -607,13 +609,18 @@ How to make the InnoDB parser and lexer C files:
6. Remove the #include of unistd.h from about line 2500 of lexyy.c
6. Remove the #include of unistd.h from about line 2500 of lexyy.c
7. Move #include <math.h> in pars0grm.c after #include "univ.i" to remove
a large file compilation error on AIX.
8. Move #include "univ.i" in lexyy.c to the file start to remove a large
file compilation error on AIX.
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux.
Linux.
*******************************************************/
*******************************************************/
#line 36 "pars0lex.l"
#line 36 "pars0lex.l"
#define YYSTYPE que_node_t*
#define YYSTYPE que_node_t*
#include "univ.i"
#include "pars0pars.h"
#include "pars0pars.h"
#include "pars0grm.h"
#include "pars0grm.h"
#include "pars0sym.h"
#include "pars0sym.h"
...
...
innobase/pars/pars0grm.c
View file @
0d4770c7
...
@@ -102,6 +102,8 @@ que_node_t */
...
@@ -102,6 +102,8 @@ que_node_t */
#include "que0que.h"
#include "que0que.h"
#include "row0sel.h"
#include "row0sel.h"
#include <math.h>
#define YYSTYPE que_node_t*
#define YYSTYPE que_node_t*
/* #define __STDC__ */
/* #define __STDC__ */
...
...
mysql-test/t/bdb-crash.test
View file @
0d4770c7
--
source
include
/
have_bdb
.
inc
--
source
include
/
have_bdb
.
inc
# test for bug reported by Mark Steele
# test for bug reported by Mark Steele
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
...
...
mysys/my_init.c
View file @
0d4770c7
...
@@ -245,7 +245,7 @@ static void my_win_init(void)
...
@@ -245,7 +245,7 @@ static void my_win_init(void)
/* Inserisce i dati come variabili d'ambiente */
/* Inserisce i dati come variabili d'ambiente */
my_env
=
strdup
(
EnvString
);
/* variable for putenv must be allocated ! */
my_env
=
strdup
(
EnvString
);
/* variable for putenv must be allocated ! */
putenv
(
EnvString
)
;
putenv
(
my_env
)
;
dimNameValueBuffer
=
dimName
;
dimNameValueBuffer
=
dimName
;
dimDataValueBuffer
=
dimData
;
dimDataValueBuffer
=
dimData
;
...
...
scripts/mysql_convert_table_format.sh
View file @
0d4770c7
...
@@ -64,7 +64,7 @@ foreach $table (@ARGV)
...
@@ -64,7 +64,7 @@ foreach $table (@ARGV)
{
{
if
(
uc
(
$row
->[1]
)
eq uc
(
$opt_type
))
if
(
uc
(
$row
->[1]
)
eq uc
(
$opt_type
))
{
{
print
"
$table
is alread of type
$opt_type
; Ignored
\n
"
;
print
"
$table
is alread
y
of type
$opt_type
; Ignored
\n
"
;
next
;
next
;
}
}
}
}
...
...
scripts/mysqlhotcopy.sh
View file @
0d4770c7
...
@@ -559,15 +559,15 @@ sub copy_files {
...
@@ -559,15 +559,15 @@ sub copy_files {
my @cp
=
(
$method
)
;
my @cp
=
(
$method
)
;
# add option to preserve mod time etc of copied files
# add option to preserve mod time etc of copied files
# not critical, but nice to have
# not critical, but nice to have
push @cp,
"-p"
if
$^
O
=
~ m/^
(
solaris|linux|freebsd
)
$/
;
push @cp,
"-p"
if
$^
O
=
~ m/^
(
solaris|linux|freebsd
|darwin
)
$/
;
# add recursive option for scp
# add recursive option for scp
push @cp,
"-r"
if
$^
O
=
~ /m^
(
solaris|linux|freebsd
)
$/
&&
$method
=
~ /^scp
\b
/
;
push @cp,
"-r"
if
$^
O
=
~ /m^
(
solaris|linux|freebsd
|darwin
)
$/
&&
$method
=
~ /^scp
\b
/
;
my @non_raid
=
map
{
"'
$_
'"
}
grep
{
!
m:/
\d
{
2
}
/[^/]+
$:
}
@
$files
;
my @non_raid
=
map
{
"'
$_
'"
}
grep
{
!
m:/
\d
{
2
}
/[^/]+
$:
}
@
$files
;
# add files to copy and the destination directory
# add files to copy and the destination directory
+
safe_system
(
@cp, @non_raid,
"'
$target
'"
)
;
safe_system
(
@cp, @non_raid,
"'
$target
'"
)
;
foreach my
$rd
(
@
$raid_dirs
)
{
foreach my
$rd
(
@
$raid_dirs
)
{
my @raid
=
map
{
"'
$_
'"
}
grep
{
m:
$rd
/:
}
@
$files
;
my @raid
=
map
{
"'
$_
'"
}
grep
{
m:
$rd
/:
}
@
$files
;
...
...
sql/nt_servc.cc
View file @
0d4770c7
...
@@ -426,7 +426,17 @@ BOOL NTService::SeekStatus(LPCSTR szInternName, int OperationType)
...
@@ -426,7 +426,17 @@ BOOL NTService::SeekStatus(LPCSTR szInternName, int OperationType)
// open a connection to the SCM
// open a connection to the SCM
if
(
!
(
scm
=
OpenSCManager
(
0
,
0
,
SC_MANAGER_CREATE_SERVICE
)))
if
(
!
(
scm
=
OpenSCManager
(
0
,
0
,
SC_MANAGER_CREATE_SERVICE
)))
printf
(
"There is a problem with the Service Control Manager!
\n
"
);
{
DWORD
ret_error
=
GetLastError
();
if
(
ret_error
==
ERROR_ACCESS_DENIED
)
{
printf
(
"Install/Remove of the Service Denied!
\n
"
);
if
(
!
is_super_user
())
printf
(
"That operation should be made by an user with Administrator privileges!
\n
"
);
}
else
printf
(
"There is a problem for to open the Service Control Manager!
\n
"
);
}
else
else
{
{
if
(
OperationType
==
1
)
if
(
OperationType
==
1
)
...
@@ -507,3 +517,82 @@ BOOL NTService::got_service_option(char **argv, char *service_option)
...
@@ -507,3 +517,82 @@ BOOL NTService::got_service_option(char **argv, char *service_option)
return
TRUE
;
return
TRUE
;
return
FALSE
;
return
FALSE
;
}
}
/* ------------------------------------------------------------------------
-------------------------------------------------------------------------- */
BOOL
NTService
::
is_super_user
()
{
HANDLE
hAccessToken
;
UCHAR
InfoBuffer
[
1024
];
PTOKEN_GROUPS
ptgGroups
=
(
PTOKEN_GROUPS
)
InfoBuffer
;
DWORD
dwInfoBufferSize
;
PSID
psidAdministrators
;
SID_IDENTIFIER_AUTHORITY
siaNtAuthority
=
SECURITY_NT_AUTHORITY
;
UINT
x
;
BOOL
ret_value
=
FALSE
;
if
(
!
OpenThreadToken
(
GetCurrentThread
(),
TOKEN_QUERY
,
TRUE
,
&
hAccessToken
))
{
if
(
GetLastError
()
!=
ERROR_NO_TOKEN
)
return
FALSE
;
if
(
!
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
hAccessToken
))
return
FALSE
;
}
ret_value
=
GetTokenInformation
(
hAccessToken
,
TokenGroups
,
InfoBuffer
,
1024
,
&
dwInfoBufferSize
);
CloseHandle
(
hAccessToken
);
if
(
!
ret_value
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
siaNtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
psidAdministrators
))
return
FALSE
;
ret_value
=
FALSE
;
for
(
x
=
0
;
x
<
ptgGroups
->
GroupCount
;
x
++
)
{
if
(
EqualSid
(
psidAdministrators
,
ptgGroups
->
Groups
[
x
].
Sid
)
)
{
ret_value
=
TRUE
;
break
;
}
}
FreeSid
(
psidAdministrators
);
return
ret_value
;
}
/* ------------------------------------------------------------------------
-------------------------------------------------------------------------- */
BOOL
NTService
::
IsService
(
LPCSTR
ServiceName
)
{
BOOL
ret_value
=
FALSE
;
SC_HANDLE
service
,
scm
;
if
(
scm
=
OpenSCManager
(
0
,
0
,
SC_MANAGER_ENUMERATE_SERVICE
))
{
if
((
service
=
OpenService
(
scm
,
ServiceName
,
SERVICE_ALL_ACCESS
)))
{
ret_value
=
TRUE
;
CloseServiceHandle
(
service
);
}
CloseServiceHandle
(
scm
);
}
return
ret_value
;
}
/* ------------------------------------------------------------------------
-------------------------------------------------------------------------- */
BOOL
NTService
::
got_service_option
(
char
**
argv
,
char
*
service_option
)
{
char
*
option
;
for
(
option
=
argv
[
1
];
*
option
;
option
++
)
if
(
!
strcmp
(
option
,
service_option
))
return
TRUE
;
return
FALSE
;
}
sql/nt_servc.h
View file @
0d4770c7
...
@@ -54,7 +54,7 @@ class NTService
...
@@ -54,7 +54,7 @@ class NTService
BOOL
Remove
(
LPCSTR
szInternName
);
BOOL
Remove
(
LPCSTR
szInternName
);
BOOL
IsService
(
LPCSTR
ServiceName
);
BOOL
IsService
(
LPCSTR
ServiceName
);
BOOL
got_service_option
(
char
**
argv
,
char
*
service_option
);
BOOL
got_service_option
(
char
**
argv
,
char
*
service_option
);
BOOL
is_super_user
();
void
Stop
(
void
);
//to be called from app. to stop service
void
Stop
(
void
);
//to be called from app. to stop service
protected:
protected:
...
...
sql/sql_base.cc
View file @
0d4770c7
...
@@ -1529,6 +1529,7 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
...
@@ -1529,6 +1529,7 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
ha_open_options
,
ha_open_options
,
tmp_table
))
tmp_table
))
{
{
my_free
((
char
*
)
tmp_table
,
MYF
(
0
));
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
...
sql/sql_table.cc
View file @
0d4770c7
...
@@ -1910,16 +1910,24 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -1910,16 +1910,24 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
#ifdef HAVE_BERKELEY_DB
#ifdef HAVE_BERKELEY_DB
if
(
old_db_type
==
DB_TYPE_BERKELEY_DB
)
if
(
old_db_type
==
DB_TYPE_BERKELEY_DB
)
{
{
(
void
)
berkeley_flush_logs
();
/*
/*
For the alter table to be properly flushed to the logs, we
For the alter table to be properly flushed to the logs, we
have to open the new table. If not, we get a problem on server
have to open the new table. If not, we get a problem on server
shutdown.
shutdown.
*/
*/
if
(
!
open_tables
(
thd
,
table_list
))
// Should always succeed
char
path
[
FN_REFLEN
];
(
void
)
sprintf
(
path
,
"%s/%s/%s"
,
mysql_data_home
,
new_db
,
table_name
);
fn_format
(
path
,
path
,
""
,
""
,
4
);
table
=
open_temporary_table
(
thd
,
path
,
new_db
,
tmp_name
,
0
);
if
(
table
)
{
{
close_thread_table
(
thd
,
&
table_list
->
table
);
intern_close_table
(
table
);
my_free
((
char
*
)
table
,
MYF
(
0
));
}
}
else
sql_print_error
(
"Warning: Could not open BDB table %s.%s after rename
\n
"
,
new_db
,
table_name
);
(
void
)
berkeley_flush_logs
();
}
}
#endif
#endif
table_list
->
table
=
0
;
// For query cache
table_list
->
table
=
0
;
// For query cache
...
...
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