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
a4b0681a
Commit
a4b0681a
authored
Aug 22, 2008
by
Timothy Smith
Browse files
Options
Browse Files
Download
Plain Diff
Merge 5.0 main to 5.0-build
parents
28e884d9
de73b729
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
250 additions
and
88 deletions
+250
-88
BUILD/check-cpu
BUILD/check-cpu
+1
-1
mysql-test/r/federated.result
mysql-test/r/federated.result
+11
-0
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+5
-5
mysql-test/r/ps_1general.result
mysql-test/r/ps_1general.result
+2
-2
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+1
-1
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+1
-1
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+1
-1
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+2
-2
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+1
-1
mysql-test/r/ps_7ndb.result
mysql-test/r/ps_7ndb.result
+1
-1
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+76
-46
mysql-test/r/sp.result
mysql-test/r/sp.result
+16
-0
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+5
-0
mysql-test/t/federated.test
mysql-test/t/federated.test
+22
-0
mysql-test/t/show_check.test
mysql-test/t/show_check.test
+20
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+24
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+9
-0
mysys/mf_pack.c
mysys/mf_pack.c
+1
-1
netware/BUILD/compile-linux-tools
netware/BUILD/compile-linux-tools
+3
-0
netware/BUILD/nwbootstrap
netware/BUILD/nwbootstrap
+5
-3
netware/Makefile.am
netware/Makefile.am
+1
-2
netware/mysql_install_db.c
netware/mysql_install_db.c
+15
-5
sql/ha_federated.cc
sql/ha_federated.cc
+3
-0
sql/item.cc
sql/item.cc
+4
-0
sql/item.h
sql/item.h
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+1
-3
strings/decimal.c
strings/decimal.c
+15
-7
tests/mysql_client_test.c
tests/mysql_client_test.c
+3
-5
No files found.
BUILD/check-cpu
View file @
a4b0681a
...
@@ -169,7 +169,7 @@ check_cpu () {
...
@@ -169,7 +169,7 @@ check_cpu () {
fi
fi
cc_ver
=
`
$cc
--version
|
sed
1q
`
cc_ver
=
`
$cc
--version
|
sed
1q
`
cc_verno
=
`
echo
$cc_ver
|
sed
-e
's/^.*
gcc/gcc
/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'
`
cc_verno
=
`
echo
$cc_ver
|
sed
-e
's/^.*
(GCC)/
/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'
`
set
--
`
echo
$cc_verno
|
tr
'.'
' '
`
set
--
`
echo
$cc_verno
|
tr
'.'
' '
`
cc_major
=
$1
cc_major
=
$1
cc_minor
=
$2
cc_minor
=
$2
...
...
mysql-test/r/federated.result
View file @
a4b0681a
...
@@ -2071,7 +2071,18 @@ DROP TABLE t1;
...
@@ -2071,7 +2071,18 @@ DROP TABLE t1;
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://';
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (a LONGBLOB, b LONGBLOB);
INSERT INTO t1 VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaa', NULL);
CREATE TABLE t1
(a LONGBLOB, b LONGBLOB) ENGINE=FEDERATED
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
CHECKSUM TABLE t1;
Table Checksum
test.t1 2465757603
DROP TABLE t1;
DROP TABLE t1;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP DATABASE IF EXISTS federated;
End of 5.0 tests
mysql-test/r/metadata.result
View file @
a4b0681a
...
@@ -108,11 +108,11 @@ id
...
@@ -108,11 +108,11 @@ id
1
1
select * from v1 group by id limit 0;
select * from v1 group by id limit 0;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 id id 3 10 0 Y 32768 0 63
def test
v
1 v1 id id 3 10 0 Y 32768 0 63
id
id
select * from v1 where id=1000 group by id;
select * from v1 where id=1000 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 id id 3 10 0 Y 32768 0 63
def test
v
1 v1 id id 3 10 0 Y 32768 0 63
id
id
select * from v1 where id=1 group by id;
select * from v1 where id=1 group by id;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
...
@@ -126,7 +126,7 @@ renamed
...
@@ -126,7 +126,7 @@ renamed
1
1
select * from v3 where renamed=1 group by renamed;
select * from v3 where renamed=1 group by renamed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def
v3
renamed 8 12 0 Y 32896 0 63
def
v3 v3 renamed
renamed 8 12 0 Y 32896 0 63
renamed
renamed
drop table t1;
drop table t1;
drop view v1,v2,v3;
drop view v1,v2,v3;
...
@@ -156,8 +156,8 @@ c1
...
@@ -156,8 +156,8 @@ c1
3
3
SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c1=c2;
SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c1=c2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test
t
1 v1 c1 c1 254 1 1 Y 0 0 8
def test
v
1 v1 c1 c1 254 1 1 Y 0 0 8
def test
t
2 v2 c2 c2 254 1 1 Y 0 0 8
def test
v
2 v2 c2 c2 254 1 1 Y 0 0 8
c1 c2
c1 c2
1 1
1 1
2 2
2 2
...
...
mysql-test/r/ps_1general.result
View file @
a4b0681a
...
@@ -468,7 +468,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -468,7 +468,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 14 N 1 31 8
def Extra 253 255 14 N 1 31 8
...
@@ -484,7 +484,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -484,7 +484,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 5 Y 0 31 8
def type 253 10 5 Y 0 31 8
def possible_keys 253 4096 7 Y 0 31 8
def possible_keys 253 4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key_len 253
1365
1 Y 0 31 8
def key_len 253
4096
1 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 27 N 1 31 8
def Extra 253 255 27 N 1 31 8
...
...
mysql-test/r/ps_2myisam.result
View file @
a4b0681a
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/ps_3innodb.result
View file @
a4b0681a
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/ps_4heap.result
View file @
a4b0681a
...
@@ -1159,7 +1159,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1159,7 +1159,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/ps_5merge.result
View file @
a4b0681a
...
@@ -1201,7 +1201,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1201,7 +1201,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
@@ -4223,7 +4223,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -4223,7 +4223,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/ps_6bdb.result
View file @
a4b0681a
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/ps_7ndb.result
View file @
a4b0681a
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
...
@@ -1158,7 +1158,7 @@ def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
def type 253 10 3 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253
1365
0 Y 0 31 8
def key_len 253
4096
0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
def rows 8 10 1 Y 32928 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
...
...
mysql-test/r/show_check.result
View file @
a4b0681a
...
@@ -12,51 +12,51 @@ insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
...
@@ -12,51 +12,51 @@ insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
-- after Bug#29394 is implemented.
-- after Bug#29394 is implemented.
check table t1 fast;
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 27 Y 0 31 8
def Msg_text 253
25
5 27 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
test.t1 check status Table is already up to date
check table t1 fast;
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 27 Y 0 31 8
def Msg_text 253
25
5 27 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
test.t1 check status Table is already up to date
check table t1 changed;
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
insert into t1 values (5,5,5);
insert into t1 values (5,5,5);
check table t1 changed;
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
check table t1 medium;
check table t1 medium;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
check table t1 extended;
check table t1 extended;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
5 Y 0 31 8
def Op 253
10
5 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
show index from t1;
show index from t1;
...
@@ -84,10 +84,10 @@ ERROR 23000: Duplicate entry '5' for key 1
...
@@ -84,10 +84,10 @@ ERROR 23000: Duplicate entry '5' for key 1
-- after Bug#29394 is implemented.
-- after Bug#29394 is implemented.
optimize table t1;
optimize table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
8 Y 0 31 8
def Op 253
10
8 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
optimize table t1;
optimize table t1;
...
@@ -154,10 +154,10 @@ insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0
...
@@ -154,10 +154,10 @@ insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0
-- after Bug#29394 is implemented.
-- after Bug#29394 is implemented.
analyze table t1;
analyze table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
7 Y 0 31 8
def Op 253
10
7 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 analyze status OK
test.t1 analyze status OK
show index from t1;
show index from t1;
...
@@ -171,10 +171,10 @@ t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE
...
@@ -171,10 +171,10 @@ t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE
-- after Bug#29394 is implemented.
-- after Bug#29394 is implemented.
repair table t1;
repair table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
42
7 Y 0 31 8
def Table 253
128
7 Y 0 31 8
def Op 253
3
6 Y 0 31 8
def Op 253
10
6 Y 0 31 8
def Msg_type 253
3
6 Y 0 31 8
def Msg_type 253
10
6 Y 0 31 8
def Msg_text 253
8
5 2 Y 0 31 8
def Msg_text 253
25
5 2 Y 0 31 8
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair status OK
show index from t1;
show index from t1;
...
@@ -788,8 +788,8 @@ latin1_bin latin1 47 Yes 1
...
@@ -788,8 +788,8 @@ latin1_bin latin1 47 Yes 1
----------------------------------------------------------------
----------------------------------------------------------------
SHOW CREATE DATABASE mysqltest1;
SHOW CREATE DATABASE mysqltest1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Database 253
63
10 N 1 31 33
def Database 253
192
10 N 1 31 33
def Create Database 253
1023
69 N 1 31 33
def Create Database 253
3072
69 N 1 31 33
Database Create Database
Database Create Database
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
----------------------------------------------------------------
----------------------------------------------------------------
...
@@ -801,8 +801,8 @@ mysqltest1
...
@@ -801,8 +801,8 @@ mysqltest1
----------------------------------------------------------------
----------------------------------------------------------------
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253
63
2 N 1 31 33
def Table 253
192
2 N 1 31 33
def Create Table 253
1023
103 N 1 31 33
def Create Table 253
3072
103 N 1 31 33
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c` int(11) NOT NULL,
`c` int(11) NOT NULL,
...
@@ -959,8 +959,8 @@ NULL test t1_bi INSERT NULL test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW
...
@@ -959,8 +959,8 @@ NULL test t1_bi INSERT NULL test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW
----------------------------------------------------------------
----------------------------------------------------------------
SHOW CREATE VIEW v1;
SHOW CREATE VIEW v1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def View 253
63
2 N 1 31 33
def View 253
192
2 N 1 31 33
def Create View 253
1023
103 N 1 31 33
def Create View 253
3072
103 N 1 31 33
View Create View
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`
----------------------------------------------------------------
----------------------------------------------------------------
...
@@ -981,9 +981,9 @@ NULL test v1 /* ALGORITHM=UNDEFINED */ select 1 AS `1` NONE NO root@localhost DE
...
@@ -981,9 +981,9 @@ NULL test v1 /* ALGORITHM=UNDEFINED */ select 1 AS `1` NONE NO root@localhost DE
----------------------------------------------------------------
----------------------------------------------------------------
SHOW CREATE PROCEDURE p1;
SHOW CREATE PROCEDURE p1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Procedure 253
63
2 N 1 31 33
def Procedure 253
192
2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Procedure 253
2046
59 Y 0 31 33
def Create Procedure 253
6144
59 Y 0 31 33
Procedure sql_mode Create Procedure
Procedure sql_mode Create Procedure
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1
SELECT 1
...
@@ -1033,9 +1033,9 @@ p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL D
...
@@ -1033,9 +1033,9 @@ p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL D
----------------------------------------------------------------
----------------------------------------------------------------
SHOW CREATE FUNCTION f1;
SHOW CREATE FUNCTION f1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Function 253
63
2 N 1 31 33
def Function 253
192
2 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def sql_mode 253 0 0 N 1 31 33
def Create Function 253
2046
74 Y 0 31 33
def Create Function 253
6144
74 Y 0 31 33
Function sql_mode Create Function
Function sql_mode Create Function
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 1
RETURN 1
...
@@ -1141,4 +1141,34 @@ Slow_queries 2
...
@@ -1141,4 +1141,34 @@ Slow_queries 2
show variables like 'myisam_recover_options';
show variables like 'myisam_recover_options';
Variable_name Value
Variable_name Value
myisam_recover_options OFF
myisam_recover_options OFF
CREATE TABLE t1 (
Codigo int(10) unsigned NOT NULL auto_increment,
Nombre varchar(255) default NULL,
Telefono varchar(255) default NULL,
Observaciones longtext,
Direccion varchar(255) default NULL,
Dni varchar(255) default NULL,
CP int(11) default NULL,
Provincia varchar(255) default NULL,
Poblacion varchar(255) default NULL,
PRIMARY KEY (Codigo)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
show create table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Table 253 64 2 N 1 31 7
def Create Table 253 1024 446 N 1 31 7
Table Create Table
t1 CREATE TABLE `t1` (
`Codigo` int(10) unsigned NOT NULL auto_increment,
`Nombre` varchar(255) default NULL,
`Telefono` varchar(255) default NULL,
`Observaciones` longtext,
`Direccion` varchar(255) default NULL,
`Dni` varchar(255) default NULL,
`CP` int(11) default NULL,
`Provincia` varchar(255) default NULL,
`Poblacion` varchar(255) default NULL,
PRIMARY KEY (`Codigo`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/r/sp.result
View file @
a4b0681a
...
@@ -6646,6 +6646,22 @@ ttt
...
@@ -6646,6 +6646,22 @@ ttt
2
2
drop function func30787;
drop function func30787;
drop table t1;
drop table t1;
create table t1(c1 INT);
create function f1(p1 int) returns varchar(32)
return 'aaa';
create view v1 as select f1(c1) as parent_control_name from t1;
create procedure p1()
begin
select parent_control_name as c1 from v1;
end //
call p1();
c1
call p1();
c1
drop procedure p1;
drop function f1;
drop view v1;
drop table t1;
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# -- End of 5.0 tests
# -- End of 5.0 tests
# ------------------------------------------------------------------
# ------------------------------------------------------------------
mysql-test/r/type_newdecimal.result
View file @
a4b0681a
...
@@ -1519,4 +1519,9 @@ SELECT f1 FROM t1;
...
@@ -1519,4 +1519,9 @@ SELECT f1 FROM t1;
f1
f1
99999999999999999999999999999.999999999999999999999999999999
99999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
DROP TABLE t1;
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
(1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000)
0.812988073953673124592306939480
End of 5.0 tests
End of 5.0 tests
mysql-test/t/federated.test
View file @
a4b0681a
...
@@ -1750,4 +1750,26 @@ DROP TABLE t1;
...
@@ -1750,4 +1750,26 @@ DROP TABLE t1;
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
federated
CONNECTION
=
'mysql://@:://'
;
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
federated
CONNECTION
=
'mysql://@:://'
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #34779: crash in checksum table on federated tables with blobs
# containing nulls
#
connection
slave
;
CREATE
TABLE
t1
(
a
LONGBLOB
,
b
LONGBLOB
);
INSERT
INTO
t1
VALUES
(
'aaaaaaaaaaaaaaaaaaaaaaaaaaaa'
,
NULL
);
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
CREATE
TABLE
t1
(
a
LONGBLOB
,
b
LONGBLOB
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'
;
CHECKSUM
TABLE
t1
;
connection
slave
;
DROP
TABLE
t1
;
connection
master
;
DROP
TABLE
t1
;
source
include
/
federated_cleanup
.
inc
;
source
include
/
federated_cleanup
.
inc
;
--
echo
End
of
5.0
tests
mysql-test/t/show_check.test
View file @
a4b0681a
...
@@ -844,4 +844,24 @@ show status like 'slow_queries';
...
@@ -844,4 +844,24 @@ show status like 'slow_queries';
#
#
show
variables
like
'myisam_recover_options'
;
show
variables
like
'myisam_recover_options'
;
#
# Bug#37301 Length and Max_length differ with no obvious reason
#
CREATE
TABLE
t1
(
Codigo
int
(
10
)
unsigned
NOT
NULL
auto_increment
,
Nombre
varchar
(
255
)
default
NULL
,
Telefono
varchar
(
255
)
default
NULL
,
Observaciones
longtext
,
Direccion
varchar
(
255
)
default
NULL
,
Dni
varchar
(
255
)
default
NULL
,
CP
int
(
11
)
default
NULL
,
Provincia
varchar
(
255
)
default
NULL
,
Poblacion
varchar
(
255
)
default
NULL
,
PRIMARY
KEY
(
Codigo
)
)
ENGINE
=
MyISAM
AUTO_INCREMENT
=
11
DEFAULT
CHARSET
=
utf8
;
--
enable_metadata
show
create
table
t1
;
--
disable_metadata
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/sp.test
View file @
a4b0681a
...
@@ -7794,6 +7794,30 @@ drop function func30787;
...
@@ -7794,6 +7794,30 @@ drop function func30787;
drop
table
t1
;
drop
table
t1
;
#
# Bug#38291 memory corruption and server crash with view/sp/function
#
create
table
t1
(
c1
INT
);
create
function
f1
(
p1
int
)
returns
varchar
(
32
)
return
'aaa'
;
create
view
v1
as
select
f1
(
c1
)
as
parent_control_name
from
t1
;
delimiter
//;
create
procedure
p1
()
begin
select
parent_control_name
as
c1
from
v1
;
end
//
delimiter
;
//
call
p1
();
call
p1
();
drop
procedure
p1
;
drop
function
f1
;
drop
view
v1
;
drop
table
t1
;
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
--
echo
# -- End of 5.0 tests
--
echo
# -- End of 5.0 tests
--
echo
# ------------------------------------------------------------------
--
echo
# ------------------------------------------------------------------
mysql-test/t/type_newdecimal.test
View file @
a4b0681a
...
@@ -1216,4 +1216,13 @@ DESC t1;
...
@@ -1216,4 +1216,13 @@ DESC t1;
SELECT
f1
FROM
t1
;
SELECT
f1
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #36270: incorrect calculation result - works in 4.1 but not in 5.0 or 5.1
#
# show that if we need to truncate the scale of an operand, we pick the
# right one (that is, we discard the least significant decimal places)
select
(
1.20396873
*
0.89550000
*
0.68000000
*
1.08721696
*
0.99500000
*
1.01500000
*
1.01500000
*
0.99500000
);
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysys/mf_pack.c
View file @
a4b0681a
...
@@ -343,7 +343,7 @@ uint unpack_dirname(my_string to, const char *from)
...
@@ -343,7 +343,7 @@ uint unpack_dirname(my_string to, const char *from)
length
-=
(
uint
)
(
suffix
-
buff
)
-
1
;
length
-=
(
uint
)
(
suffix
-
buff
)
-
1
;
if
(
length
+
(
h_length
=
(
uint
)
strlen
(
tilde_expansion
))
<=
FN_REFLEN
)
if
(
length
+
(
h_length
=
(
uint
)
strlen
(
tilde_expansion
))
<=
FN_REFLEN
)
{
{
if
(
tilde_expansion
[
h_length
-
1
]
==
FN_LIBCHAR
)
if
(
(
h_length
>
0
)
&&
(
tilde_expansion
[
h_length
-
1
]
==
FN_LIBCHAR
)
)
h_length
--
;
h_length
--
;
if
(
buff
+
h_length
<
suffix
)
if
(
buff
+
h_length
<
suffix
)
bmove
(
buff
+
h_length
,
suffix
,
length
);
bmove
(
buff
+
h_length
,
suffix
,
length
);
...
...
netware/BUILD/compile-linux-tools
View file @
a4b0681a
...
@@ -53,6 +53,9 @@ make
...
@@ -53,6 +53,9 @@ make
# so the file will be linked
# so the file will be linked
(
cd
sql
;
make sql_yacc.cc
)
(
cd
sql
;
make sql_yacc.cc
)
# we need initilizing SQL files.
(
cd
netware
;
make test_db.sql init_db.sql
)
# copying required linux tools
# copying required linux tools
cp
extra/comp_err extra/comp_err.linux
cp
extra/comp_err extra/comp_err.linux
cp
libmysql/conf_to_src libmysql/conf_to_src.linux
cp
libmysql/conf_to_src libmysql/conf_to_src.linux
...
...
netware/BUILD/nwbootstrap
View file @
a4b0681a
...
@@ -91,8 +91,8 @@ done
...
@@ -91,8 +91,8 @@ done
echo
"starting build..."
echo
"starting build..."
# check for bk and repo_dir
# check for bk and repo_dir
b
k
help
>
/dev/null
b
zr
help
>
/dev/null
repo_dir
=
`
b
k
root
$repo_dir
`
repo_dir
=
`
b
zr
root
$repo_dir
`
cd
$repo_dir
cd
$repo_dir
doc_dir
=
"
$repo_dir
/../mysqldoc"
doc_dir
=
"
$repo_dir
/../mysqldoc"
...
@@ -100,7 +100,7 @@ doc_dir="$repo_dir/../mysqldoc"
...
@@ -100,7 +100,7 @@ doc_dir="$repo_dir/../mysqldoc"
temp_dir
=
"
$build_dir
/mysql-
$$
.tmp"
temp_dir
=
"
$build_dir
/mysql-
$$
.tmp"
# export the bk tree
# export the bk tree
command
=
"b
k
export"
;
command
=
"b
zr
export"
;
if
test
$revision
;
then
command
=
"
$command
-r
$revision
"
;
fi
if
test
$revision
;
then
command
=
"
$command
-r
$revision
"
;
fi
command
=
"
$command
$temp_dir
"
command
=
"
$command
$temp_dir
"
echo
"exporting
$repo_dir
..."
echo
"exporting
$repo_dir
..."
...
@@ -178,6 +178,8 @@ awk 'BEGIN{x=0;} END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {pri
...
@@ -178,6 +178,8 @@ awk 'BEGIN{x=0;} END{printf("\n");} x==1 {printf(" %s",$1); x++; next} x>1 {pri
# build linux tools
# build linux tools
echo
"compiling linux tools..."
echo
"compiling linux tools..."
./netware/BUILD/compile-linux-tools
./netware/BUILD/compile-linux-tools
test
-f
./netware/init_db.sql
# this must exist
test
-f
./netware/test_db.sql
# this must exist
# compile
# compile
if
test
$build
if
test
$build
...
...
netware/Makefile.am
View file @
a4b0681a
...
@@ -103,8 +103,7 @@ init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \
...
@@ -103,8 +103,7 @@ init_db.sql: $(top_srcdir)/scripts/mysql_system_tables.sql \
@
echo
"CREATE DATABASE mysql;"
>
$@
;
@
echo
"CREATE DATABASE mysql;"
>
$@
;
@
echo
"CREATE DATABASE test;"
>>
$@
;
@
echo
"CREATE DATABASE test;"
>>
$@
;
@
echo
"use mysql;"
>>
$@
;
@
echo
"use mysql;"
>>
$@
;
@
cat
$(top_srcdir)
/scripts/mysql_system_tables.sql
\
@
cat
$(top_srcdir)
/scripts/mysql_system_tables.sql
>>
$@
;
$(top_srcdir)
/scripts/mysql_system_tables_fix.sql
>>
$@
;
# Build test_db.sql from init_db.sql plus
# Build test_db.sql from init_db.sql plus
# some test data
# some test data
...
...
netware/mysql_install_db.c
View file @
a4b0681a
...
@@ -324,9 +324,10 @@ void create_paths()
...
@@ -324,9 +324,10 @@ void create_paths()
******************************************************************************/
******************************************************************************/
int
mysql_install_db
(
int
argc
,
char
*
argv
[])
int
mysql_install_db
(
int
argc
,
char
*
argv
[])
{
{
arg_list_t
al
;
arg_list_t
al
;
int
i
,
j
,
err
;
int
i
,
j
,
err
;
char
skip
;
char
skip
;
struct
stat
info
;
// private options
// private options
static
char
*
private_options
[]
=
static
char
*
private_options
[]
=
...
@@ -363,6 +364,15 @@ int mysql_install_db(int argc, char *argv[])
...
@@ -363,6 +364,15 @@ int mysql_install_db(int argc, char *argv[])
add_arg
(
&
al
,
"--skip-innodb"
);
add_arg
(
&
al
,
"--skip-innodb"
);
add_arg
(
&
al
,
"--skip-bdb"
);
add_arg
(
&
al
,
"--skip-bdb"
);
if
((
err
=
stat
(
sql_file
,
&
info
))
!=
0
)
{
printf
(
"ERROR - %s:
\n
"
,
strerror
(
errno
));
printf
(
"
\t
%s
\n\n
"
,
sql_file
);
// free args
free_args
(
&
al
);
exit
(
-
1
);
}
// spawn mysqld
// spawn mysqld
err
=
spawn
(
mysqld
,
&
al
,
TRUE
,
sql_file
,
out_log
,
err_log
);
err
=
spawn
(
mysqld
,
&
al
,
TRUE
,
sql_file
,
out_log
,
err_log
);
...
@@ -395,9 +405,9 @@ int main(int argc, char **argv)
...
@@ -395,9 +405,9 @@ int main(int argc, char **argv)
// install the database
// install the database
if
(
mysql_install_db
(
argc
,
argv
))
if
(
mysql_install_db
(
argc
,
argv
))
{
{
printf
(
"ERROR -
The database creation failed
!
\n
"
);
printf
(
"ERROR -
Failed to create the database
!
\n
"
);
printf
(
" %s
\n
"
,
strerror
(
errno
));
printf
(
" %s
\n
"
,
strerror
(
errno
));
printf
(
"See the following log for more info
mr
ation:
\n
"
);
printf
(
"See the following log for more info
rm
ation:
\n
"
);
printf
(
"
\t
%s
\n\n
"
,
err_log
);
printf
(
"
\t
%s
\n\n
"
,
err_log
);
exit
(
-
1
);
exit
(
-
1
);
}
}
...
...
sql/ha_federated.cc
View file @
a4b0681a
...
@@ -731,7 +731,10 @@ uint ha_federated::convert_row_to_internal_format(byte *record,
...
@@ -731,7 +731,10 @@ uint ha_federated::convert_row_to_internal_format(byte *record,
old_ptr
=
(
my_ptrdiff_t
)
(
record
-
table
->
record
[
0
]);
old_ptr
=
(
my_ptrdiff_t
)
(
record
-
table
->
record
[
0
]);
(
*
field
)
->
move_field
(
old_ptr
);
(
*
field
)
->
move_field
(
old_ptr
);
if
(
!
row
[
x
])
if
(
!
row
[
x
])
{
(
*
field
)
->
set_null
();
(
*
field
)
->
set_null
();
(
*
field
)
->
reset
();
}
else
else
{
{
(
*
field
)
->
set_notnull
();
(
*
field
)
->
set_notnull
();
...
...
sql/item.cc
View file @
a4b0681a
...
@@ -5764,6 +5764,10 @@ void Item_ref::make_field(Send_field *field)
...
@@ -5764,6 +5764,10 @@ void Item_ref::make_field(Send_field *field)
field
->
table_name
=
table_name
;
field
->
table_name
=
table_name
;
if
(
db_name
)
if
(
db_name
)
field
->
db_name
=
db_name
;
field
->
db_name
=
db_name
;
if
(
orig_field_name
)
field
->
org_col_name
=
orig_field_name
;
if
(
orig_table_name
)
field
->
org_table_name
=
orig_table_name
;
}
}
...
...
sql/item.h
View file @
a4b0681a
...
@@ -1817,7 +1817,7 @@ class Item_empty_string :public Item_string
...
@@ -1817,7 +1817,7 @@ class Item_empty_string :public Item_string
public:
public:
Item_empty_string
(
const
char
*
header
,
uint
length
,
CHARSET_INFO
*
cs
=
NULL
)
:
Item_empty_string
(
const
char
*
header
,
uint
length
,
CHARSET_INFO
*
cs
=
NULL
)
:
Item_string
(
""
,
0
,
cs
?
cs
:
&
my_charset_utf8_general_ci
)
Item_string
(
""
,
0
,
cs
?
cs
:
&
my_charset_utf8_general_ci
)
{
name
=
(
char
*
)
header
;
max_length
=
cs
?
length
*
cs
->
mbmaxlen
:
length
;
}
{
name
=
(
char
*
)
header
;
max_length
=
length
*
collation
.
collation
->
mbmaxlen
;
}
void
make_field
(
Send_field
*
field
);
void
make_field
(
Send_field
*
field
);
};
};
...
...
sql/sql_show.cc
View file @
a4b0681a
...
@@ -3666,12 +3666,10 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
...
@@ -3666,12 +3666,10 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
/* Don't let unimplemented types pass through. Could be a grave error. */
/* Don't let unimplemented types pass through. Could be a grave error. */
DBUG_ASSERT
(
fields_info
->
field_type
==
MYSQL_TYPE_STRING
);
DBUG_ASSERT
(
fields_info
->
field_type
==
MYSQL_TYPE_STRING
);
/* this should be changed when Item_empty_string is fixed(in 4.1) */
if
(
!
(
item
=
new
Item_empty_string
(
""
,
fields_info
->
field_length
,
cs
)))
if
(
!
(
item
=
new
Item_empty_string
(
""
,
0
,
cs
)))
{
{
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
item
->
max_length
=
fields_info
->
field_length
*
cs
->
mbmaxlen
;
item
->
set_name
(
fields_info
->
field_name
,
item
->
set_name
(
fields_info
->
field_name
,
strlen
(
fields_info
->
field_name
),
cs
);
strlen
(
fields_info
->
field_name
),
cs
);
break
;
break
;
...
...
strings/decimal.c
View file @
a4b0681a
...
@@ -1999,18 +1999,18 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
...
@@ -1999,18 +1999,18 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
sanity
(
to
);
sanity
(
to
);
i
=
intg0
;
i
=
intg0
;
/* save 'ideal' values */
j
=
frac0
;
j
=
frac0
;
FIX_INTG_FRAC_ERROR
(
to
->
len
,
intg0
,
frac0
,
error
);
FIX_INTG_FRAC_ERROR
(
to
->
len
,
intg0
,
frac0
,
error
);
/* bound size */
to
->
sign
=
from1
->
sign
!=
from2
->
sign
;
to
->
sign
=
from1
->
sign
!=
from2
->
sign
;
to
->
frac
=
from1
->
frac
+
from2
->
frac
;
to
->
frac
=
from1
->
frac
+
from2
->
frac
;
/* store size in digits */
to
->
intg
=
intg0
*
DIG_PER_DEC1
;
to
->
intg
=
intg0
*
DIG_PER_DEC1
;
if
(
unlikely
(
error
))
if
(
unlikely
(
error
))
{
{
set_if_smaller
(
to
->
frac
,
frac0
*
DIG_PER_DEC1
);
set_if_smaller
(
to
->
frac
,
frac0
*
DIG_PER_DEC1
);
set_if_smaller
(
to
->
intg
,
intg0
*
DIG_PER_DEC1
);
set_if_smaller
(
to
->
intg
,
intg0
*
DIG_PER_DEC1
);
if
(
unlikely
(
i
>
intg0
))
if
(
unlikely
(
i
>
intg0
))
/* bounded integer-part */
{
{
i
-=
intg0
;
i
-=
intg0
;
j
=
i
>>
1
;
j
=
i
>>
1
;
...
@@ -2018,12 +2018,20 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
...
@@ -2018,12 +2018,20 @@ int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to)
intg2
-=
i
-
j
;
intg2
-=
i
-
j
;
frac1
=
frac2
=
0
;
/* frac0 is already 0 here */
frac1
=
frac2
=
0
;
/* frac0 is already 0 here */
}
}
else
else
/* bounded fract part */
{
{
j
-=
frac0
;
j
-=
frac0
;
i
=
j
>>
1
;
i
=
j
>>
1
;
frac1
-=
i
;
if
(
frac1
<=
frac2
)
frac2
-=
j
-
i
;
{
frac1
-=
i
;
frac2
-=
j
-
i
;
}
else
{
frac2
-=
i
;
frac1
-=
j
-
i
;
}
}
}
}
}
start0
=
to
->
buf
+
intg0
+
frac0
-
1
;
start0
=
to
->
buf
+
intg0
+
frac0
-
1
;
...
...
tests/mysql_client_test.c
View file @
a4b0681a
...
@@ -7578,9 +7578,7 @@ static void test_explain_bug()
...
@@ -7578,9 +7578,7 @@ static void test_explain_bug()
else
else
{
{
verify_prepare_field
(
result
,
6
,
"key_len"
,
""
,
MYSQL_TYPE_VAR_STRING
,
""
,
verify_prepare_field
(
result
,
6
,
"key_len"
,
""
,
MYSQL_TYPE_VAR_STRING
,
""
,
""
,
""
,
""
,
""
,
NAME_LEN
*
MAX_KEY
,
0
);
NAME_LEN
*
MAX_KEY
/
my_charset_utf8_general_ci
.
mbmaxlen
,
0
);
}
}
verify_prepare_field
(
result
,
7
,
"ref"
,
""
,
MYSQL_TYPE_VAR_STRING
,
verify_prepare_field
(
result
,
7
,
"ref"
,
""
,
MYSQL_TYPE_VAR_STRING
,
...
@@ -16164,7 +16162,7 @@ static void test_bug32265()
...
@@ -16164,7 +16162,7 @@ static void test_bug32265()
metadata
=
mysql_stmt_result_metadata
(
stmt
);
metadata
=
mysql_stmt_result_metadata
(
stmt
);
field
=
mysql_fetch_field
(
metadata
);
field
=
mysql_fetch_field
(
metadata
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
t
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
v
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
mysql_free_result
(
metadata
);
mysql_free_result
(
metadata
);
mysql_stmt_close
(
stmt
);
mysql_stmt_close
(
stmt
);
...
@@ -16176,7 +16174,7 @@ static void test_bug32265()
...
@@ -16176,7 +16174,7 @@ static void test_bug32265()
metadata
=
mysql_stmt_result_metadata
(
stmt
);
metadata
=
mysql_stmt_result_metadata
(
stmt
);
field
=
mysql_fetch_field
(
metadata
);
field
=
mysql_fetch_field
(
metadata
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
table
,
"v1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
t
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
org_table
,
"
v
1"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
DIE_UNLESS
(
strcmp
(
field
->
db
,
"client_test_db"
)
==
0
);
mysql_free_result
(
metadata
);
mysql_free_result
(
metadata
);
mysql_stmt_close
(
stmt
);
mysql_stmt_close
(
stmt
);
...
...
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