Skip to content

Commit 34646a5

Browse files
committed
Fix: Resolve TypeError in translate_function_call for RAND(seed) and refine FOR UPDATE regex
1 parent c4d412a commit 34646a5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

wp-includes/sqlite-ast/class-wp-pdo-mysql-on-sqlite.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4374,7 +4374,8 @@ private function translate_function_call( WP_Parser_Node $node ): string {
43744374
if ( empty( $args ) ) {
43754375
return '(ABS(RANDOM()) / 9223372036854775808.0)';
43764376
}
4377-
break;
4377+
// Seeded RAND() calls should be handled by the PHP UDF.
4378+
return $this->translate_sequence( $node->get_children() );
43784379
case 'DATE_FORMAT':
43794380
list ( $date, $mysql_format ) = $args;
43804381

0 commit comments

Comments
 (0)