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
8b56ca0e
Commit
8b56ca0e
authored
Dec 20, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql-4.0 into mashka.mysql.fi:/home/my/mysql-4.0
parents
3f7afaf8
b5aa9ae0
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
157 additions
and
38 deletions
+157
-38
Docs/mysqld_error.txt
Docs/mysqld_error.txt
+23
-3
acinclude.m4
acinclude.m4
+6
-3
configure.in
configure.in
+7
-1
mysql-test/r/variables.result
mysql-test/r/variables.result
+2
-2
mysql-test/t/variables.test
mysql-test/t/variables.test
+3
-0
mysys/Makefile.am
mysys/Makefile.am
+0
-1
mysys/my_alloc.c
mysys/my_alloc.c
+3
-1
scripts/Makefile.am
scripts/Makefile.am
+2
-0
scripts/mysqlbug.sh
scripts/mysqlbug.sh
+2
-0
sql/item_func.cc
sql/item_func.cc
+5
-2
sql/item_func.h
sql/item_func.h
+3
-4
sql/mysqld.cc
sql/mysqld.cc
+11
-5
sql/repl_failsafe.cc
sql/repl_failsafe.cc
+1
-1
sql/set_var.cc
sql/set_var.cc
+60
-9
sql/set_var.h
sql/set_var.h
+18
-0
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+4
-2
sql/sql_show.cc
sql/sql_show.cc
+3
-0
sql/structs.h
sql/structs.h
+1
-1
No files found.
Docs/mysqld_error.txt
View file @
8b56ca0e
...
...
@@ -300,7 +300,7 @@
#define ER_NOT_ALLOWED_COMMAND 1148
"The used command is not allowed with this MySQL version",
#define ER_SYNTAX_ERROR 1149
"You have an error in your SQL syntax",
"You have an error in your SQL syntax
. Check the manual that corresponds to your MySQL server version for the right syntax to use
",
#define ER_DELAYED_CANT_CHANGE_LOCK 1150
"Delayed insert thread couldn't get requested lock for table %-.64s",
#define ER_TOO_MANY_DELAYED_THREADS 1151
...
...
@@ -358,7 +358,7 @@
#define ER_CHECK_NO_SUCH_TABLE 1177
"Can't open table",
#define ER_CHECK_NOT_IMPLEMENTED 1178
"The handler for the table doesn't support
check/repair
",
"The handler for the table doesn't support
%s
",
#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
"You are not allowed to execute this command in a transaction",
#define ER_ERROR_DURING_COMMIT 1180
...
...
@@ -454,4 +454,24 @@
#define ER_DUP_ARGUMENT 1225
"Option '%s' used twice in statement",
#define ER_USER_LIMIT_REACHED 1226
"User '%-64s' has exceeded the '%s' resource (current value: %ld)",
"User '%-.64s' has exceeded the '%s' resource (current value: %ld)",
#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
"Access denied. You need the %-.128s privilege for this operation",
#define ER_LOCAL_VARIABLE 1228
"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL",
#define ER_GLOBAL_VARIABLE 1229
"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL",
#define ER_NO_DEFAULT 1230
"Variable '%-.64s' doesn't have a default value",
#define ER_WRONG_VALUE_FOR_VAR 1231
"Variable '%-.64s' can't be set to the value of '%-.64s'",
#define ER_WRONG_TYPE_FOR_VAR 1232
"Wrong argument type to variable '%-.64s'",
#define ER_VAR_CANT_BE_READ 1233
"Variable '%-.64s' can only be set, not read",
#define ER_CANT_USE_OPTION_HERE 1234
"Wrong usage/placement of '%s'",
#define 1235
"This version of MySQL doesn't yet support '%s'",
#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
"Got fatal error %d: '%-.128s' from master when reading data from binary log",
acinclude.m4
View file @
8b56ca0e
...
...
@@ -1211,7 +1211,9 @@ changequote(, )dnl
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
changequote([, ])dnl
if test "$GCC" = yes; then
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
case `$CC --version 2>/dev/null` in
2.95.*) ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ ;;
esac
fi
;;
# IRIX 6.2 and later require cc -n32.
...
...
@@ -1326,7 +1328,7 @@ AC_DEFUN(MYSQL_SYS_LARGEFILE,
# Local version of _AC_PROG_CXX_EXIT_DECLARATION that does not
# include #stdlib.h as this breaks things on Solaris
# include #stdlib.h as
default as
this breaks things on Solaris
# (Conflicts with pthreads and big file handling)
m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
...
...
@@ -1336,7 +1338,8 @@ m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
'void exit (int);' \
'#include <stdlib.h>'
do
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <stdlib.h>
$ac_declaration],
...
...
configure.in
View file @
8b56ca0e
...
...
@@ -135,13 +135,19 @@ if test $? -eq "0"
then
AC_MSG_CHECKING
(
"C Compiler version"
)
;
AC_MSG_RESULT
(
"
$CC
$CC_VERSION
"
)
else
CC_VERSION
=
""
fi
CXX_VERSION
=
`
$CXX
--version
`
if
test
$?
-eq
"0"
then
AC_MSG_CHECKING
(
"C++ compiler version"
)
;
AC_MSG_RESULT
(
"
$CXX
$CXX_VERSION
"
)
else
CXX_VERSION
=
""
fi
AC_SUBST
(
CXX_VERSION
)
AC_SUBST
(
CC_VERSION
)
# Fix for sgi gcc / sgiCC which tries to emulate gcc
if
test
"
$CC
"
=
"sgicc"
...
...
@@ -1228,7 +1234,7 @@ then
# CC="$CC -Kthread -DOpenUNIX8";
# CXX="$CXX -Kthread -DOpenUNIX8";
CC
=
"
$CC
-Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
;
CXX
=
"
$CXX
-Kthread -DUNIXWARE_7
"
;
CXX
=
"
$CXX
-Kthread -DUNIXWARE_7
-DHAVE_BROKEN_RWLOCK"
fi
AC_MSG_RESULT
(
"yes"
)
else
...
...
mysql-test/r/variables.result
View file @
8b56ca0e
...
...
@@ -50,7 +50,7 @@ Variable_name Value
max_join_size 100
show global variables like 'max_join_size';
Variable_name Value
max_join_size
4294967295
max_join_size
HA_POS_ERROR
set GLOBAL max_join_size=2000;
show global variables like 'max_join_size';
Variable_name Value
...
...
@@ -62,7 +62,7 @@ max_join_size 2000
set GLOBAL max_join_size=DEFAULT;
show global variables like 'max_join_size';
Variable_name Value
max_join_size
4294967295
max_join_size
HA_POS_ERROR
set @@max_join_size=1000, @@global.max_join_size=2000;
select @@local.max_join_size, @@global.max_join_size;
@@session.max_join_size @@global.max_join_size
...
...
mysql-test/t/variables.test
View file @
8b56ca0e
...
...
@@ -34,12 +34,15 @@ drop table t1;
set
max_join_size
=
100
;
show
variables
like
'max_join_size'
;
--
replace_result
18446744073709551615
HA_POS_ERROR
4294967295
HA_POS_ERROR
show
global
variables
like
'max_join_size'
;
set
GLOBAL
max_join_size
=
2000
;
show
global
variables
like
'max_join_size'
;
set
max_join_size
=
DEFAULT
;
--
replace_result
18446744073709551615
HA_POS_ERROR
4294967295
HA_POS_ERROR
show
variables
like
'max_join_size'
;
set
GLOBAL
max_join_size
=
DEFAULT
;
--
replace_result
18446744073709551615
HA_POS_ERROR
4294967295
HA_POS_ERROR
show
global
variables
like
'max_join_size'
;
set
@@
max_join_size
=
1000
,
@@
global
.
max_join_size
=
2000
;
select
@@
local
.
max_join_size
,
@@
global
.
max_join_size
;
...
...
mysys/Makefile.am
View file @
8b56ca0e
...
...
@@ -64,7 +64,6 @@ EXTRA_PROGRAMS =
DEFS
=
-DDEFAULT_BASEDIR
=
\"
$(prefix)
\"
\
-DDATADIR
=
"
\"
$(MYSQLDATAdir)
\"
"
\
-DDEFAULT_CHARSET_HOME
=
"
\"
$(MYSQLBASEdir)
\"
"
\
-DDATADIR
=
"
\"
$(MYSQLDATAdir)
\"
"
\
-DSHAREDIR
=
"
\"
$(MYSQLSHAREdir)
\"
"
\
@DEFS@
...
...
mysys/my_alloc.c
View file @
8b56ca0e
...
...
@@ -25,12 +25,13 @@
void
init_alloc_root
(
MEM_ROOT
*
mem_root
,
uint
block_size
,
uint
pre_alloc_size
__attribute__
((
unused
)))
{
mem_root
->
free
=
mem_root
->
used
=
0
;
mem_root
->
free
=
mem_root
->
used
=
mem_root
->
pre_alloc
=
0
;
mem_root
->
min_malloc
=
32
;
mem_root
->
block_size
=
block_size
-
MALLOC_OVERHEAD
-
sizeof
(
USED_MEM
)
-
8
;
mem_root
->
error_handler
=
0
;
mem_root
->
block_num
=
4
;
/* We shift this with >>2 */
mem_root
->
first_block_usage
=
0
;
#if !(defined(HAVE_purify) && defined(EXTRA_DEBUG))
if
(
pre_alloc_size
)
{
...
...
@@ -137,6 +138,7 @@ static inline void mark_blocks_free(MEM_ROOT* root)
/* Now everything is set; Indicate that nothing is used anymore */
root
->
used
=
0
;
root
->
first_block_usage
=
0
;
}
...
...
scripts/Makefile.am
View file @
8b56ca0e
...
...
@@ -100,6 +100,8 @@ SUFFIXES = .sh
-e
's!@''CC''@!@CC@!'
\
-e
's!@''CXX''@!@CXX@!'
\
-e
's!@''GXX''@!@GXX@!'
\
-e
's!@''CC_VERSION''@!@CC_VERSION@!'
\
-e
's!@''CXX_VERSION''@!@CXX_VERSION@!'
\
-e
's!@''PERL''@!@PERL@!'
\
-e
's!@''ASFLAGS''@!@SAVE_ASFLAGS@!'
\
-e
's!@''CFLAGS''@!@SAVE_CFLAGS@!'
\
...
...
scripts/mysqlbug.sh
View file @
8b56ca0e
...
...
@@ -231,6 +231,8 @@ ${ORGANIZATION- $ORGANIZATION_C}
>Class:
$CLASS_C
>Release: mysql-
${
VERSION
}
(
$COMPILATION_COMMENT
)
`test -n "
$MYSQL_SERVER
" && echo ">Server:
$MYSQL_SERVER
"`
>C compiler: @CC_VERSION@
>C++ compiler: @CXX_VERSION@
>Environment:
$ENVIRONMENT_C
`test -n "
$SYSTEM
" && echo "System:
$SYSTEM
"`
...
...
sql/item_func.cc
View file @
8b56ca0e
...
...
@@ -2038,11 +2038,14 @@ void Item_func_get_user_var::fix_length_and_dec()
maybe_null
=
1
;
decimals
=
NOT_FIXED_DEC
;
max_length
=
MAX_BLOB_WIDTH
;
if
((
var_entry
=
get_variable
(
&
thd
->
user_vars
,
name
,
0
)))
const_var_flag
=
thd
->
query_id
!=
var_entry
->
update_query_id
;
var_entry
=
get_variable
(
&
thd
->
user_vars
,
name
,
0
);
}
bool
Item_func_get_user_var
::
const_item
()
const
{
return
var_entry
&&
current_thd
->
query_id
!=
var_entry
->
update_query_id
;
}
enum
Item_result
Item_func_get_user_var
::
result_type
()
const
{
user_var_entry
*
entry
;
...
...
sql/item_func.h
View file @
8b56ca0e
...
...
@@ -902,11 +902,10 @@ class Item_func_get_user_var :public Item_func
{
LEX_STRING
name
;
user_var_entry
*
var_entry
;
bool
const_var_flag
;
public:
Item_func_get_user_var
(
LEX_STRING
a
)
:
Item_func
(),
name
(
a
)
,
const_var_flag
(
1
)
{}
Item_func
(),
name
(
a
)
{}
user_var_entry
*
get_entry
();
double
val
();
longlong
val_int
();
...
...
@@ -915,9 +914,9 @@ public:
void
print
(
String
*
str
);
enum
Item_result
result_type
()
const
;
const
char
*
func_name
()
const
{
return
"get_user_var"
;
}
bool
const_item
()
const
{
return
const_var_flag
;
}
bool
const_item
()
const
;
table_map
used_tables
()
const
{
return
const_
var_flag
?
0
:
RAND_TABLE_BIT
;
}
{
return
const_
item
()
?
0
:
RAND_TABLE_BIT
;
}
bool
eq
(
const
Item
*
item
,
bool
binary_cmp
)
const
;
unsigned
int
size_of
()
{
return
sizeof
(
*
this
);}
};
...
...
sql/mysqld.cc
View file @
8b56ca0e
...
...
@@ -242,6 +242,12 @@ SHOW_COMP_OPTION have_query_cache=SHOW_OPTION_NO;
#endif
bool
opt_large_files
=
sizeof
(
my_off_t
)
>
4
;
#if SIZEOF_OFF_T > 4 && defined(BIG_TABLES)
#define GET_HA_ROWS GET_ULL
#else
#define GET_HA_ROWS GET_ULONG
#endif
/*
Variables to store startup options
...
...
@@ -3562,7 +3568,7 @@ struct my_option my_long_options[] =
{
"max_join_size"
,
OPT_MAX_JOIN_SIZE
,
"Joins that are probably going to read more than max_join_size records return an error."
,
(
gptr
*
)
&
global_system_variables
.
max_join_size
,
(
gptr
*
)
&
max_system_variables
.
max_join_size
,
0
,
GET_
ULONG
,
REQUIRED_ARG
,
(
gptr
*
)
&
max_system_variables
.
max_join_size
,
0
,
GET_
HA_ROWS
,
REQUIRED_ARG
,
~
0L
,
1
,
~
0L
,
0
,
1
,
0
},
{
"max_sort_length"
,
OPT_MAX_SORT_LENGTH
,
"The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)."
,
...
...
@@ -3949,10 +3955,10 @@ static void set_options(void)
/* Set default values for some variables */
global_system_variables
.
table_type
=
DB_TYPE_MYISAM
;
global_system_variables
.
tx_isolation
=
ISO_REPEATABLE_READ
;
global_system_variables
.
select_limit
=
(
ulong
)
HA_POS_ERROR
;
max_system_variables
.
select_limit
=
(
ulong
)
HA_POS_ERROR
;
global_system_variables
.
max_join_size
=
(
ulong
)
HA_POS_ERROR
;
max_system_variables
.
max_join_size
=
(
ulong
)
HA_POS_ERROR
;
global_system_variables
.
select_limit
=
HA_POS_ERROR
;
max_system_variables
.
select_limit
=
HA_POS_ERROR
;
global_system_variables
.
max_join_size
=
HA_POS_ERROR
;
max_system_variables
.
max_join_size
=
HA_POS_ERROR
;
#ifdef __WIN__
/* Allow Win32 users to move MySQL anywhere */
...
...
sql/repl_failsafe.cc
View file @
8b56ca0e
...
...
@@ -82,7 +82,7 @@ static int init_failsafe_rpl_thread(THD* thd)
#endif
thd
->
mem_root
.
free
=
thd
->
mem_root
.
used
=
0
;
if
(
(
ulong
)
thd
->
variables
.
max_join_size
==
(
ulong
)
HA_POS_ERROR
)
if
(
thd
->
variables
.
max_join_size
==
HA_POS_ERROR
)
thd
->
options
|=
OPTION_BIG_SELECTS
;
thd
->
proc_info
=
"Thread initialized"
;
...
...
sql/set_var.cc
View file @
8b56ca0e
...
...
@@ -149,11 +149,11 @@ sys_var_long_ptr sys_max_delayed_threads("max_delayed_threads",
&
max_insert_delayed_threads
);
sys_var_thd_ulong
sys_max_heap_table_size
(
"max_heap_table_size"
,
&
SV
::
max_heap_table_size
);
sys_var_thd_
ulong
sys_max_join_size
(
"max_join_size"
,
sys_var_thd_
ha_rows
sys_max_join_size
(
"max_join_size"
,
&
SV
::
max_join_size
,
fix_max_join_size
);
#ifndef TO_BE_DELETED
/* Alias for max_join_size */
sys_var_thd_
ulong
sys_sql_max_join_size
(
"sql_max_join_size"
,
sys_var_thd_
ha_rows
sys_sql_max_join_size
(
"sql_max_join_size"
,
&
SV
::
max_join_size
,
fix_max_join_size
);
#endif
...
...
@@ -275,7 +275,7 @@ static sys_var_thd_bit sys_unique_checks("unique_checks",
/* Local state variables */
static
sys_var_thd_
ulong
sys_select_limit
(
"sql_select_limit"
,
static
sys_var_thd_
ha_rows
sys_select_limit
(
"sql_select_limit"
,
&
SV
::
select_limit
);
static
sys_var_timestamp
sys_timestamp
(
"timestamp"
);
static
sys_var_last_insert_id
sys_last_insert_id
(
"last_insert_id"
);
...
...
@@ -576,7 +576,7 @@ static void fix_max_join_size(THD *thd, enum_var_type type)
{
if
(
type
!=
OPT_GLOBAL
)
{
if
(
thd
->
variables
.
max_join_size
==
(
ulong
)
HA_POS_ERROR
)
if
(
thd
->
variables
.
max_join_size
==
HA_POS_ERROR
)
thd
->
options
|=
OPTION_BIG_SELECTS
;
else
thd
->
options
&=
~
OPTION_BIG_SELECTS
;
...
...
@@ -723,12 +723,7 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var)
if
(
option_limits
)
tmp
=
(
ulong
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
if
(
var
->
type
==
OPT_GLOBAL
)
{
/* Lock is needed to make things safe on 32 bit systems */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ulong
)
tmp
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
thd
->
variables
.
*
offset
=
(
ulong
)
tmp
;
return
0
;
...
...
@@ -755,10 +750,60 @@ byte *sys_var_thd_ulong::value_ptr(THD *thd, enum_var_type type)
}
bool
sys_var_thd_ha_rows
::
update
(
THD
*
thd
,
set_var
*
var
)
{
ulonglong
tmp
=
var
->
value
->
val_int
();
/* Don't use bigger value than given with --maximum-variable-name=.. */
if
((
ha_rows
)
tmp
>
max_system_variables
.
*
offset
)
tmp
=
max_system_variables
.
*
offset
;
if
(
option_limits
)
tmp
=
(
ha_rows
)
getopt_ull_limit_value
(
tmp
,
option_limits
);
if
(
var
->
type
==
OPT_GLOBAL
)
{
/* Lock is needed to make things safe on 32 bit systems */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ha_rows
)
tmp
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
thd
->
variables
.
*
offset
=
(
ha_rows
)
tmp
;
return
0
;
}
void
sys_var_thd_ha_rows
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
{
if
(
type
==
OPT_GLOBAL
)
{
/* We will not come here if option_limits is not set */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ha_rows
)
option_limits
->
def_value
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
thd
->
variables
.
*
offset
=
global_system_variables
.
*
offset
;
}
byte
*
sys_var_thd_ha_rows
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
)
{
if
(
type
==
OPT_GLOBAL
)
return
(
byte
*
)
&
(
global_system_variables
.
*
offset
);
return
(
byte
*
)
&
(
thd
->
variables
.
*
offset
);
}
bool
sys_var_thd_ulonglong
::
update
(
THD
*
thd
,
set_var
*
var
)
{
if
(
var
->
type
==
OPT_GLOBAL
)
{
/* Lock is needed to make things safe on 32 bit systems */
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
var
->
value
->
val_int
();
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
thd
->
variables
.
*
offset
=
var
->
value
->
val_int
();
return
0
;
...
...
@@ -768,7 +813,11 @@ bool sys_var_thd_ulonglong::update(THD *thd, set_var *var)
void
sys_var_thd_ulonglong
::
set_default
(
THD
*
thd
,
enum_var_type
type
)
{
if
(
type
==
OPT_GLOBAL
)
{
pthread_mutex_lock
(
&
LOCK_global_system_variables
);
global_system_variables
.
*
offset
=
(
ulong
)
option_limits
->
def_value
;
pthread_mutex_unlock
(
&
LOCK_global_system_variables
);
}
else
thd
->
variables
.
*
offset
=
global_system_variables
.
*
offset
;
}
...
...
@@ -871,6 +920,8 @@ Item *sys_var::item(THD *thd, enum_var_type var_type)
return
new
Item_uint
((
int32
)
*
(
ulong
*
)
value_ptr
(
thd
,
var_type
));
case
SHOW_LONGLONG
:
return
new
Item_int
(
*
(
longlong
*
)
value_ptr
(
thd
,
var_type
));
case
SHOW_HA_ROWS
:
return
new
Item_int
((
longlong
)
*
(
ha_rows
*
)
value_ptr
(
thd
,
var_type
));
case
SHOW_MY_BOOL
:
return
new
Item_int
((
int32
)
*
(
my_bool
*
)
value_ptr
(
thd
,
var_type
),
1
);
case
SHOW_CHAR
:
...
...
sql/set_var.h
View file @
8b56ca0e
...
...
@@ -211,6 +211,24 @@ public:
};
class
sys_var_thd_ha_rows
:
public
sys_var_thd
{
public:
ha_rows
SV
::*
offset
;
sys_var_thd_ha_rows
(
const
char
*
name_arg
,
ha_rows
SV
::*
offset_arg
)
:
sys_var_thd
(
name_arg
),
offset
(
offset_arg
)
{}
sys_var_thd_ha_rows
(
const
char
*
name_arg
,
ha_rows
SV
::*
offset_arg
,
sys_after_update_func
func
)
:
sys_var_thd
(
name_arg
,
func
),
offset
(
offset_arg
)
{}
bool
update
(
THD
*
thd
,
set_var
*
var
);
void
set_default
(
THD
*
thd
,
enum_var_type
type
);
SHOW_TYPE
type
()
{
return
SHOW_HA_ROWS
;
}
byte
*
value_ptr
(
THD
*
thd
,
enum_var_type
type
);
};
class
sys_var_thd_ulonglong
:
public
sys_var_thd
{
public:
...
...
sql/slave.cc
View file @
8b56ca0e
...
...
@@ -1548,7 +1548,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
VOID
(
pthread_sigmask
(
SIG_UNBLOCK
,
&
set
,
&
thd
->
block_signals
));
#endif
if
(
(
ulong
)
thd
->
variables
.
max_join_size
==
(
ulong
)
HA_POS_ERROR
)
if
(
thd
->
variables
.
max_join_size
==
HA_POS_ERROR
)
thd
->
options
|=
OPTION_BIG_SELECTS
;
if
(
thd_type
==
SLAVE_THD_SQL
)
...
...
sql/sql_class.h
View file @
8b56ca0e
...
...
@@ -284,13 +284,14 @@ struct system_variables
{
ulonglong
myisam_max_extra_sort_file_size
;
ulonglong
myisam_max_sort_file_size
;
ha_rows
select_limit
;
ha_rows
max_join_size
;
ulong
bulk_insert_buff_size
;
ulong
join_buff_size
;
ulong
long_query_time
;
ulong
max_allowed_packet
;
ulong
max_heap_table_size
;
ulong
max_sort_length
;
ulong
max_join_size
;
ulong
max_tmp_tables
;
ulong
myisam_sort_buff_size
;
ulong
net_buffer_length
;
...
...
@@ -302,7 +303,6 @@ struct system_variables
ulong
query_cache_type
;
ulong
read_buff_size
;
ulong
read_rnd_buff_size
;
ulong
select_limit
;
ulong
sortbuff_size
;
ulong
tmp_table_size
;
ulong
tx_isolation
;
...
...
sql/sql_parse.cc
View file @
8b56ca0e
...
...
@@ -678,7 +678,7 @@ pthread_handler_decl(handle_one_connection,arg)
goto
end_thread
;
}
if
(
(
ulong
)
thd
->
variables
.
max_join_size
==
(
ulong
)
HA_POS_ERROR
)
if
(
thd
->
variables
.
max_join_size
==
HA_POS_ERROR
)
thd
->
options
|=
OPTION_BIG_SELECTS
;
if
(
thd
->
client_capabilities
&
CLIENT_COMPRESS
)
net
->
compress
=
1
;
// Use compression
...
...
@@ -754,7 +754,7 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg)
#endif
if
(
(
ulong
)
thd
->
variables
.
max_join_size
==
(
ulong
)
HA_POS_ERROR
)
if
(
thd
->
variables
.
max_join_size
==
HA_POS_ERROR
)
thd
->
options
|=
OPTION_BIG_SELECTS
;
thd
->
proc_info
=
0
;
...
...
@@ -1096,6 +1096,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
if
(
lower_case_table_names
)
casedn_str
(
db
);
if
(
check_access
(
thd
,
DROP_ACL
,
db
,
0
,
1
))
break
;
if
(
thd
->
locked_tables
||
thd
->
active_transaction
())
{
send_error
(
&
thd
->
net
,
ER_LOCK_OR_ACTIVE_TRANSACTION
);
...
...
sql/sql_show.cc
View file @
8b56ca0e
...
...
@@ -1184,6 +1184,9 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
case
SHOW_LONGLONG
:
net_store_data
(
&
packet2
,(
longlong
)
*
(
longlong
*
)
value
);
break
;
case
SHOW_HA_ROWS
:
net_store_data
(
&
packet2
,(
longlong
)
*
(
ha_rows
*
)
value
);
break
;
case
SHOW_BOOL
:
net_store_data
(
&
packet2
,(
ulong
)
*
(
bool
*
)
value
?
"ON"
:
"OFF"
);
break
;
...
...
sql/structs.h
View file @
8b56ca0e
...
...
@@ -129,7 +129,7 @@ enum SHOW_TYPE
SHOW_UNDEF
,
SHOW_LONG
,
SHOW_LONGLONG
,
SHOW_INT
,
SHOW_CHAR
,
SHOW_CHAR_PTR
,
SHOW_BOOL
,
SHOW_MY_BOOL
,
SHOW_OPENTABLES
,
SHOW_STARTTIME
,
SHOW_QUESTION
,
SHOW_LONG_CONST
,
SHOW_INT_CONST
,
SHOW_HAVE
,
SHOW_SYS
,
SHOW_LONG_CONST
,
SHOW_INT_CONST
,
SHOW_HAVE
,
SHOW_SYS
,
SHOW_HA_ROWS
,
#ifdef HAVE_OPENSSL
SHOW_SSL_CTX_SESS_ACCEPT
,
SHOW_SSL_CTX_SESS_ACCEPT_GOOD
,
SHOW_SSL_GET_VERSION
,
SHOW_SSL_CTX_GET_SESSION_CACHE_MODE
,
...
...
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