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
f03bbd3f
Commit
f03bbd3f
authored
Dec 21, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 3.23:
Remove duplicate casedn_str() in mysql_change_db() Fix for null handling in CASE
parents
1033c9d2
962042e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
7 deletions
+23
-7
innobase/btr/btr0sea.c
innobase/btr/btr0sea.c
+4
-3
mysql-test/r/case.result
mysql-test/r/case.result
+4
-0
mysql-test/t/case.test
mysql-test/t/case.test
+5
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+8
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
sql/sql_db.cc
sql/sql_db.cc
+0
-2
No files found.
innobase/btr/btr0sea.c
View file @
f03bbd3f
...
...
@@ -453,8 +453,6 @@ btr_search_info_update_slow(
}
if
(
build_index
)
{
ut_a
(
block
->
n_fields
+
block
->
n_bytes
>
0
);
btr_search_build_page_hash_index
(
block
->
frame
,
block
->
n_fields
,
block
->
n_bytes
,
...
...
@@ -1028,7 +1026,10 @@ btr_search_build_page_hash_index(
return
;
}
ut_a
(
n_fields
+
n_bytes
>
0
);
if
(
n_fields
+
n_bytes
==
0
)
{
return
;
}
/* Calculate and cache fold values and corresponding records into
an array for fast insertion to the hash index */
...
...
mysql-test/r/case.result
View file @
f03bbd3f
...
...
@@ -63,3 +63,7 @@ nothing 2
one 1
two 1
drop table t1;
color
orange
yellow
green
mysql-test/t/case.test
View file @
f03bbd3f
...
...
@@ -30,3 +30,8 @@ insert into t1 values(1),(2),(3),(4);
select
case
a
when
1
then
2
when
2
then
3
else
0
end
as
fcase
,
count
(
*
)
from
t1
group
by
fcase
;
select
case
a
when
1
then
"one"
when
2
then
"two"
else
"nothing"
end
as
fcase
,
count
(
*
)
from
t1
group
by
fcase
;
drop
table
t1
;
drop
table
if
exists
t
;
create
table
t1
(
row
int
not
null
,
col
int
not
null
,
val
varchar
(
255
)
not
null
);
insert
into
t1
values
(
1
,
1
,
'orange'
),(
1
,
2
,
'large'
),(
2
,
1
,
'yellow'
),(
2
,
2
,
'medium'
),(
3
,
1
,
'green'
),(
3
,
2
,
'small'
);
select
max
(
case
col
when
1
then
val
else
null
end
)
as
color
from
t1
group
by
row
;
drop
table
if
exists
t
;
sql/ha_innodb.cc
View file @
f03bbd3f
...
...
@@ -1238,7 +1238,14 @@ ha_innobase::open(
if
(
primary_key
!=
MAX_KEY
)
{
fprintf
(
stderr
,
"InnoDB: Error: table %s has no primary key in InnoDB
\n
"
"InnoDB: data dictionary, but has one in MySQL!
\n
"
,
name
);
"InnoDB: data dictionary, but has one in MySQL!
\n
"
"InnoDB: If you created the table with a MySQL
\n
"
"InnoDB: version < 3.23.54 and did not define a primary
\n
"
"InnoDB: key, but defined a unique key with all non-NULL
\n
"
"InnoDB: columns, then MySQL internally treats that key
\n
"
"InnoDB: as the primary key. You can fix this error by
\n
"
"InnoDB: dump + DROP + CREATE + reimport of the table.
\n
"
,
name
);
}
((
row_prebuilt_t
*
)
innobase_prebuilt
)
...
...
sql/item_cmpfunc.cc
View file @
f03bbd3f
...
...
@@ -727,8 +727,9 @@ String *Item_func_case::val_str(String *str)
null_value
=
1
;
return
0
;
}
null_value
=
0
;
if
(
!
(
res
=
item
->
val_str
(
str
)))
null_value
=
1
;
null_value
=
1
;
return
res
;
}
...
...
sql/sql_db.cc
View file @
f03bbd3f
...
...
@@ -383,8 +383,6 @@ bool mysql_change_db(THD *thd,const char *name)
}
send_ok
(
&
thd
->
net
);
x_free
(
thd
->
db
);
if
(
lower_case_table_names
)
casedn_str
(
dbname
);
thd
->
db
=
dbname
;
thd
->
db_length
=
db_length
;
thd
->
db_access
=
db_access
;
...
...
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