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
908857a0
Commit
908857a0
authored
Feb 17, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0
parents
a58a1dac
531ec55a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
mysql-test/r/select.result
mysql-test/r/select.result
+22
-0
mysql-test/t/select.test
mysql-test/t/select.test
+19
-0
sql/item.h
sql/item.h
+1
-1
No files found.
mysql-test/r/select.result
View file @
908857a0
...
...
@@ -2401,3 +2401,25 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref a a 23 test.t1.a 2
DROP TABLE t1, t2;
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
SELECT * FROM t1 WHERE city='London';
city
London
SELECT * FROM t1 WHERE city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city='London' AND city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
city
London
DROP TABLE t1;
mysql-test/t/select.test
View file @
908857a0
...
...
@@ -1985,3 +1985,22 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
EXPLAIN
SELECT
*
FROM
t1
LEFT
JOIN
t2
FORCE
INDEX
(
a
)
ON
t1
.
a
=
t2
.
a
;
DROP
TABLE
t1
,
t2
;
#
# Test case for bug 7098: substitution of a constant for a string field
#
CREATE
TABLE
t1
(
city
char
(
30
)
);
INSERT
INTO
t1
VALUES
(
'London'
);
INSERT
INTO
t1
VALUES
(
'Paris'
);
SELECT
*
FROM
t1
WHERE
city
=
'London'
;
SELECT
*
FROM
t1
WHERE
city
=
'london'
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
city
=
'London'
AND
city
=
'london'
;
SELECT
*
FROM
t1
WHERE
city
=
'London'
AND
city
=
'london'
;
EXPLAIN
SELECT
*
FROM
t1
WHERE
city
LIKE
'%london%'
AND
city
=
'London'
;
SELECT
*
FROM
t1
WHERE
city
LIKE
'%london%'
AND
city
=
'London'
;
DROP
TABLE
t1
;
sql/item.h
View file @
908857a0
...
...
@@ -985,7 +985,7 @@ class Item_string :public Item
Item
*
new_item
()
{
return
new
Item_string
(
name
,
str_value
.
ptr
(),
str_value
.
length
(),
&
my_charset_bi
n
);
str_value
.
length
(),
collation
.
collatio
n
);
}
Item
*
safe_charset_converter
(
CHARSET_INFO
*
tocs
);
String
*
const_string
()
{
return
&
str_value
;
}
...
...
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