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
13161c2a
Commit
13161c2a
authored
Sep 28, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
parents
f8bb9a4b
324f4be3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
127 additions
and
3 deletions
+127
-3
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+2
-2
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+28
-0
mysql-test/r/select.result
mysql-test/r/select.result
+9
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+41
-0
mysql-test/t/select.test
mysql-test/t/select.test
+10
-0
scripts/mysql_config.sh
scripts/mysql_config.sh
+1
-1
sql/ha_innodb.cc
sql/ha_innodb.cc
+7
-0
sql/item.cc
sql/item.cc
+29
-0
No files found.
libmysqld/lib_sql.cc
View file @
13161c2a
...
...
@@ -423,9 +423,9 @@ int init_embedded_server(int argc, char **argv, char **groups)
acl_error
=
0
;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
(
acl_error
=
acl_init
(
(
THD
*
)
0
,
opt_noacl
))
&&
if
(
!
(
acl_error
=
acl_init
(
opt_noacl
))
&&
!
opt_noacl
)
(
void
)
grant_init
(
(
THD
*
)
0
);
(
void
)
grant_init
();
#endif
if
(
acl_error
||
my_tz_init
((
THD
*
)
0
,
default_tz_name
,
opt_bootstrap
))
{
...
...
mysql-test/r/innodb.result
View file @
13161c2a
...
...
@@ -1739,6 +1739,34 @@ select min(b) from t1 where a='8';
min(b)
6
drop table t1;
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into test_checksum values (1),(2);
set autocommit=0;
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
insert into test_checksum values(3);
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
commit;
checksum table test_checksum;
Table Checksum
test.test_checksum 2050879373
commit;
drop table test_checksum;
create table test_checksum(a int not null) engine=innodb DEFAULT CHARSET=latin1;
insert into test_checksum values (1),(2);
set autocommit=1;
checksum table test_checksum;
Table Checksum
test.test_checksum 1531596814
set autocommit=1;
insert into test_checksum values(3);
checksum table test_checksum;
Table Checksum
test.test_checksum 2050879373
drop table test_checksum;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
select * from t1;
...
...
mysql-test/r/select.result
View file @
13161c2a
...
...
@@ -3029,3 +3029,12 @@ id
102
drop table t1, t2;
drop view v1, v2, v3;
create table t1(f1 int, f2 int);
create table t2(f3 int);
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,1));
f1
select f1 from t1,t2 where f1=f2 and (f1,NULL) = ((1,1));
f1
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
f1
drop table t1,t2;
mysql-test/t/innodb.test
View file @
13161c2a
...
...
@@ -1268,6 +1268,47 @@ insert into t1 values ('8', '6'), ('4', '7');
select
min
(
a
)
from
t1
;
select
min
(
b
)
from
t1
where
a
=
'8'
;
drop
table
t1
;
#
# Test that checksum table uses a consistent read Bug #12669
#
connect
(
a
,
localhost
,
root
,,);
connect
(
b
,
localhost
,
root
,,);
connection
a
;
create
table
test_checksum
(
a
int
not
null
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
insert
into
test_checksum
values
(
1
),(
2
);
set
autocommit
=
0
;
checksum
table
test_checksum
;
connection
b
;
insert
into
test_checksum
values
(
3
);
connection
a
;
#
# Here checksum should not see insert
#
checksum
table
test_checksum
;
connection
a
;
commit
;
checksum
table
test_checksum
;
commit
;
drop
table
test_checksum
;
#
# autocommit = 1
#
connection
a
;
create
table
test_checksum
(
a
int
not
null
)
engine
=
innodb
DEFAULT
CHARSET
=
latin1
;
insert
into
test_checksum
values
(
1
),(
2
);
set
autocommit
=
1
;
checksum
table
test_checksum
;
connection
b
;
set
autocommit
=
1
;
insert
into
test_checksum
values
(
3
);
connection
a
;
#
# Here checksum sees insert
#
checksum
table
test_checksum
;
drop
table
test_checksum
;
# End of 4.1 tests
#
...
...
mysql-test/t/select.test
View file @
13161c2a
...
...
@@ -2181,6 +2181,16 @@ select found_rows();
DROP
TABLE
t1
;
#
# Bug #13356 assertion failed in resolve_const_item()
#
create
table
t1
(
f1
int
,
f2
int
);
create
table
t2
(
f3
int
);
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
f2
)
=
((
1
,
1
));
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
NULL
)
=
((
1
,
1
));
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
f2
)
=
((
1
,
NULL
));
drop
table
t1
,
t2
;
# End of 4.1 tests
#
...
...
scripts/mysql_config.sh
View file @
13161c2a
...
...
@@ -101,7 +101,7 @@ libs_r="$ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@"
libs_r
=
`
echo
"
$libs_r
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
cflags
=
"-I
$pkgincludedir
@CFLAGS@ "
#note: end space!
include
=
"-I
$pkgincludedir
"
embedded_libs
=
"
$ldflags
-L
$pkglibdir
-lmysqld @
LIBS@ @WRAPLIBS@ @innodb_system_libs@
$client_libs
"
embedded_libs
=
"
$ldflags
-L
$pkglibdir
-lmysqld @
ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@
"
embedded_libs
=
`
echo
"
$embedded_libs
"
|
sed
-e
's; \+; ;g'
|
sed
-e
's;^ *;;'
|
sed
-e
's; *\$;;'
`
# Remove some options that a client doesn't have to care about
...
...
sql/ha_innodb.cc
View file @
13161c2a
...
...
@@ -6688,6 +6688,13 @@ ha_innobase::store_lock(
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
}
else
if
(
thd
->
lex
->
sql_command
==
SQLCOM_CHECKSUM
)
{
/* Use consistent read for checksum table and
convert lock type to the TL_READ */
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
stored_select_lock_type
=
LOCK_NONE
;
lock
.
type
=
TL_READ
;
}
else
{
prebuilt
->
select_lock_type
=
LOCK_S
;
prebuilt
->
stored_select_lock_type
=
LOCK_S
;
...
...
sql/item.cc
View file @
13161c2a
...
...
@@ -5227,6 +5227,35 @@ void resolve_const_item(THD *thd, Item **ref, Item *comp_item)
(
Item
*
)
new
Item_int
(
name
,
result
,
length
));
break
;
}
case
ROW_RESULT
:
{
new_item
=
0
;
/*
If item and comp_item are both Item_rows and have same number of cols
then process items in Item_row one by one. If Item_row contain nulls
substitute it by Item_null. Otherwise just return.
*/
if
(
item
->
result_type
()
==
comp_item
->
result_type
()
&&
((
Item_row
*
)
item
)
->
cols
()
==
((
Item_row
*
)
comp_item
)
->
cols
())
{
Item_row
*
item_row
=
(
Item_row
*
)
item
,
*
comp_item_row
=
(
Item_row
*
)
comp_item
;
if
(
item_row
->
null_inside
())
new_item
=
(
Item
*
)
new
Item_null
(
name
);
else
{
int
i
=
item_row
->
cols
()
-
1
;
for
(;
i
>=
0
;
i
--
)
{
if
(
item_row
->
maybe_null
&&
item_row
->
el
(
i
)
->
is_null
())
{
new_item
=
(
Item
*
)
new
Item_null
(
name
);
break
;
}
resolve_const_item
(
thd
,
item_row
->
addr
(
i
),
comp_item_row
->
el
(
i
));
}
}
}
}
case
REAL_RESULT
:
{
// It must REAL_RESULT
double
result
=
item
->
val_real
();
...
...
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