Skip to content

Commit c629e8a

Browse files
review comments
1 parent ba87547 commit c629e8a

3 files changed

Lines changed: 32 additions & 7 deletions

File tree

mysql-test/suite/villagesql/create_table/r/create_table_complex_functional_index.result

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,31 @@ id
5252
100002
5353
100003
5454
DROP TABLE t1;
55+
include/rpl/deprecated/show_binlog_events.inc
56+
Log_name Pos Event_type Server_id End_log_pos Info
57+
# # Query # # use `test`; CREATE TABLE `t1` (
58+
`id` int NOT NULL,
59+
`sig` vsql_complex.COMPLEX DEFAULT NULL,
60+
PRIMARY KEY (`id`),
61+
KEY `idx_magnitude` ((vsql_complex.complex_abs(`sig`)))
62+
)
63+
# # Query # # BEGIN
64+
# # Table_map # # table_id: # (test.t1)
65+
# # Write_rows # # table_id: #
66+
# # Write_rows # # table_id: #
67+
# # Write_rows # # table_id: # flags: STMT_END_F
68+
# # Xid # # COMMIT /* XID */
69+
# # Query # # BEGIN
70+
# # Table_map # # table_id: # (test.t1)
71+
# # Write_rows # # table_id: # flags: STMT_END_F
72+
# # Xid # # COMMIT /* XID */
73+
# # Query # # BEGIN
74+
# # Table_map # # table_id: # (test.t1)
75+
# # Write_rows # # table_id: # flags: STMT_END_F
76+
# # Xid # # COMMIT /* XID */
77+
# # Query # # BEGIN
78+
# # Table_map # # table_id: # (test.t1)
79+
# # Write_rows # # table_id: # flags: STMT_END_F
80+
# # Xid # # COMMIT /* XID */
81+
# # Query # # use `test`; ANALYZE TABLE t1
82+
# # Query # # use `test`; DROP TABLE `t1` /* generated by server */

mysql-test/suite/villagesql/create_table/t/create_table_complex_functional_index.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# Tests indexing computed COMPLEX values
33

44
--source include/villagesql/install_complex_extension.inc
5+
--source include/villagesql/binlog_check_begin.inc
56

67
CREATE TABLE t1 (
78
id INT PRIMARY KEY,
@@ -14,7 +15,7 @@ SELECT TABLE_NAME, INDEX_NAME, COLUMN_NAME, EXPRESSION
1415
FROM INFORMATION_SCHEMA.STATISTICS
1516
WHERE TABLE_NAME = 't1' AND INDEX_NAME = 'idx_magnitude';
1617

17-
# Create a 1000 row dataset to trigger index usage. Max for complex abs less than 20
18+
# Create a 1000 row dataset to trigger index usage, where we make sure the complex_abs is less than 20
1819
INSERT INTO t1 (id, sig)
1920
SELECT
2021
row_number() OVER () as id,
@@ -48,4 +49,5 @@ SELECT id FROM t1 WHERE vsql_complex.COMPLEX_ABS(sig) > CAST(20.0 AS DOUBLE) ORD
4849

4950
DROP TABLE t1;
5051

52+
--source include/villagesql/binlog_check_end.inc
5153
--source include/villagesql/uninstall_complex_extension.inc

villagesql/types/util.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,7 @@ bool ValidateAndConvertVDFArguments(THD *thd, const char *func_name,
11121112
continue;
11131113
}
11141114
}
1115-
// Column has no custom type context - reject it
1116-
villagesql_error(
1117-
"Cannot initialize function '%s': argument %u must be a custom type "
1118-
"or string constant",
1119-
MYF(0), func_name, i + 1);
1120-
return true;
1115+
// Column has no custom type context - fall through
11211116
}
11221117

11231118
// Case 4: Argument is not a custom type and not a constant string

0 commit comments

Comments
 (0)