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
2a4cfe8b
Commit
2a4cfe8b
authored
Feb 06, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merge 3.23 -> 4.0, 2003/02/06
parents
65058069
2093624a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
125 additions
and
23 deletions
+125
-23
.bzrignore
.bzrignore
+13
-13
COPYING.LIB
COPYING.LIB
+0
-0
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+8
-0
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+12
-0
mysql-test/r/insert_select.result
mysql-test/r/insert_select.result
+12
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+17
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+11
-0
mysql-test/t/insert_select.test
mysql-test/t/insert_select.test
+29
-0
sql/item_func.cc
sql/item_func.cc
+4
-2
sql/sql_select.cc
sql/sql_select.cc
+7
-1
sql/sql_table.cc
sql/sql_table.cc
+12
-7
No files found.
.bzrignore
View file @
2a4cfe8b
...
...
@@ -38,7 +38,11 @@ COPYING.LIB
Docs/#manual.texi#
Docs/INSTALL-BINARY
Docs/include.texi
Docs/internals.html
Docs/internals.info
Docs/internals.pdf
Docs/internals.txt
Docs/internals_toc.html
Docs/manual.aux
Docs/manual.cp
Docs/manual.cps
...
...
@@ -221,6 +225,7 @@ extra/replace
extra/resolve_stack_dump
extra/resolveip
gmon.out
hardcopy.0
heap/hp_test1
heap/hp_test2
include/my_config.h
...
...
@@ -251,11 +256,13 @@ libmysql/conf_to_src
libmysql/my_static.h
libmysql/mysys_priv.h
libmysql/net.c
libmysql/vio_priv.h
libmysql_r/*.c
libmysql_r/acconfig.h
libmysql_r/conf_to_src
libmysql_r/my_static.h
libmysql_r/mysys_priv.h
libmysql_r/vio_priv.h
libmysqld/backup_dir
libmysqld/convert.cc
libmysqld/derror.cc
...
...
@@ -363,6 +370,7 @@ linked_libmysqldex_sources
linked_server_sources
linked_tools_sources
locked
man/*.1
mit-pthreads/config.flags
mit-pthreads/include/bits
mit-pthreads/include/pthread/machdep.h
...
...
@@ -382,6 +390,7 @@ myisam/mi_test2
myisam/mi_test3
myisam/mi_test_all
myisam/myisam.log
myisam/myisam_ftdump
myisam/myisamchk
myisam/myisamlog
myisam/myisampack
...
...
@@ -429,6 +438,8 @@ repl-tests/test-repl/sum-wlen-slave.master.
repl-tests/test-repl/sum-wlen-slave.master.re
repl-tests/test-repl/sum-wlen-slave.master.reje
scripts/make_binary_distribution
scripts/make_sharedlib_distribution
scripts/make_win_src_distribution
scripts/msql2mysql
scripts/mysql_config
scripts/mysql_convert_table_format
...
...
@@ -496,6 +507,7 @@ sql/share/norwegian/errmsg.sys
sql/sql_select.cc.orig
sql/sql_yacc.cc
sql/sql_yacc.h
sql/udf_example.so
stamp-h
stamp-h.in
stamp-h1
...
...
@@ -504,6 +516,7 @@ strings/ctype_autoconf.c
strings/ctype_extra_sources.c
support-files/MacOSX/Description.plist
support-files/MacOSX/Info.plist
support-files/MacOSX/ReadMe.txt
support-files/MacOSX/StartupParameters.plist
support-files/MacOSX/postinstall
support-files/MacOSX/preinstall
...
...
@@ -530,16 +543,3 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
support-files/MacOSX/ReadMe.txt
Docs/internals.html
Docs/internals.pdf
Docs/internals.txt
Docs/internals_toc.html
scripts/make_win_src_distribution
libmysql/vio_priv.h
libmysql_r/vio_priv.h
hardcopy.0
scripts/make_sharedlib_distribution
sql/udf_example.so
man/*.1
myisam/myisam_ftdump
mysys/
COPYING.LIB
→
COPYING.LIB
View file @
2a4cfe8b
File moved
mysql-test/r/alter_table.result
View file @
2a4cfe8b
...
...
@@ -350,3 +350,11 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE
t1 0 PRIMARY 2 User A 0 NULL NULL BTREE
t1 1 Host 1 Host A NULL NULL NULL BTREE disabled
DROP TABLE t1;
name
current
name
mysqltest
name
current
name
mysqltest
mysql-test/r/func_math.result
View file @
2a4cfe8b
...
...
@@ -41,3 +41,15 @@ pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1)
select degrees(pi()),radians(360);
degrees(pi()) radians(360)
180 6.2831853071796
ACOS(1.0)
0.000000
ASIN(1.0)
1.570796
ACOS(0.2*5.0)
0.000000
ACOS(0.5*2.0)
0.000000
ASIN(0.8+0.2)
1.570796
ASIN(1.2-0.2)
1.570796
mysql-test/r/insert_select.result
View file @
2a4cfe8b
...
...
@@ -592,3 +592,15 @@ CREATE TABLE t2 ( USID INTEGER UNSIGNED AUTO_INCREMENT, ServerID TINYINT UNSIGNE
INSERT INTO t1 VALUES (39,42,'Access-Granted','46','491721000045',2130706433,17690,NULL,NULL,'Localnet','491721000045','49172200000',754974766,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2003-07-18 00:11:21',NULL,NULL,20030718001121);
INSERT INTO t2 SELECT USID, ServerID, State, SessionID, User, NASAddr, NASPort, NASPortType, ConnectSpeed, CarrierType, CallingStationID, CalledStationID, AssignedAddr, SessionTime, PacketsIn, OctetsIn, PacketsOut, OctetsOut, TerminateCause, UnauthTime, AccessRequestTime, AcctStartTime, AcctLastTime, LastModification from t1 LIMIT 1;
drop table t1,t2;
Month Type Field Count
2003-09-01 1 1 100
2003-09-01 1 2 100
2003-09-01 2 1 100
2003-09-01 2 2 100
2003-09-01 3 1 100
NULL Field Count
NULL 1 100
NULL 2 100
No Field Count
0 1 100
0 2 100
mysql-test/t/alter_table.test
View file @
2a4cfe8b
...
...
@@ -204,3 +204,20 @@ LOCK TABLES t1 WRITE;
ALTER
TABLE
t1
DISABLE
KEYS
;
SHOW
INDEX
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug #2628: 'alter table t1 rename mysqltest.t1' silently drops mysqltest.t1
# if it exists
#
create
table
t1
(
name
char
(
15
));
insert
into
t1
(
name
)
values
(
"current"
);
create
database
mysqltest
;
create
table
mysqltest
.
t1
(
name
char
(
15
));
insert
into
mysqltest
.
t1
(
name
)
values
(
"mysqltest"
);
select
*
from
t1
;
select
*
from
mysqltest
.
t1
;
--
error
1050
alter
table
t1
rename
mysqltest
.
t1
;
select
*
from
t1
;
select
*
from
mysqltest
.
t1
;
drop
table
t1
;
drop
database
mysqltest
;
mysql-test/t/func_math.test
View file @
2a4cfe8b
...
...
@@ -17,3 +17,14 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000;
select
rand
(
999999
),
rand
();
select
pi
(),
sin
(
pi
()
/
2
),
cos
(
pi
()
/
2
),
abs
(
tan
(
pi
())),
cot
(
1
),
asin
(
1
),
acos
(
0
),
atan
(
1
);
select
degrees
(
pi
()),
radians
(
360
);
#
# Bug #2338 Trignometric arithmatic problems
#
SELECT
ACOS
(
1.0
);
SELECT
ASIN
(
1.0
);
SELECT
ACOS
(
0.2
*
5.0
);
SELECT
ACOS
(
0.5
*
2.0
);
SELECT
ASIN
(
0.8
+
0.2
);
SELECT
ASIN
(
1.2
-
0.2
);
mysql-test/t/insert_select.test
View file @
2a4cfe8b
...
...
@@ -132,3 +132,32 @@ CREATE TABLE t2 ( USID INTEGER UNSIGNED AUTO_INCREMENT, ServerID TINYINT UNSIGNE
INSERT
INTO
t1
VALUES
(
39
,
42
,
'Access-Granted'
,
'46'
,
'491721000045'
,
2130706433
,
17690
,
NULL
,
NULL
,
'Localnet'
,
'491721000045'
,
'49172200000'
,
754974766
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'2003-07-18 00:11:21'
,
NULL
,
NULL
,
20030718001121
);
INSERT
INTO
t2
SELECT
USID
,
ServerID
,
State
,
SessionID
,
User
,
NASAddr
,
NASPort
,
NASPortType
,
ConnectSpeed
,
CarrierType
,
CallingStationID
,
CalledStationID
,
AssignedAddr
,
SessionTime
,
PacketsIn
,
OctetsIn
,
PacketsOut
,
OctetsOut
,
TerminateCause
,
UnauthTime
,
AccessRequestTime
,
AcctStartTime
,
AcctLastTime
,
LastModification
from
t1
LIMIT
1
;
drop
table
t1
,
t2
;
# Another problem from Bug #2012
#
CREATE
TABLE
t1
(
Month
date
NOT
NULL
,
Type
tinyint
(
3
)
unsigned
NOT
NULL
auto_increment
,
Field
int
(
10
)
unsigned
NOT
NULL
,
Count
int
(
10
)
unsigned
NOT
NULL
,
UNIQUE
KEY
Month
(
Month
,
Type
,
Field
)
);
insert
into
t1
Values
(
20030901
,
1
,
1
,
100
),
(
20030901
,
1
,
2
,
100
),
(
20030901
,
2
,
1
,
100
),
(
20030901
,
2
,
2
,
100
),
(
20030901
,
3
,
1
,
100
);
select
*
from
t1
;
Select
null
,
Field
,
Count
From
t1
Where
Month
=
20030901
and
Type
=
2
;
create
table
t2
(
No
int
not
null
,
Field
int
not
null
,
Count
int
not
null
);
insert
into
t2
Select
null
,
Field
,
Count
From
t1
Where
Month
=
20030901
and
Type
=
2
;
select
*
from
t2
;
drop
table
t1
,
t2
;
sql/item_func.cc
View file @
2a4cfe8b
...
...
@@ -551,7 +551,8 @@ double Item_func_pow::val()
double
Item_func_acos
::
val
()
{
double
value
=
args
[
0
]
->
val
();
// the volatile's for BUG #2338 to calm optimizer down (because of gcc's bug)
volatile
double
value
=
args
[
0
]
->
val
();
if
((
null_value
=
(
args
[
0
]
->
null_value
||
(
value
<
-
1.0
||
value
>
1.0
))))
return
0.0
;
return
fix_result
(
acos
(
value
));
...
...
@@ -559,7 +560,8 @@ double Item_func_acos::val()
double
Item_func_asin
::
val
()
{
double
value
=
args
[
0
]
->
val
();
// the volatile's for BUG #2338 to calm optimizer down (because of gcc's bug)
volatile
double
value
=
args
[
0
]
->
val
();
if
((
null_value
=
(
args
[
0
]
->
null_value
||
(
value
<
-
1.0
||
value
>
1.0
))))
return
0.0
;
return
fix_result
(
asin
(
value
));
...
...
sql/sql_select.cc
View file @
2a4cfe8b
...
...
@@ -2596,9 +2596,15 @@ store_val_in_field(Field *field,Item *item)
bool
error
;
THD
*
thd
=
current_thd
;
ha_rows
cuted_fields
=
thd
->
cuted_fields
;
/*
we should restore old value of count_cuted_fields because
store_val_in_field can be called from mysql_insert
with select_insert, which make count_cuted_fields= 1
*/
bool
old_count_cuted_fields
=
thd
->
count_cuted_fields
;
thd
->
count_cuted_fields
=
1
;
error
=
item
->
save_in_field
(
field
,
1
);
thd
->
count_cuted_fields
=
0
;
thd
->
count_cuted_fields
=
old_count_cuted_fields
;
return
error
||
cuted_fields
!=
thd
->
cuted_fields
;
}
...
...
sql/sql_table.cc
View file @
2a4cfe8b
...
...
@@ -1478,7 +1478,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
alias
=
(
lower_case_table_names
==
2
)
?
table_list
->
alias
:
table_name
;
db
=
table_list
->
db
;
if
(
!
new_db
||
!
strcmp
(
new_db
,
db
))
if
(
!
new_db
||
!
strcmp
(
new_db
,
db
))
new_db
=
db
;
used_fields
=
create_info
->
used_fields
;
...
...
@@ -1490,8 +1490,6 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
if
(
new_name
)
{
strmov
(
new_name_buff
,
new_name
);
strmov
(
new_alias
=
new_alias_buff
,
new_name
);
fn_same
(
new_name_buff
,
table_name
,
3
);
if
(
lower_case_table_names
)
{
if
(
lower_case_table_names
!=
2
)
...
...
@@ -1501,11 +1499,18 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
casedn_str
(
new_name
);
}
if
((
lower_case_table_names
&&
!
my_strcasecmp
(
new_name_buff
,
table_name
))
||
(
!
lower_case_table_names
&&
if
(
new_db
==
db
&&
(
lower_case_table_names
&&
!
my_strcasecmp
(
new_name_buff
,
table_name
)
||
!
lower_case_table_names
&&
!
strcmp
(
new_name_buff
,
table_name
)))
new_alias
=
new_name
=
table_name
;
// No change. Make later check easier
{
/*
Source and destination table names are equal: make later check
easier.
*/
new_alias
=
new_name
=
table_name
;
}
else
{
if
(
table
->
tmp_table
)
...
...
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