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
ef8d161d
Commit
ef8d161d
authored
Jun 01, 2001
by
monty@work.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
04aeee5d
23e031f2
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
472 additions
and
315 deletions
+472
-315
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
Docs/manual.texi
Docs/manual.texi
+158
-31
include/my_sys.h
include/my_sys.h
+1
-1
libmysql/errmsg.c
libmysql/errmsg.c
+30
-1
myisam/mi_check.c
myisam/mi_check.c
+3
-1
mysys/my_copy.c
mysys/my_copy.c
+2
-2
mysys/my_static.c
mysys/my_static.c
+1
-0
mysys/my_symlink2.c
mysys/my_symlink2.c
+4
-2
sql/mysqld.cc
sql/mysqld.cc
+6
-1
sql/net_pkg.cc
sql/net_pkg.cc
+1
-1
sql/share/portuguese/errmsg.txt
sql/share/portuguese/errmsg.txt
+198
-198
sql/slave.cc
sql/slave.cc
+59
-59
sql/sql_parse.cc
sql/sql_parse.cc
+2
-12
sql/sql_table.cc
sql/sql_table.cc
+6
-6
No files found.
BitKeeper/etc/logging_ok
View file @
ef8d161d
...
...
@@ -3,5 +3,6 @@ jani@janikt.pp.saunalahti.fi
monty@hundin.mysql.fi
monty@work.mysql.com
mwagner@evoq.mwagner.org
paul@central.snake.net
sasha@mysql.sashanet.com
tonu@hundin.mysql.fi
Docs/manual.texi
View file @
ef8d161d
This diff is collapsed.
Click to expand it.
include/my_sys.h
View file @
ef8d161d
...
...
@@ -209,7 +209,7 @@ extern long lCurMemory,lMaxMemory; /* from safemalloc */
extern
ulong
my_default_record_cache_size
;
extern
my_bool
NEAR
my_disable_locking
,
NEAR
my_disable_async_io
,
NEAR
my_disable_flush_key_bloc
ks
;
NEAR
my_disable_flush_key_blocks
,
NEAR
my_disable_symlin
ks
;
extern
char
wild_many
,
wild_one
,
wild_prefix
;
extern
const
char
*
charsets_dir
;
extern
char
*
defaults_extra_file
;
...
...
libmysql/errmsg.c
View file @
ef8d161d
...
...
@@ -49,6 +49,35 @@ const char *client_errors[]=
"Embedded server"
,
};
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
#elif defined PORTUGUESE
const
char
*
client_errors
[]
=
{
"Erro desconhecido do MySQL"
,
"No pode criar 'UNIX socket' (%d)"
,
"No pode se conectar ao servidor MySQL local atravs do 'socket' '%-.64s' (%d)"
,
"No pode se conectar ao servidor MySQL em '%-.64s' (%d)"
,
"No pode criar 'socket TCP/IP' (%d)"
,
"'Host' servidor MySQL '%-.64s' (%d) desconhecido"
,
"Servidor MySQL desapareceu"
,
"Incompatibilidade de protocolos. Verso do Servidor: %d - Verso do Cliente: %d"
,
"Cliente do MySQL com falta de memria"
,
"Informao invlida de 'host'"
,
"Localhost via 'UNIX socket'"
,
"%-.64s via 'TCP/IP'"
,
"Erro na negociao de acesso ao servidor"
,
"Conexo perdida com servidor MySQL durante 'query'"
,
"Comandos fora de sincronismo. Voc no pode executar este comando agora"
,
"%-.64s via 'named pipe'"
,
"No pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)"
,
"No pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)"
,
"No pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)"
,
"No pode inicializar conjunto de caracteres %-.64s (caminho %-.64s)"
,
"Obteve pacote maior do que 'max_allowed_packet'"
,
"Embedded server"
};
#else
/* ENGLISH */
const
char
*
client_errors
[]
=
{
...
...
@@ -73,7 +102,7 @@ const char *client_errors[]=
"Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)"
,
"Can't initialize character set %-.64s (path: %-.64s)"
,
"Got packet bigger than 'max_allowed_packet'"
,
"Embedded server"
,
"Embedded server"
};
#endif
...
...
myisam/mi_check.c
View file @
ef8d161d
...
...
@@ -117,7 +117,9 @@ int chk_status(MI_CHECK *param, register MI_INFO *info)
mi_check_print_warning
(
param
,
"%d clients is using or hasn't closed the table properly"
,
share
->
state
.
open_count
);
param
->
warning_printed
=
save
;
/* If this will be fixed by the check, forget the warning */
if
(
param
->
testflag
&
T_UPDATE_STATE
)
param
->
warning_printed
=
save
;
}
return
0
;
}
...
...
mysys/my_copy.c
View file @
ef8d161d
...
...
@@ -54,7 +54,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if
(
MyFlags
&
MY_HOLD_ORIGINAL_MODES
)
/* Copy stat if possible */
new_file_stat
=
stat
((
char
*
)
to
,
&
new_stat_buff
);
if
((
from_file
=
my_open
(
from
,
O_RDONLY
,
MyFlags
))
>=
0
)
if
((
from_file
=
my_open
(
from
,
O_RDONLY
|
O_SHARE
,
MyFlags
))
>=
0
)
{
if
(
stat
(
from
,
&
stat_buff
))
{
...
...
@@ -64,7 +64,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if
(
MyFlags
&
MY_HOLD_ORIGINAL_MODES
&&
!
new_file_stat
)
stat_buff
=
new_stat_buff
;
if
((
to_file
=
my_create
(
to
,(
int
)
stat_buff
.
st_mode
,
O_WRONLY
|
O_TRUNC
|
O_BINARY
,
O_WRONLY
|
O_TRUNC
|
O_BINARY
|
O_SHARE
,
MyFlags
))
<
0
)
goto
err
;
...
...
mysys/my_static.c
View file @
ef8d161d
...
...
@@ -97,4 +97,5 @@ int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)=
my_bool
NEAR
my_disable_locking
=
0
;
my_bool
NEAR
my_disable_async_io
=
0
;
my_bool
NEAR
my_disable_flush_key_blocks
=
0
;
my_bool
NEAR
my_disable_symlinks
=
0
;
my_bool
NEAR
mysys_uses_curses
=
0
;
mysys/my_symlink2.c
View file @
ef8d161d
...
...
@@ -62,7 +62,8 @@ File my_create_with_symlink(const char *linkname, const char *filename,
int
my_delete_with_symlink
(
const
char
*
name
,
myf
MyFlags
)
{
char
link_name
[
FN_REFLEN
];
int
was_symlink
=
!
my_readlink
(
link_name
,
name
,
MYF
(
0
));
int
was_symlink
=
(
!
my_disable_symlinks
&&
!
my_readlink
(
link_name
,
name
,
MYF
(
0
)));
int
result
;
DBUG_ENTER
(
"my_delete_with_symlink"
);
...
...
@@ -90,7 +91,8 @@ int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
return
my_rename
(
from
,
to
,
MyFlags
);
#else
char
link_name
[
FN_REFLEN
],
tmp_name
[
FN_REFLEN
];
int
was_symlink
=
!
my_readlink
(
link_name
,
name
,
MYF
(
0
));
int
was_symlink
=
(
!
my_disable_symlinks
&&
!
my_readlink
(
link_name
,
name
,
MYF
(
0
)));
int
result
;
DBUG_ENTER
(
"my_rename_with_symlink"
);
...
...
sql/mysqld.cc
View file @
ef8d161d
...
...
@@ -2484,7 +2484,7 @@ enum options {
OPT_TEMP_POOL
,
OPT_DO_PSTACK
,
OPT_TX_ISOLATION
,
OPT_GEMINI_FLUSH_LOG
,
OPT_GEMINI_RECOVER
,
OPT_GEMINI_UNBUFFERED_IO
,
OPT_SKIP_SAFEMALLOC
,
OPT_SKIP_STACK_TRACE
,
OPT_REPORT_HOST
,
OPT_SKIP_STACK_TRACE
,
OPT_
SKIP_SYMLINKS
,
OPT_
REPORT_HOST
,
OPT_REPORT_USER
,
OPT_REPORT_PASSWORD
,
OPT_REPORT_PORT
};
...
...
@@ -2619,6 +2619,7 @@ static struct option long_options[] = {
{
"skip-show-database"
,
no_argument
,
0
,
(
int
)
OPT_SKIP_SHOW_DB
},
{
"skip-slave-start"
,
no_argument
,
0
,
(
int
)
OPT_SKIP_SLAVE_START
},
{
"skip-stack-trace"
,
no_argument
,
0
,
(
int
)
OPT_SKIP_STACK_TRACE
},
{
"skip-symlinks"
,
no_argument
,
0
,
(
int
)
OPT_SKIP_SYMLINKS
},
{
"skip-thread-priority"
,
no_argument
,
0
,
(
int
)
OPT_SKIP_PRIOR
},
{
"sql-bin-update-same"
,
no_argument
,
0
,
(
int
)
OPT_SQL_BIN_UPDATE_SAME
},
#include "sslopt-longopts.h"
...
...
@@ -3445,6 +3446,7 @@ static void get_options(int argc,char **argv)
myisam_delay_key_write
=
0
;
myisam_concurrent_insert
=
0
;
myisam_recover_options
=
HA_RECOVER_NONE
;
my_disable_symlinks
=
1
;
ha_open_options
&=
~
HA_OPEN_ABORT_IF_CRASHED
;
break
;
case
(
int
)
OPT_SAFE
:
...
...
@@ -3501,6 +3503,9 @@ static void get_options(int argc,char **argv)
case
(
int
)
OPT_SKIP_STACK_TRACE
:
test_flags
|=
TEST_NO_STACKTRACE
;
break
;
case
(
int
)
OPT_SKIP_SYMLINKS
:
my_disable_symlinks
=
1
;
break
;
case
(
int
)
OPT_BIND_ADDRESS
:
if
(
optarg
&&
isdigit
(
optarg
[
0
]))
{
...
...
sql/net_pkg.cc
View file @
ef8d161d
...
...
@@ -140,7 +140,7 @@ net_printf(NET *net, uint errcode, ...)
void
send_ok
(
NET
*
net
,
ha_rows
affected_rows
,
ulonglong
id
,
const
char
*
message
)
{
if
(
net
->
no_send_ok
)
if
(
net
->
no_send_ok
)
// hack for re-parsing queries
return
;
char
buff
[
MYSQL_ERRMSG_SIZE
+
10
],
*
pos
;
...
...
sql/share/portuguese/errmsg.txt
View file @
ef8d161d
This diff is collapsed.
Click to expand it.
sql/slave.cc
View file @
ef8d161d
...
...
@@ -315,28 +315,31 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
const
char
*
table_name
)
{
uint
packet_len
=
my_net_read
(
net
);
// read create table statement
Vio
*
save_vio
;
HA_CHECK_OPT
check_opt
;
TABLE_LIST
tables
;
int
error
=
0
;
int
error
=
1
;
handler
*
file
;
if
(
packet_len
==
packet_error
)
{
send_error
(
&
thd
->
net
,
ER_MASTER_NET_READ
);
return
1
;
}
if
(
net
->
read_pos
[
0
]
==
255
)
// error from master
{
net
->
read_pos
[
packet_len
]
=
0
;
net_printf
(
&
thd
->
net
,
ER_MASTER
,
net
->
read_pos
+
3
);
return
1
;
}
if
(
packet_len
==
packet_error
)
{
send_error
(
&
thd
->
net
,
ER_MASTER_NET_READ
);
return
1
;
}
if
(
net
->
read_pos
[
0
]
==
255
)
// error from master
{
net
->
read_pos
[
packet_len
]
=
0
;
net_printf
(
&
thd
->
net
,
ER_MASTER
,
net
->
read_pos
+
3
);
return
1
;
}
thd
->
command
=
COM_TABLE_DUMP
;
thd
->
query
=
sql_alloc
(
packet_len
+
1
);
if
(
!
thd
->
query
)
{
sql_print_error
(
"create_table_from_dump: out of memory"
);
net_printf
(
&
thd
->
net
,
ER_GET_ERRNO
,
"Out of memory"
);
return
1
;
}
if
(
!
thd
->
query
)
{
sql_print_error
(
"create_table_from_dump: out of memory"
);
net_printf
(
&
thd
->
net
,
ER_GET_ERRNO
,
"Out of memory"
);
return
1
;
}
memcpy
(
thd
->
query
,
net
->
read_pos
,
packet_len
);
thd
->
query
[
packet_len
]
=
0
;
thd
->
current_tablenr
=
0
;
...
...
@@ -347,13 +350,10 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
char
*
save_db
=
thd
->
db
;
thd
->
db
=
(
char
*
)
db
;
mysql_parse
(
thd
,
thd
->
query
,
packet_len
);
// run create table
thd
->
db
=
save_db
;
// leave things the way the were before
thd
->
db
=
save_db
;
// leave things the way the were before
if
(
thd
->
query_error
)
{
close_thread_tables
(
thd
);
// mysql_parse takes care of the error send
return
1
;
}
if
(
thd
->
query_error
)
goto
err
;
// mysql_parse took care of the error send
bzero
((
char
*
)
&
tables
,
sizeof
(
tables
));
tables
.
db
=
(
char
*
)
db
;
...
...
@@ -362,41 +362,37 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,
thd
->
proc_info
=
"Opening master dump table"
;
if
(
!
open_ltable
(
thd
,
&
tables
,
TL_WRITE
))
{
// open tables will send the error
send_error
(
&
thd
->
net
,
0
,
0
);
// Send error from open_ltable
sql_print_error
(
"create_table_from_dump: could not open created table"
);
close_thread_tables
(
thd
);
return
1
;
goto
err
;
}
handler
*
file
=
tables
.
table
->
file
;
file
=
tables
.
table
->
file
;
thd
->
proc_info
=
"Reading master dump table data"
;
if
(
file
->
net_read_dump
(
net
))
{
net_printf
(
&
thd
->
net
,
ER_MASTER_NET_READ
);
sql_print_error
(
"create_table_from_dump::failed in\
handler::net_read_dump()"
);
close_thread_tables
(
thd
);
return
1
;
goto
err
;
}
HA_CHECK_OPT
check_opt
;
check_opt
.
init
();
check_opt
.
flags
|=
T_VERY_SILENT
;
check_opt
.
quick
=
1
;
thd
->
proc_info
=
"Rebuilding the index on master dump table"
;
Vio
*
save_vio
=
thd
->
net
.
vio
;
// we do not want repair() to spam us with messages
// just send them to the error log, and report the failure in case of
// problems
save_vio
=
thd
->
net
.
vio
;
thd
->
net
.
vio
=
0
;
if
(
file
->
repair
(
thd
,
&
check_opt
))
{
net_printf
(
&
thd
->
net
,
ER_INDEX_REBUILD
,
tables
.
table
->
real_name
);
error
=
1
;
}
error
=
file
->
repair
(
thd
,
&
check_opt
)
!=
0
;
thd
->
net
.
vio
=
save_vio
;
if
(
error
)
net_printf
(
&
thd
->
net
,
ER_INDEX_REBUILD
,
tables
.
table
->
real_name
);
err:
close_thread_tables
(
thd
);
thd
->
net
.
no_send_ok
=
0
;
return
error
;
}
...
...
@@ -407,16 +403,16 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
int
error
=
1
;
int
nx_errno
=
0
;
bool
called_connected
=
(
mysql
!=
NULL
);
if
(
!
called_connected
&&
!
(
mysql
=
mc_mysql_init
(
NULL
)))
{
sql_print_error
(
"fetch_nx_table: Error in mysql_init()"
);
nx_errno
=
ER_GET_ERRNO
;
goto
err
;
}
if
(
!
called_connected
&&
!
(
mysql
=
mc_mysql_init
(
NULL
)))
{
sql_print_error
(
"fetch_nx_table: Error in mysql_init()"
);
nx_errno
=
ER_GET_ERRNO
;
goto
err
;
}
if
(
!
called_connected
)
if
(
!
called_connected
)
{
if
(
connect_to_master
(
thd
,
mysql
,
mi
))
if
(
connect_to_master
(
thd
,
mysql
,
mi
))
{
sql_print_error
(
"Could not connect to master while fetching table\
'%-64s.%-64s'"
,
db_name
,
table_name
);
...
...
@@ -424,21 +420,24 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
goto
err
;
}
}
if
(
request_table_dump
(
mysql
,
db_name
,
table_name
))
{
nx_errno
=
ER_GET_ERRNO
;
sql_print_error
(
"fetch_nx_table: failed on table dump request "
);
goto
err
;
}
safe_connect
(
thd
,
mysql
,
mi
);
if
(
slave_killed
(
thd
))
goto
err
;
if
(
request_table_dump
(
mysql
,
thd
->
last_nx_db
,
thd
->
last_nx_table
))
{
nx_errno
=
ER_GET_ERRNO
;
sql_print_error
(
"fetch_nx_table: failed on table dump request "
);
goto
err
;
}
if
(
create_table_from_dump
(
thd
,
&
mysql
->
net
,
db_name
,
if
(
create_table_from_dump
(
thd
,
&
mysql
->
net
,
db_name
,
table_name
))
{
// create_table_from_dump will have sent the error alread
sql_print_error
(
"fetch_nx_table: failed on create table "
);
goto
err
;
}
{
// create_table_from_dump will have sent the error alread
sql_print_error
(
"fetch_nx_table: failed on create table "
);
goto
err
;
}
error
=
0
;
...
...
@@ -447,6 +446,7 @@ int fetch_nx_table(THD* thd, const char* db_name, const char* table_name,
mc_mysql_close
(
mysql
);
if
(
nx_errno
&&
thd
->
net
.
vio
)
send_error
(
&
thd
->
net
,
nx_errno
,
"Error in fetch_nx_table"
);
thd
->
net
.
no_send_ok
=
0
;
// Clear up garbage after create_table_from_dump
return
error
;
}
...
...
sql/sql_parse.cc
View file @
ef8d161d
...
...
@@ -1243,21 +1243,11 @@ mysql_execute_command(void)
if
(
strlen
(
tables
->
name
)
>
NAME_LEN
)
{
net_printf
(
&
thd
->
net
,
ER_WRONG_TABLE_NAME
,
tables
->
name
);
res
=
0
;
break
;
}
if
(
fetch_nx_table
(
thd
,
tables
->
db
,
tables
->
real_name
,
&
glob_mi
,
0
))
// fetch_nx_table is responsible for sending
// the error
{
res
=
0
;
thd
->
net
.
no_send_ok
=
0
;
// easier to do it here
// this way we make sure that when we are done, we are clean
break
;
}
res
=
0
;
if
(
fetch_nx_table
(
thd
,
tables
->
db
,
tables
->
real_name
,
&
glob_mi
,
0
))
break
;
// fetch_nx_table did send the error to the client
send_ok
(
&
thd
->
net
);
break
;
...
...
sql/sql_table.cc
View file @
ef8d161d
...
...
@@ -832,13 +832,13 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
int
lock_retcode
;
pthread_mutex_lock
(
&
LOCK_open
);
if
((
lock_retcode
=
lock_table_name
(
thd
,
table
))
<
0
)
if
((
lock_retcode
=
lock_table_name
(
thd
,
table
))
<
0
)
{
pthread_mutex_unlock
(
&
LOCK_open
);
DBUG_RETURN
(
-
1
);
}
if
(
lock_retcode
&&
wait_for_locked_table_names
(
thd
,
table
))
if
(
lock_retcode
&&
wait_for_locked_table_names
(
thd
,
table
))
{
unlock_table_name
(
thd
,
table
);
pthread_mutex_unlock
(
&
LOCK_open
);
...
...
@@ -846,7 +846,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
}
pthread_mutex_unlock
(
&
LOCK_open
);
if
(
my_copy
(
src_path
,
if
(
my_copy
(
src_path
,
fn_format
(
dst_path
,
dst_path
,
""
,
reg_ext
,
4
),
MYF
(
MY_WME
)))
...
...
@@ -860,7 +860,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
// generate table will try to send OK which messes up the output
// for the client
if
(
generate_table
(
thd
,
table
,
0
))
if
(
generate_table
(
thd
,
table
,
0
))
{
unlock_table_name
(
thd
,
table
);
thd
->
net
.
no_send_ok
=
save_no_send_ok
;
...
...
@@ -921,7 +921,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
// now we should be able to open the partially restored table
// to finish the restore in the handler later on
if
(
!
(
table
->
table
=
reopen_name_locked_table
(
thd
,
table
)))
if
(
!
(
table
->
table
=
reopen_name_locked_table
(
thd
,
table
)))
unlock_table_name
(
thd
,
table
);
}
...
...
@@ -1748,7 +1748,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
alter table is to delete the new table so there
is no need to log the changes to it. */
error
=
ha_recovery_logging
(
thd
,
false
);
if
(
error
)
if
(
error
)
{
error
=
1
;
goto
err
;
...
...
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