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
fba3a414
Commit
fba3a414
authored
Feb 27, 2009
by
Ingo Struewing
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
29ca5d01
8bea4016
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
25 deletions
+131
-25
mysql-test/r/variables.result
mysql-test/r/variables.result
+64
-16
mysql-test/t/variables.test
mysql-test/t/variables.test
+50
-8
sql/protocol.cc
sql/protocol.cc
+2
-1
sql/share/errmsg.txt
sql/share/errmsg.txt
+15
-0
No files found.
mysql-test/r/variables.result
View file @
fba3a414
...
...
@@ -299,59 +299,107 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000;
select ROUND(RAND(),5);
ROUND(RAND(),5)
0.02887
show variables like '%alloc%';
==+ Testing %alloc% system variables +==
==+ NOTE: These values *must* be a multiple of 1024 +==
==+ Other values will be rounded down to nearest multiple +==
==+ Show initial values +==
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 8192
query_prealloc_size 8192
range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
==+ information_schema data +==
SELECT * FROM information_schema.session_variables
WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
RANGE_ALLOC_BLOCK_SIZE 4096
TRANSACTION_ALLOC_BLOCK_SIZE 8192
TRANSACTION_PREALLOC_SIZE 4096
set @@range_alloc_block_size=1024*16;
Testing values that are multiples of 1024
set @@range_alloc_block_size=1024*15+1024;
set @@query_alloc_block_size=1024*15+1024*2;
set @@query_prealloc_size=1024*18-1024;
set @@transaction_alloc_block_size=1024*21-1024*1;
set @@transaction_prealloc_size=1024*21-2048;
==+ Check manipulated values ==+
select @@query_alloc_block_size;
@@query_alloc_block_size
17408
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 17408
query_prealloc_size 17408
range_alloc_block_size 16384
transaction_alloc_block_size 20480
transaction_prealloc_size 19456
==+ information_schema data +==
SELECT * FROM information_schema.session_variables
WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 17408
QUERY_PREALLOC_SIZE 17408
RANGE_ALLOC_BLOCK_SIZE 16384
TRANSACTION_ALLOC_BLOCK_SIZE 20480
TRANSACTION_PREALLOC_SIZE 19456
==+ Manipulate variable values +==
Testing values that are not 1024 multiples
set @@range_alloc_block_size=1024*16+1023;
set @@query_alloc_block_size=1024*17+2;
set @@query_prealloc_size=1024*18;
set @@query_prealloc_size=1024*18
-1023
;
set @@transaction_alloc_block_size=1024*20-1;
set @@transaction_prealloc_size=1024*21-1;
select @@query_alloc_block_size;
@@query_alloc_block_size
17408
show variables like '%alloc%';
==+ Check manipulated values ==+
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 17408
query_prealloc_size 1
8432
query_prealloc_size 1
7408
range_alloc_block_size 16384
transaction_alloc_block_size 19456
transaction_prealloc_size 20480
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
==+ information_schema data +==
SELECT * FROM information_schema.session_variables
WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 17408
QUERY_PREALLOC_SIZE 1
8432
QUERY_PREALLOC_SIZE 1
7408
RANGE_ALLOC_BLOCK_SIZE 16384
TRANSACTION_ALLOC_BLOCK_SIZE 19456
TRANSACTION_PREALLOC_SIZE 20480
==+ Set values back to the default values +==
set @@range_alloc_block_size=default;
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
show variables like '%alloc%';
==+ Check the values now that they are reset +==
SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size',
'query_alloc_block_size', 'query_prealloc_size',
'transaction_alloc_block_size', 'transaction_prealloc_size');
Variable_name Value
query_alloc_block_size 8192
query_prealloc_size 8192
range_alloc_block_size 4096
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
select * from information_schema.session_variables where variable_name like '%alloc%' order by 1;
VARIABLE_NAME VARIABLE_VALUE
QUERY_ALLOC_BLOCK_SIZE 8192
QUERY_PREALLOC_SIZE 8192
RANGE_ALLOC_BLOCK_SIZE 4096
TRANSACTION_ALLOC_BLOCK_SIZE 8192
TRANSACTION_PREALLOC_SIZE 4096
SELECT @@version LIKE 'non-existent';
@@version LIKE 'non-existent'
0
...
...
mysql-test/t/variables.test
View file @
fba3a414
...
...
@@ -173,21 +173,63 @@ select @@timestamp>0;
set
@@
rand_seed1
=
10000000
,
@@
rand_seed2
=
1000000
;
select
ROUND
(
RAND
(),
5
);
show
variables
like
'%alloc%'
;
select
*
from
information_schema
.
session_variables
where
variable_name
like
'%alloc%'
order
by
1
;
set
@@
range_alloc_block_size
=
1024
*
16
;
--
echo
--
echo
==+
Testing
%
alloc
%
system
variables
+==
--
echo
==+
NOTE
:
These
values
*
must
*
be
a
multiple
of
1024
+==
--
echo
==+
Other
values
will
be
rounded
down
to
nearest
multiple
+==
--
echo
--
echo
==+
Show
initial
values
+==
SHOW
VARIABLES
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
);
--
echo
==+
information_schema
data
+==
SELECT
*
FROM
information_schema
.
session_variables
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
)
ORDER
BY
1
;
--
echo
Testing
values
that
are
multiples
of
1024
set
@@
range_alloc_block_size
=
1024
*
15
+
1024
;
set
@@
query_alloc_block_size
=
1024
*
15
+
1024
*
2
;
set
@@
query_prealloc_size
=
1024
*
18
-
1024
;
set
@@
transaction_alloc_block_size
=
1024
*
21
-
1024
*
1
;
set
@@
transaction_prealloc_size
=
1024
*
21
-
2048
;
--
echo
==+
Check
manipulated
values
==+
select
@@
query_alloc_block_size
;
SHOW
VARIABLES
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
);
--
echo
==+
information_schema
data
+==
SELECT
*
FROM
information_schema
.
session_variables
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
)
ORDER
BY
1
;
--
echo
==+
Manipulate
variable
values
+==
--
echo
Testing
values
that
are
not
1024
multiples
set
@@
range_alloc_block_size
=
1024
*
16
+
1023
;
set
@@
query_alloc_block_size
=
1024
*
17
+
2
;
set
@@
query_prealloc_size
=
1024
*
18
;
set
@@
query_prealloc_size
=
1024
*
18
-
1023
;
set
@@
transaction_alloc_block_size
=
1024
*
20
-
1
;
set
@@
transaction_prealloc_size
=
1024
*
21
-
1
;
select
@@
query_alloc_block_size
;
show
variables
like
'%alloc%'
;
select
*
from
information_schema
.
session_variables
where
variable_name
like
'%alloc%'
order
by
1
;
--
echo
==+
Check
manipulated
values
==+
SHOW
VARIABLES
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
);
--
echo
==+
information_schema
data
+==
SELECT
*
FROM
information_schema
.
session_variables
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
)
ORDER
BY
1
;
--
echo
==+
Set
values
back
to
the
default
values
+==
set
@@
range_alloc_block_size
=
default
;
set
@@
query_alloc_block_size
=
default
,
@@
query_prealloc_size
=
default
;
set
transaction_alloc_block_size
=
default
,
@@
transaction_prealloc_size
=
default
;
show
variables
like
'%alloc%'
;
select
*
from
information_schema
.
session_variables
where
variable_name
like
'%alloc%'
order
by
1
;
--
echo
==+
Check
the
values
now
that
they
are
reset
+==
SHOW
VARIABLES
WHERE
variable_name
IN
(
'range_alloc_block_size'
,
'query_alloc_block_size'
,
'query_prealloc_size'
,
'transaction_alloc_block_size'
,
'transaction_prealloc_size'
);
#
# Bug #10904 Illegal mix of collations between
...
...
sql/protocol.cc
View file @
fba3a414
...
...
@@ -598,7 +598,8 @@ bool Protocol::send_fields(List<Item> *list, uint flags)
field
.
length
/
item
->
collation
.
collation
->
mbminlen
:
field
.
length
/
item
->
collation
.
collation
->
mbmaxlen
;
max_length
*=
thd_charset
->
mbmaxlen
;
field_length
=
(
max_length
>
UINT_MAX32
)
?
UINT_MAX32
:
max_length
;
field_length
=
(
max_length
>
UINT_MAX32
)
?
UINT_MAX32
:
(
uint32
)
max_length
;
int4store
(
pos
+
2
,
field_length
);
}
pos
[
6
]
=
field
.
type
;
...
...
sql/share/errmsg.txt
View file @
fba3a414
...
...
@@ -6154,3 +6154,18 @@ WARN_PLUGIN_BUSY
ER_VARIABLE_IS_READONLY
eng "%s variable '%s' is read-only. Use SET %s to assign the value"
ER_WARN_ENGINE_TRANSACTION_ROLLBACK
eng "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted"
ER_SLAVE_HEARTBEAT_FAILURE
eng "Unexpected master's heartbeat data: %s"
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
eng "The requested value for the heartbeat period %s %s"
ER_NDB_REPLICATION_SCHEMA_ERROR
eng "Bad schema for mysql.ndb_replication table. Message: %-.64s"
ER_CONFLICT_FN_PARSE_ERROR
eng "Error in parsing conflict function. Message: %-.64s"
ER_EXCEPTIONS_WRITE_ERROR
eng "Write to exceptions table failed. Message: %-.128s""
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