You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raise(ArgumentError,_('mysql_grant: PROXY user not supported on mysql versions < 5.5.0. Current version %{version}.') % {version: mysql_version})
59
59
end
60
60
end
@@ -100,9 +100,9 @@ def initialize(*args)
100
100
# rubocop:enable Lint/UselessAssignment
101
101
mysql_version=Facter.value(:mysql_version)
102
102
unlessmysql_version.nil?
103
-
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 16 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'5.7.8') < 0 && user_part.size > 16
104
-
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 32 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0') < 0 && user_part.size > 32
105
-
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 80 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0') > 0 && user_part.size > 80
103
+
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 16 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'5.7.8').negative? && user_part.size > 16
104
+
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 32 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0').negative? && user_part.size > 32
105
+
raise(ArgumentError,_('mysql_grant: MySQL usernames are limited to a maximum of 80 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0').positive? && user_part.size > 80
Copy file name to clipboardExpand all lines: lib/puppet/type/mysql_user.rb
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -36,9 +36,9 @@
36
36
# rubocop:enable Lint/AssignmentInCondition
37
37
# rubocop:enable Lint/UselessAssignment
38
38
unlessmysql_version.nil?
39
-
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 16 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'5.7.8') < 0 && user_part.size > 16
40
-
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 32 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0') < 0 && user_part.size > 32
41
-
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 80 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0') > 0 && user_part.size > 80
39
+
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 16 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'5.7.8').negative? && user_part.size > 16
40
+
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 32 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0').negative? && user_part.size > 32
41
+
raise(ArgumentError,_('MySQL usernames are limited to a maximum of 80 characters.'))ifPuppet::Util::Package.versioncmp(mysql_version,'10.0.0').positive? && user_part.size > 80
0 commit comments