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
1fdf0e47
Commit
1fdf0e47
authored
Oct 10, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix automerge.
parent
91786a51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
176 additions
and
0 deletions
+176
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+176
-0
No files found.
mysql-test/r/sp.result
View file @
1fdf0e47
...
...
@@ -6620,6 +6620,182 @@ DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
#
# Bug#31035.
#
#
# - Prepare.
#
DROP TABLE IF EXISTS t1;
DROP FUNCTION IF EXISTS f1;
DROP FUNCTION IF EXISTS f2;
DROP FUNCTION IF EXISTS f3;
DROP FUNCTION IF EXISTS f4;
#
# - Create required objects.
#
CREATE TABLE t1(c1 INT);
INSERT INTO t1 VALUES (1), (2), (3);
CREATE FUNCTION f1()
RETURNS INT
NOT DETERMINISTIC
RETURN 1;
CREATE FUNCTION f2(p INT)
RETURNS INT
NOT DETERMINISTIC
RETURN 1;
CREATE FUNCTION f3()
RETURNS INT
DETERMINISTIC
RETURN 1;
CREATE FUNCTION f4(p INT)
RETURNS INT
DETERMINISTIC
RETURN 1;
#
# - Check.
#
SELECT f1() AS a FROM t1 GROUP BY a;
a
1
SELECT f2(@a) AS a FROM t1 GROUP BY a;
a
1
SELECT f3() AS a FROM t1 GROUP BY a;
a
1
SELECT f4(0) AS a FROM t1 GROUP BY a;
a
1
SELECT f4(@a) AS a FROM t1 GROUP BY a;
a
1
#
# - Cleanup.
#
DROP TABLE t1;
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
DROP FUNCTION f4;
#
# Bug#31191.
#
#
# - Prepare.
#
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP FUNCTION IF EXISTS f1;
#
# - Create required objects.
#
CREATE TABLE t1 (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
barcode INT(8) UNSIGNED ZEROFILL nOT NULL,
PRIMARY KEY (id),
UNIQUE KEY barcode (barcode)
);
INSERT INTO t1 (id, barcode) VALUES (1, 12345678);
INSERT INTO t1 (id, barcode) VALUES (2, 12345679);
CREATE TABLE test.t2 (
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
barcode BIGINT(11) UNSIGNED ZEROFILL NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO test.t2 (id, barcode) VALUES (1, 12345106708);
INSERT INTO test.t2 (id, barcode) VALUES (2, 12345106709);
CREATE FUNCTION f1(p INT(8))
RETURNS BIGINT(11) UNSIGNED
READS SQL DATA
RETURN FLOOR(p/1000)*1000000 + 100000 + FLOOR((p MOD 1000)/10)*100 + (p MOD 10);
#
# - Check.
#
SELECT DISTINCT t1.barcode, f1(t1.barcode)
FROM t1
INNER JOIN t2
ON f1(t1.barcode) = t2.barcode
WHERE t1.barcode=12345678;
barcode f1(t1.barcode)
12345678 12345106708
#
# - Cleanup.
#
DROP TABLE t1;
DROP TABLE t2;
DROP FUNCTION f1;
#
# Bug#31226.
#
#
# - Prepare.
#
DROP TABLE IF EXISTS t1;
DROP FUNCTION IF EXISTS f1;
#
# - Create required objects.
#
CREATE TABLE t1(id INT);
INSERT INTO t1 VALUES (1), (2), (3);
CREATE FUNCTION f1()
RETURNS DATETIME
NOT DETERMINISTIC NO SQL
RETURN NOW();
#
# - Check.
#
SELECT f1() FROM t1 GROUP BY 1;
f1()
<timestamp>
#
# - Cleanup.
#
DROP TABLE t1;
DROP FUNCTION f1;
End of 5.0 tests
#
...
...
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